I am trying to create subclass of class "Controller" which is located in System.Web.Mvc namespace. According to source (https://msdn.microsoft.com/en-us/library/system.web.mvc.controller(v=vs.118).aspx), it is located in System.web.mvc.dll. I added as reference the "System.Web" in Visual Studio and also tried some other namespaces like System.Web.Abstractions, but I am not able to reference to Controller / System.web.mvc namespace. That dll (System.web.mvc.dll) is not listed in the references, or in extensions. What I am doing wrong?
-
I can found System.Web.Mvc in extensions. V2.0.0.0 and v4.0.0.0 (.net Framework 4.5.1). Which version of the .net framework are you using?Bombinosh– Bombinosh2017-08-17 05:50:43 +00:00Commented Aug 17, 2017 at 5:50
-
If you start from one of the MVC project templates, everything you need should already be referenced.David Tansey– David Tansey2017-08-17 06:15:10 +00:00Commented Aug 17, 2017 at 6:15
Add a comment
|
1 Answer
Maybe you need to actually install MVC. In Visual Studio, go Tools > Nuget package manager > package manager console, then type:
Install-Package Microsoft.AspNet.Mvc -Version *requiredVersion*
e.g. (latest stable release)
Install-Package Microsoft.AspNet.Mvc -Version *requiredVersion* 5.2.3