Getting AnkhSVN to Work with an Umbraco Solution

Recently I have been developing a .NET portal, using the Umbraco CMS.  Having gotten a couple parts of the application set up, I decided that it would be a good idea to get SVN set up with my code.  In order to get my Umbraco installation set up, I created several masterpages, a slightly modified version of the CSS Friendly web controls, a couple custom controls to be used in their embeded WYSIWYG editor, and a couple static  images and CSS files.  Suffice to say, I hit a snag.

I quickly realized that AnhkSVN really only integrated well with Visual Studio 2010 when a whole solution or project was checked into source control.  Up to that point I was connecting directly through IIS, so I had to set up a solution for the whole project.  In general this seemed like a good idea to collect all the work I had been doing together anyways.  The problem with this is that my Umbraco masterpages would not build in a solution (even if I included a bunch of Umbraco assets).

Here is what I finally did to get around this:

  1. Create my Visual Studio solution.
  2. Create a project for my custom controls, and the full Umbraco website.
  3. In the project, I only included the files relevant to my custom controls.  All other files were excluded.
  4. When I need to work:
    • On a User Control: I load up my Solution, and build it there.
    • On my MasterPages: I open up the website and edit from there.  Since these files are in a Project, they integrate with AhnkSVN now.
June 8, 2010 • Tags: , , , • Posted in: Technology

Leave a Reply