System.web.mvc missing

前端 未结 10 1213
逝去的感伤
逝去的感伤 2020-12-02 14:54

We have an old ASP.NET MVC 3 Web Application, building in VS2010, that fails to compile, since last week\'s security update.

The problem is that the reference to Sys

相关标签:
10条回答
  • 2020-12-02 15:49

    Easiest way to solve this problem is install ASP.NET MVC 3 from Web Platforms installer.

    http://www.microsoft.com/web/downloads/

    Or by using Nuget command

    Install-Package Microsoft.AspNet.Mvc -Version 3.0.50813.1
    
    0 讨论(0)
  • 2020-12-02 15:49

    In my case I had all of the proper references in my project. I found that by building the solution the nuget packages were automatically restored.

    0 讨论(0)
  • 2020-12-02 15:50

    Get the latest version of MVC3 via NuGet. Open your project in Dev Studio. Open the Package Manager Console tab at the bottom of Dev Studio. Then use this command:

    PM> Install-Package Microsoft.AspNet.Mvc -Version 3.0.50813.1
    

    If you click the tab key after "-Version" you will get a list of all of the available versions.

    If you have an old version of NuGet you may get an error indicating you have to upgrade it. If so, open Tools->Extension Manager to install the latest version of NuGet. Note, you will need to run Dev Studio as Administrator before you can install NuGet.

    Installing MVC3 should update Web.config in your project.

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-3.0.0.1" newVersion="3.0.0.1" />
      </dependentAssembly>
    </assemblyBinding>
    
    0 讨论(0)
  • 2020-12-02 15:53

    MVC 5

    C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Stack 5\Packages\ Microsoft.AspNet.Mvc.5.0.0\lib\net45\System.Web.Mvc.dll

    MVC 4

    C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\Assemblies\System.Web.Mvc.dll

    MVC 3

    C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies\System.Web.Mvc.dll

    MVC 2

    C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 2\Assemblies\System.Web.Mvc.dll

    Where can I find System.Web.MVC dll in a system where MVC 3 is installed?

    0 讨论(0)
提交回复
热议问题