Installing Umbraco 7 (Part 1) - Setting up Visual Studio

Using my personal experience, I found Umbraco quite tough to get up and running, and I believe that if you have never used it before, then you might also find it challenging to get it (manually) installed and configured correctly so that you can begin using the CMS for development.

For new starters, if you want to be set up quickly, then there is the option to easily install the latest version using the web platform installer or WebMatrix as these tools will automatically download and install any dependencies for you.

However, having experimented both approaches, I would recommend setting everything up manually so that you can benefit from using an integrated development environment (IDE) such as Visual Studio to write your code. A major advantage of writing your code from within in Visual Studio is that it will provide you with intellisense for auto-completion which is something that is not offered from within the Umbraco Back Office.

This is part one in a series of blog posts that will detail the process which I followed to manually install Umbraco 7 through Visual Studio 2013, configured to be hosted locally via IIS 7.5 (Windows 7 OS) and database creation using Microsoft SQL Server 2008R2. Hopefully, it will provide some useful information to anyone who may be just starting out on their Umbraco adventure.

If you are struggling while following these blog posts, please don't hesitate to get in touch with me or you can visit the Our Umbraco Forum area, and I'm sure someone will help you out – they are a friendly bunch ;)

Polite Notice: With regards to working with Umbraco, I am still very much learning the ropes myself, but I continue to research and ask questions to help enhance my existing knowledge so that I can keep applying what I believe are the best practices.

With this in mind, the information that I have made available is purely based on my experiences. Therefore, if you are reading my posts and there happens to be a better way to complete a certain process, or you feel that I have explained something wrong, please get in touch with me so that I can make the necessary updates to provide more accurate information to help others.

The primary aim of producing this series of blog posts and making them available online is to hopefully provide a helping hand to anyone who is just starting out with Umbraco and trying to get up and running quickly. Using my experiences, I know that I would have benefited from something similar when I first started out, so hopefully my posts will help someone.

Prerequisites

Before we begin, you will need to ensure that the following programs are installed and correctly configured your computer:

Let’s Get Started!

Downloading & Installing Umbraco CMS with Visual Studio 2013 & NuGet

Step 1 – Open Visual Studio 2013, go to FILE and select the NEW PROJECT option.

New VS Project

Step 2 – In the left-hand pane, choose VISUAL C# and then from the main pane select ASP.NET WEB APPLICATION as the project Type. Name your project something suitable, I have called my project InstallingUmbracoDemo.

Creating new project in VS

Step 3 – In the next screen, select to use an EMPTY PROJECT template for your new ASP.NET Project and all options to add folders and core references are left unchecked (Umbraco will create these for you). Select OK and visual studio will create your new project based on the settings that have been defined.

Empty Project

Step 4 – Next you need to install Umbraco into your empty visual studio ASP.NET project. This is done via NUGET PACKAGE MANAGER and can be completed by navigating to TOOLS > NUGET PACKAGE MANAGER and selecting MANAGE NUGET PACKAGES FOR SOLUTION.

Managae NuGet Packages

Step 5 – When the manage NuGet package dialog opens, ensure that the ONLINE option is selected from the left-hand pane and then type ‘Umbraco CMS’ into the search box. From the options in the search results list select to ‘install’ the UMBRACO CMS package.Install Umbraco CMS

Step 6 – After you select the 'install' button, the latest version of Umbraco CMS will begin to download.

Downloading Umbraco

Step 7 – Once the latest version of Umbraco CMS package has completed downloading, in the SELECT PROJECTS dialog ensure that you place a check in the visual studio solution (installingUmbracoDemo) and your new empty ASP.NET project (installingUmbracoDemo) to tell NuGet that you want to install the package to these locations. Select OK.

Install the package

Step 8 – NuGet will begin to install the package into your new empty ASP.NET project which was created in step 3 (installingUmbracoDemo).

Installing Umbraco

Step 9 – When prompted, ensure that you accept the license terms for the Umbraco CMS package by selecting ‘I Accept'.

Accept License

Step 10 – Once NuGet has completed installing the Umbraco CMS package the last thing you need to do is build the solution in Visual studio. Navigate to BUILD and select BUILD SOLUTION (ctrl+shift+B).

Build Solution

 Step 11 – Once you have built your solution, left-click the project in the SOLUTION EXPLORER so that it becomes selected.

Select project in solution explorer

Step 12 – With your project selected, navigate to the toolbar at the top of the SOLUTION EXPLORER and chose the SHOW ALL FILES icon to display the additional files that have not included in your project by default. With show all files selected, you should notice that there are many ‘Umbraco specific’ files and folders that are not currently included in the project (Greyed out).Show all files

Step 13 – On each of the folders and files that are not included (greyed out), right click each of them and select the option INCLUDE IN PROJECT from the context menu. Once they have been included into your project the folders and files will become available which signifies that you have successfully included them.

Include in project

Step 14 – Once you have completed including all the additional files and folders into your project give your solution another build (as outlined in step 10).

Comments

19 September 2017 at 20:09
Michael Williams wrote...

Step 13 should be revised to exclude the App_Data folder out of the project. More precisely, the objects to exclude are listed in the GitHub repository (https://github.com/github/gitignore/blob/master/Umbraco.gitignore). However, excluding the entire App_Data folder is easier and seems to work. Visual Studio builds will throw errors if the App_Data folder is included in the project after the application is deployed.

05 July 2017 at 14:39
Paul Griffiths wrote...

Hi Tony, The newer versions of umbraco, from something like 7.5 upwards uses NuGet client version '3.4.4' or above which is not supported by vs2013 i believe. You either need to upgrade visual studio to 2015 or greater or you can install a earlier version of umbraco by running the following command Install-Package UmbracoCms -Version 7.6.3 (swap the version number - https://www.nuget.org/packages/UmbracoCms/) Thanks Paul

03 July 2017 at 23:53
tony wrote...

I get the error The 'UmbracoCms 7.6.3' package requires NuGet client version '3.4.4' or above, but the current NuGet version is '2.12.0.817'. I am working with visual studio 2013. Ive tried uninstalling nuget and reinstlling it by going to Tool -> extensions and updates and downloading a newer version, but 2.12.0.817 is th enewest it will let me download

20 June 2016 at 16:27
Paul Griffiths wrote...

Hi, Thanks for the comments I'm glad that it helped you install umbraco and get up and running. With regards to the part where it was hanging on the first install screen I know what causes this and need to update part 2 step 25 where I manually update the connection string. This is something umbraco will do automatically so when it sees a connection string configured it will hang on the final installation steps. Hope that helps? Paul

20 June 2016 at 16:03
Viral Shah wrote...

Thank for you for neatly putting together all steps. It helped greatly :-) In my case, once installation started on very first screen, it hung and did not move further. Ended up removing SQL Server database information from umbracoDSN but it ended up installing into SQL CE. It did not ask me Database information at all!

21 April 2016 at 9:14
Martin Edwards wrote...

Thank you for writing these posts, very useful as I embark on my Umbraco journey!

Leave a comment