Question

I am trying to install a clean Umbraco installation from NuGet in Visual Studio 2012, but when I am trying to run the code I get this error

Object reference not set to an instance of an object.

[NullReferenceException: Object reference not set to an instance of an object.]
   Umbraco.Web.UmbracoModule.BeginRequest(HttpContextBase httpContext) +16
   Umbraco.Web.UmbracoModule.<Init>b__8(Object sender, EventArgs e) +253
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

Steps on how I do

  1. New Project
  2. ASP.NET MVC 4 Web Application
  3. Empty [Solution template]
  4. Open Package Manager Console
  5. Install nuget; PM> Install-Package UmbracoCms
  6. Build Solution
  7. Getting my error

Note: I am installing version 7.1.1 and using Visual Studio 2012 Professional

Was it helpful?

Solution 3

Thanks everyone for the alternative solutions, I simply found out that the case it didn't work is because I needed to update Visual Studio 2012 for their new update, version 4.

So if anyone is getting this kind of errors trying to install Umbraco 7 through Visual Studio 2012

Error 1

Object reference not set to an instance of an object.

[NullReferenceException: Object reference not set to an instance of an object.]
   Umbraco.Web.UmbracoModule.BeginRequest(HttpContextBase httpContext) +16
   Umbraco.Web.UmbracoModule.<Init>b__8(Object sender, EventArgs e) +253
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

Error 2

The view '/umbraco/install/views/index.cshtml' or its master was not found or no view engine supports the searched locations. The following locations were searched:
/umbraco/install/views/index.cshtml

Solution

Update Visual Studio 2012 to version 4 (the newest)

  1. Tools
  2. Extensions and updates
  3. Updates

Simply update everything there.

OTHER TIPS

Before installing Umbraco cms to an existing VS MVC4 project you have to delete

  1. all the config files in the App_Start folder,
  2. web.config in the 'views' folder and
  3. the global.asax files of the MVC project.

For more details please refer link http://umbraco.tv/videos/developer/fundamentals/surface-controllers/setting-up-the-vs-solution/

You can also setup an Umbraco 7 Application by following the steps below,

  1. Install Microsoft WebMatrix (http://www.microsoft.com/web/webmatrix/)
  2. Open WebMatrix -> New -> App Gallery
  3. Select Umbraco CMS and click next and follow the instructions.
  4. Once done you can work on umbraco using the WebMatrix itself, or you can open the created website in Visual Studio to work.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top