Setting up Umbraco in Visual Studio

In the time I’ve worked with Umbraco I’ve seen two types of project setups (in Visual Studio) – one simply places the project on top of the actual Umbraco installation, and then excludes some folders, where as the other uses Visual Studio build events to copy your project output into a separate “clean” version of Umbraco.
This link describes the latter “copy-over” approach: http://our.umbraco.org/wiki/how-tos/getting-started-with-umbraco-what-is-next-after-you-install/setting-up-your-project-in-visual-studio and this link (amongst other things) describes the first mentioned “in-place” approach: http://www.aaron-powell.com/how-i-developer-umbraco.

On balance I prefer the “in-place” approach. The “copy-over” is nice, in that it keeps your project small, and allows you to keep the Umbraco solution completely out of Visual Studio. However, as you project grows the build time will increase either way, and what will really (really) get your goat, is the time it takes to even make little CSS or HTML changes. You make these and you have to do a full build, which will copy over all configs, binaries etc – which will in turn trigger the app pool to recycle and on a large project, you can easily end up waiting more than 30 secs for even the smallest updates.
I’ve worked around this before by configuring different build configurations in visual studio and then only copying say HTML, js and CSS for the “Frontend” build – but it still gets slow.

The “in-place” approach seems messy to start with, but actually it works very well. Once you exclude your items from Visual Studio it’s much like working with the “copy-over” solution, but you have much faster build times.

Happy Umbraco’ing whatever you go with!

Advertisements

One Response to Setting up Umbraco in Visual Studio

  1. I use the copy-over appraoch and also ran into your app pool recycling issue after small changes. To get around that I simply added the /d switch to the xcopy commands in the post-build events. That switch means it will only copy if the file changed, so an update to a template, css, etc will not result in an app pool recycle.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: