Incorrect System.Web.Mvc Update

I added System.Web.Mvc v4.0.0.0 to the GAC, so I manually installed Mvc via nuget using "Install-Package Microsoft.AspNet.Mvc -Version 5.2.3".

I installed System.Web.Mvc v5.2.3.0 now, Nuget manager

and System.Web.Mvc v4.0.0.0 in the GAC Gac

I have this in Web.config:

 <dependentAssembly>
    <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
    <bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
  </dependentAssembly>

I create and run the project and I get the following error:

Failed to load file or assembly 'System.Web.Mvc, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35' or one of its dependencies. The system cannot find the file.

But I configured and added the MVC v5.2.3.0 package. Why does this error appear?

Solved Dereference System.Web.Mvc Links → Right-click → Mange NuGet Packages ... → → Remove the MVC And now the "Install".

+4
1

, , GAC. , . , , " NuGet".

" 4" " ", , NuGet. , .

+1

Source: https://habr.com/ru/post/1584779/


All Articles