Software⏱️ 2 min read📅 2026-06-03

How to Fix: Visual Studio error "Object reference not set to an instance of an object" after install of ASP.NET and Web Tools 2015

The error occurs due to the Web Tools 2015 update causing a conflict with ASP.NET MVC 4 projects. Try disabling the Web Tools in your project and then re-enable them.

Quick Answer: Disable Web Tools, then re-enable them.

The error 'Object reference not set to an instance of an object' in ASP.NET MVC 4 projects within Visual Studio 2015, after installing ASP.NET and Web Tools 2015 (RC1 update 1), is commonly caused by a missing or null reference to the Razor engine.

⚠️ Common Causes

  • Missing or null reference to the Razor engine

🚀 How to Resolve This Issue

Method 1: Check Razor Engine Configuration

  1. Step 1: Open the project's properties by right-clicking on the solution in Solution Explorer and selecting Properties.

Method 2: Update Web Config

  1. Step 1: Open the project's web.config file and add the following configuration to the section:
<system.webPages>

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions