//Thursday 19 December 2013

Steps for setting up a new Umbraco 6.1.6 web project in Visual Studio 2012

  1. Create new empty MVC 4 Application in Visual Studio 2012
  2. Install Core Binaries from Nuget (latest on NuGet is now 7 so need to specify v6.1.6 "Install-Package UmbracoCms.Core -Version 6.1.6")
  3. Download the zip of Umbraco 6.1.6 and extract all files into your project folder except App_Code and bin. App_Code isn't relevant to an MVC project and you don't need the bin because the Umbraco binaries are managed by NuGet.
  4. Open up VS2012 and include the Umbraco folders in your project
  5. Update default rendering engine to be Mvc in Config\UmbracoSettings.config as follows:
    <templates>      
        <useAspNetMasterPages>true</useAspNetMasterPages>
        <defaultRenderingEngine>Mvc</defaultRenderingEngine>
    </templates>
    
  6. Create an empty database and a SQL user with access to the database
  7. Run the project and run through the standard Umbraco installation process to install database, set up connection strings etc.
  8. Add following appSettings to web.config to enable client side validation:
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
    
  9. Install-Package Microsoft.jQuery.Unobtrusive.Ajax -Version 3.0.0
    Install-Package Microsoft.jQuery.Unobtrusive.Validation -Version 3.0.0

SyntaxHighlighter