How to install Umbraco from scratch using nuget in Visual Studio

Tuesday, February 05, 2013 by David Conlisk

I was having some trouble working out how to install Umbraco in a clean, new visual studio project. Here's how to do it.

Assumptions

I'm assuming that you are using Visual Studio 2010 (I know - old school) and that you have nuget installed. Find out how to install nuget if you don't already have it. It's great!

Update: MVC is a dependency that is automatically "bin-deployed" so you don't have to worry about that part (Thanks for the info Sebastiaan!)

Instructions

  • Open up VS2010.
  • Choose File -> New Project... -> ASP.NET MVC 4 Web Application or ASP.NET Web Application (thanks again Seb!)
  • Enter a name for your application and a location.
  • Click OK.
  • Choose the Empty project template, and accept the default view engine (i.e. Razor).
  • Click OK.
  • Open up nuget package manager by going to Tools -> Library Package Manager -> Package Manager Console.
  • Type the command at the prompt: install-package umbracocms
  • When nuget has done its thing, hit F5 to enjoy your brand spanking new Umbraco website! (you may get a popup message about your web.config and debugging, just accept it and continue).

UPDATE April 4th, 2013: If you are using VS2012 with this method, double-check the web.config in the Views folder. See my post on the forum for more information.

 

If you found this article useful, please click the +1 button!

 

4 comment(s) for “How to install Umbraco from scratch using nuget in Visual Studio”

  1. Gravatar of Sebastiaan Janssen


    Sebastiaan Janssen says:

    Yup, it's pretty easy if you don't forget to build the project ;-)

    You don't need MVC4 installed by the way, it's a dependency we take on automatically and is "bin deployed", so it won't need an install (see: http://haacked.com/archive/2011/05/25/bin-deploying-asp-net-mvc-3.aspx ).
  1. Gravatar of Sebastiaan Janssen


    Sebastiaan Janssen says:

    Ps. It works equally well with File > New Project > ASP.NET Webforms application.
  1. Gravatar of Ajmal vh


    Ajmal vh says:

    I have tried it before using ASP.NET Webform application. What difference it make when i install the nuget package in ASP.NET MVC 4 Web Application ?
  1. Gravatar of David Conlisk


    David Conlisk says:

    Thanks for the info, Seb, I've updated the blog post with your information.
    Ajmal you end up with a slightly different project structure when you use an MVC project, for obvious reasons. For example, the MVC project has a Controllers folder. But otherwise I can see no difference between the two. You still need to update umbracoSettings.config to set the defaultRenderingEngine to MVC even if you have created an MVC project in VS.

Please leave a comment: