Monday, January 14, 2019

Install Umbraco on Localhost and Build Visual Studio Solution

Let's create a visual studio project and install Umbraco in the solution.

Note:You need to run Visual studio as Administrator to setup any website in local IIS.

Step 01: Create a Visual studio project

You will be prompt to select the web application type (.Net core/ .Net framework). Make sure you create the Umbraco application based on .Net framework (I have selected 4.6.1 version). Give a proper name for your project solution (I just named it as UmbracoDemoApp).


Step 02: Select an empty project

Do not select the project type as MVC or Add folders and core references for MVC. Umbraco will overwrite your application web.config and will generate Global.asax file for you. In this demo, I will not add an unit test project for this demo, feel free to drive the car as you wish.


Step 03: Get ready to install UmbracoCMS
 
Open up the package Manager Console to install UmbracoCMS in command line. If you wish to use, NuGet package manager, right click on the project solution and go to Nuget search explore window, then search for the UmbracoCMS.


Step 04: Install UmbracoCMS

In this demo application I am going to use 7.12 version of UmbracoCMS. I prefer to go with 7.12 over 7.13 because most of the packages are not fully tested on 7.13 version.

PM> Install-Package UmrbacoCMS -version 7.12


Once the packages successfully installed on your machine, You can see the below screen in your project solution. Let's host the application in local IIS. Make sure you have opened the visual studio as Administrator.


Step 05: Host Demo application in Local IIS

Right click on project solution name --> Go to properties --> select Web tab --> Choose Local IIS --> click Create Virtual Directorty--> Run your application.

It will open the browser in following url:
http://localhost/UmbracoDemoApp

If you wish to change the hosting url like www.myfirstumbracoapp.com in your local machine before going live, refer my article on How to change the host url in Host file on Windows

During the installation process, it will prompt you to enter default settings for your application. Provide necessary information as you can see in below images.


Configure the database for your application.

Note: It is a good practice to create a different user account and a password for the database.You must create a database first to provide in following screen.


Once you complete the setting, click continue. You will be prompt to another screen to Install a starter website. Click "No thanks, I do not want to install a starter website". We are going to integrate bootstrap theme to the site in upcoming article.

1 comment: