Jack
Jack

Reputation: 1

How to add System.Web.Mvc version 5 to the project references

When I want to add System.Web.Mvc by right clicking the project and Add>Reference option, there is only version 3.0.0.0 and 4.0.0.0. However, I created the project as MVC 5. On the other hand, trying to add this reference on Nuget Package, there is no reference with the same name. Instead of this, there is another refernce named So:

1) How can add System.Web.Mvc (version 5 or later) reference to my projects including Class Library?

2) What is the difference between System.Web.Mvc and Microsoft.AspNet.Mvc?

Thanks in advance.

Upvotes: 4

Views: 9541

Answers (2)

ScottWelker
ScottWelker

Reputation: 2084

I experienced this odd issue and had to uninstall/reinstall Microsoft ASP.NET MVC via NuGet Package Manager - for the project in question - before I could add the correct System.Web.Mvc v5.0.

Upvotes: 0

IndieTech Solutions
IndieTech Solutions

Reputation: 2541

System.Web.Mvc Is one of the core namespaces developed by MS,it contains classes and interfaces that support the ASP.NET Model View Controller (MVC) framework for creating Web applications. This namespace includes classes that represent controllers, controller factories, action results, views, partial view, model binders, and much more. MS Link

Don't get confused with another namespace: Microsoft.Web.Mvcwhich contains classes that support the ASP.NET.MVC framework for creating web applications.

Now back to your first question about Microsoft.AspNet.Mvcthat you can download from Nuget. I think it's the same as System.web.mvc , if you check dll file it creates, you will notice that it has the exact samedll name: System.Web.Mvc.dll. It has the same size, assembly signature, etc.

Upvotes: 5

Related Questions