Installing Umbraco 7 In Visual Studio Via Nuget
Mon 16 November, 2015 / By Jon D Jones
Like the majority of the major CMS's, you can install Umbraco via Nuget. I've talked previously about How To Install Umbraco 7 In Less Than 5 Minutes and How To Install Umbraco 7 Manually. Installing Umbraco via Nuget means you have all your Visual Studio solutions and project files set-up for you as you start developing.
Creating A Blank Website
The first thing we need is to create a folder to store the project files. After that open up Visual Studio, click File -> New Project.
Create a new project of type ASP.Net web application and call it whatever you want. DO NOT USE THE WORD UMBRACO IN YOUR PROJECT
. If you do you will get an error when you try and launch the installer that has:
Parser Error Message: Could not load type 'Umbraco.Web.UmbracoApplication'.
Line 1: <%@ Application Inherits="Umbraco.Web.UmbracoApplication" Language="C#" %>
Source File: /global.asax Line: 1
After you have added your solution name, you need to create the project:
The recommended way is to select the 'Empty' option, but you can also select the MVC or WebForms option. The only difference is that you'll be asked to override the Global.ascx and the web.config.
Next you need to open up Nuget, search for Umbraco and click install. It's important you agree to the override prompts that will flash-up, if you didn't select the Empty option.
After the Umbraco package installs, you will now need to run the Umbraco installer. This has to be done by loading up your website. You can do this either in Visual Studio with Cassini, by hitting F5 or, by creating a new website in IIS and pointing it your websites webroot. When you run your site for the first time, you should now hit the Umbraco installation process.
This first thing you will need to so is set your admin account username and details. This will be the account you use to log into Umbraco so don't forget it!
Before you hit install, you have two options. First, you can use the default installation settings. This will install Umbraco into a small SQL Lite database that will be stored within your App_data folder. The second, more preferable option is to use SQL server.
I won't cover the details of creating a SQL server account here as it's quite well documented, but the gist of it. Is that you will need to create a blank database with a SQL account that can access it. In this example I'm using the SA account. Hit the customize button to add in your database preferences.
If you have a blank website with the correct details the installer will continue. If you don't the installer will complain that it can't talk to SQL. If you get an error then you need to look in SQL, not Umbraco. After you have everything set-up correctly, you can continue with the installation process:
If you want more information about this process, I've previously written about it here
There you have it. Installing Umbraco 7 is very easy in all flavors, whether you use the installer, manually install or it use Nuget. Personally, I prefer to use Nuget as you also get all your visual studio files set-up.