0

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?

2
  • 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? Commented Aug 17, 2017 at 5:50
  • If you start from one of the MVC project templates, everything you need should already be referenced. Commented Aug 17, 2017 at 6:15

1 Answer 1

2

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.