Using C#, Visual Studio 2010.
There is a namespace called System.Web.Mvc documented on MSDN. The documentation for all the types in that namespace says that they are in System.Web.Mvc.dll
.
However, when I go to Add Reference, “.NET” tab, this assembly is missing from the list. Why?
This has changed for Visual Studio 2012 (I know the original question says VS2010, but the title will still hit on searches).
When you create a VS2012 MVC project, the system.web.mvc is placed in the packages folder which is peer to the solution. This will be referenced in the web project by default and you can find the exact path there).
If you want to reference this in a secondary project (say a supporting .dll with filters or other attributes), then you can reference it from there.
In VS Express 2012 I couldn't find System.Web.Mvc in the "assemblies" tab, but after a bit of searching I found out that I need to look into "assemblies\extensions" tab rather than the default "assemblies\framework" tab.
The desired assembly has appeared in the list now.
I can only speculate what caused it to appear, but I suspect it is the fact that I went File → New → Project → ASP.NET Web Application, which I had never done before. It is possible that this caused some sort of late initialisation to happen and the list to be populated with additional assemblies for Web development.
it can be installed separated, and it's not included in framwork, choose tab list "extensions" and it exists there are and more other libs, all is ok not needed to used old libs etc, exists old 20 30 and 4001
I didn't get System.Web.Mvc in VS 2012 but I got it in VS 2013. Using AddReference Dialog,
Or, You can find this in your project path,
YourProjectName\packages\Microsoft.AspNet.Mvc.5.0.0\lib\net45\System.Web.Mvc.dll
I had the same issue and wasn't able to locate the System.Web.MVC reference assembly.
Finally found out and it was located inside the following location.
Note if your VS was installed in C: (Sometimes the MVC.dll is not in the default location which everybody talk about, i mean the "Reference Assemblies" folder located in the C: drive.)
if its not there, it should definitely be in here:
\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 2\Assemblies\System.Web.Mvc.dll
So add the dll through navigating or the browse tab in the add reference menu.