I am building a new Umbraco 7 site and I would like to build a Visual Studio 2013 development environment for it. I planned to create a new ASP.NET Web Application (empty) and add Umbraco using Nuget.
I have a web server which hosts a test database instance (SQL Server) as well as the test website instance (IIS).
I run the application from Visual Studio 2013 for development purposes on my local machine connecting to the remote test database. After I finished changes (stylesheets, templates,...) I would like to use the Visual Studio Publish feature to copy the changes to the remote web site (dev instance) using WebDeploy.
Any experiences on such a scenario? Are there any drawbacks when using Publish/WebDeploy?
How would you then populate changes from the test environment to the live environment? Is Umbraco Courier required, or can that also be done using Publish from within Visual Studio (and manually add things like Document types to the live database)?
I am new to Umbraco, and have spent a day trying to get this approach to work.
My Laptop is Windows 7 and has VS2013 and I was connecting to a test database on a seperate SQL 2008 server. Then publishing to a different IIS server (2012 R2) running IIS 8. I am using Web Deploy 3.5
The biggest issues I had with Web Deploy was that if Visual Studio and IIS were not run as Administrators it would appear to work, but then when I looked at the published result various things were missing or not working.
I am logging onto all of the machines and publishing with the same account. It is a local admin on all machines
Anyway my complete checklist of steps which resulted in success is as follows
Dev Environment Setup
Run Sequel Server Management Studio
Create a new empty DB.
Create a SQL user for DB with owner rights
RUN Visual Studio 2013 AS ADMINISTRATOR
Create empty web app project
nuget umbraco cms (current version was 7.1 as of writing this)
Run project without debugging in VS
Configure Umbraco, select customize and link to the new DB with the new user
Show hidden folders, include all in project except obj (2 to include in Views. 1 in Config)
RUN IIS AS ADMINISTRATOR
Create IIS website, set app pool, set port
RUN EXPOLORER
give app pool id full control on entire drive-(App Pool account in IIS8 is'IIS AppPool\' and must be typed exactly and in full then checked for on the local machine)
RETURN TO VS, REMEMBER MUST RUN VS AS ADMINISTRATOR
In server explorer add a connection to the database you created
Set up the publish profile Connection
Set up the publish profile Settings, Remembering to set the Remote Connection string from the dropdown.
Check remove additional Files at destination, and Exclude files from the App_Data folder
Then hit Publish
Finally I get an error to do with connection string parameterization…
Add a file to the project called {ProjectName}.wpp.targets
Paste the following into the file
Save and close VS, Reopen RUN VS AS ADMINISTRATOR and publish the project.
thanks for your reply - nice to discuss about that in detail.
I generally have set Visual Studio to run as administrator (by default).
I am using IISExpress for the Umbraco solution (altough I have IIS installed), because I thought it would be easier with that in terms of running as a host name (localhost:ip) by default without virtual directories etc. in IIS.
Do you publish the web application using WebDeploy to a production environment or to a remote test environment? I currently only deploy to a remote test instance (which is publicly available through the internet), so I don't have to change connection strings on publishing (yet). I also don't check the boxes at "File Publish Options".
Btw: I wonder if its a good approach for publishing changes later to a production environment also.
I also wonder what setting in project settings -> Package/Publish web is the best (actually I have set "Only files neede to run this application" (default).
What I tested yet: I started the LOCAL Umbraco instance from Visual Studio (Ctrl F5) and installed a starter kit using the backend. After that I had to include all files added by the starter kit manually to the Visual Studio project (Include In Project - for all the CSS, Views,..). After that I published to my remote dev instance using WebDeploy, and it worked there too (same database). The only challenge here is to really catch all necessary files and add them to the project.
Another general question: I guess you also work source controlled. Which folders of the Umbraco solution do you add to source control? What's best practice here?
I am also running in IISExpress for development and testing.
I am publishing using Web Deploy to a remote test environment, still connected to the same database. I am not sure what the best approach for "File Publish Options" is.I check remove additional files at destination to keep clutter down on the server, and I was getting errors publishing with Exclude files from the App_Data folder unchecked.
I have not changed any of the Package/Publish web settings, they are default like yours.
I have done the same with the Local Gov starter kit, deployed identically to yours, and had the same fun with finding all the files.
Regarding source control, I am checking in the following, though doubt it is best practice... to be honest I do not knw enough about Umbraco to know what can be excluded from source control, thought I suspect the umbraco and umbraco_client folders could be a start.
I have managed to get one of my colleagues to get the latest version, connect to the shared database and run his own development environment in VS/IISExpress on his local machine. So we can both work independently on our own laptops, check in and merge changes, then publish to the shared remote dev environment.
I have not worked out the next step to deploy to live, I am thinking about looking at the uSync developer tool, it should write non-content database info to XML files that can be source controlled and shared/deployed.
If I can get that working I should be able to use it to web deploy my changes to staging and then to live.
thanks again for your input and sharing your experiences. Seems that we have actually pretty the same goals and requirements ;)
I didn't know uSync yet, but I will check that too!
Can anybody answer what part of the application should / must be added to source control in order to allow other team members to run the application as well on their local machine? I wonder if the App_Data folder must be included at all!?
I wanted to check in with you two to see if you could share anything new you have learned regarding this topic since your last posts. I just started a new job and will be working with umbraco. I'd like to have a local dev environment. I've made some progress with a Vagrant setup. I'm just wondering what I should commit to source control, how do I go about deploying my changes to our dev and prod servers, and any other useful tid bits you might have.
This is something I would also be interested in - especially the part about what to commit to source control when working with NuGet - presumably only the specific development files.
My intention is to open a new VS project, use NuGet to install the latest version of Umbraco and then basically .gitignore everything before I start developing in the App_Data folder.
Dev environment
Hi,
I am building a new Umbraco 7 site and I would like to build a Visual Studio 2013 development environment for it. I planned to create a new ASP.NET Web Application (empty) and add Umbraco using Nuget.
I have a web server which hosts a test database instance (SQL Server) as well as the test website instance (IIS).
I run the application from Visual Studio 2013 for development purposes on my local machine connecting to the remote test database. After I finished changes (stylesheets, templates,...) I would like to use the Visual Studio Publish feature to copy the changes to the remote web site (dev instance) using WebDeploy.
Any experiences on such a scenario? Are there any drawbacks when using Publish/WebDeploy? How would you then populate changes from the test environment to the live environment? Is Umbraco Courier required, or can that also be done using Publish from within Visual Studio (and manually add things like Document types to the live database)?
Best Regards Andreas
Hi Andreas,
I am new to Umbraco, and have spent a day trying to get this approach to work.
My Laptop is Windows 7 and has VS2013 and I was connecting to a test database on a seperate SQL 2008 server. Then publishing to a different IIS server (2012 R2) running IIS 8. I am using Web Deploy 3.5
The biggest issues I had with Web Deploy was that if Visual Studio and IIS were not run as Administrators it would appear to work, but then when I looked at the published result various things were missing or not working.
I am logging onto all of the machines and publishing with the same account. It is a local admin on all machines
Anyway my complete checklist of steps which resulted in success is as follows
Dev Environment Setup
xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<AutoParameterizationWebConfigConnectionStrings>falseAutoParameterizationWebConfigConnectionStrings>
PropertyGroup>
Project>
This fix is from http://blogs.msdn.com/b/webdev/archive/2010/11/10/asp-net-web-application-publish-package-tokenizing-parameters.aspx.
Hope that helps.
Will.
Hi Will,
thanks for your reply - nice to discuss about that in detail.
I generally have set Visual Studio to run as administrator (by default). I am using IISExpress for the Umbraco solution (altough I have IIS installed), because I thought it would be easier with that in terms of running as a host name (localhost:ip) by default without virtual directories etc. in IIS.
Do you publish the web application using WebDeploy to a production environment or to a remote test environment? I currently only deploy to a remote test instance (which is publicly available through the internet), so I don't have to change connection strings on publishing (yet). I also don't check the boxes at "File Publish Options". Btw: I wonder if its a good approach for publishing changes later to a production environment also.
I also wonder what setting in project settings -> Package/Publish web is the best (actually I have set "Only files neede to run this application" (default).
What I tested yet: I started the LOCAL Umbraco instance from Visual Studio (Ctrl F5) and installed a starter kit using the backend. After that I had to include all files added by the starter kit manually to the Visual Studio project (Include In Project - for all the CSS, Views,..). After that I published to my remote dev instance using WebDeploy, and it worked there too (same database). The only challenge here is to really catch all necessary files and add them to the project.
Another general question: I guess you also work source controlled. Which folders of the Umbraco solution do you add to source control? What's best practice here?
Best Regards Andreas
Hi Andreas,
I am also running in IISExpress for development and testing.
I am publishing using Web Deploy to a remote test environment, still connected to the same database. I am not sure what the best approach for "File Publish Options" is.I check remove additional files at destination to keep clutter down on the server, and I was getting errors publishing with Exclude files from the App_Data folder unchecked.
I have not changed any of the Package/Publish web settings, they are default like yours.
I have done the same with the Local Gov starter kit, deployed identically to yours, and had the same fun with finding all the files.
Regarding source control, I am checking in the following, though doubt it is best practice... to be honest I do not knw enough about Umbraco to know what can be excluded from source control, thought I suspect the umbraco and umbraco_client folders could be a start.
I have managed to get one of my colleagues to get the latest version, connect to the shared database and run his own development environment in VS/IISExpress on his local machine. So we can both work independently on our own laptops, check in and merge changes, then publish to the shared remote dev environment.
I have not worked out the next step to deploy to live, I am thinking about looking at the uSync developer tool, it should write non-content database info to XML files that can be source controlled and shared/deployed.
If I can get that working I should be able to use it to web deploy my changes to staging and then to live.
Cheers, Will.
Hi Will,
thanks again for your input and sharing your experiences. Seems that we have actually pretty the same goals and requirements ;) I didn't know uSync yet, but I will check that too!
Can anybody answer what part of the application should / must be added to source control in order to allow other team members to run the application as well on their local machine? I wonder if the App_Data folder must be included at all!?
Best Regards Andreas
Hello Will and Andreas,
I wanted to check in with you two to see if you could share anything new you have learned regarding this topic since your last posts. I just started a new job and will be working with umbraco. I'd like to have a local dev environment. I've made some progress with a Vagrant setup. I'm just wondering what I should commit to source control, how do I go about deploying my changes to our dev and prod servers, and any other useful tid bits you might have.
Thanks
Hi all,
This is something I would also be interested in - especially the part about what to commit to source control when working with NuGet - presumably only the specific development files.
My intention is to open a new VS project, use NuGet to install the latest version of Umbraco and then basically .gitignore everything before I start developing in the App_Data folder.
I read an interesting post on theoutfield.net that led me to that way of thinking.
Would be good to know how you guys have got on since May.
Thanks
is working on a reply...