Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The type or namespace name 'Mvc' does not exist

I have recently installed visual studio 2013. After downloaded a sample project from web, while i run it, it gives me the following errors-

The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)   

How to overcome this error?

like image 757
s.k.paul Avatar asked Mar 11 '14 12:03

s.k.paul


Video Answer


1 Answers

The source of your error may be that you do not have a reference to the MVC framework library. A simple solution is to add this reference trough Nuget. The MVC library will be installed in your bin directory and, if needed, all the references will be added to your project.

Either browse for the MVC package (Tools -> Nuget Package Manager -> Manage Nuget Packages for Solution) or install it using the Nuget console (Tools -> Nuget Package Manager -> Package Manager Console) by entering Install-Package Microsoft.AspNet.Mvc. You can find additional information on the official Nuget page for AspNet.Mvc.

like image 155
Andrei V Avatar answered Sep 28 '22 04:09

Andrei V