0
votes

At the moment I code in an old solution for a customer. At first I want to migrate the system to VS2017.
I solved all problems but one:

Error CS1705 Assembly 'Crm.Library' with identity 'Crm.Library, Version=3.2.16.0, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc' with identity 'System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' Crm.Web C:\Source\src\Crm.Web\CrmApplication.cs 158 Active

So I tried a lot of things like adding this to web.config:

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

Also tried to set the specific version in the config to 'false'

Screen of config

The problem is still the same..

Anyone got an idea?

1
the problem is: to migrate you need to upgrade Crm.Library, which is what it is telling you. - Seabizkit
Is that DLL inside your own project? Or is it in GAC? Check there is the versions match - Renato Afonso

1 Answers

0
votes

Your Crm.Library assembly, which I'm assuming is probably a class library in your solution, is referencing MVC5, while the project(s) you're including it in are referencing MVC4. You can't mix and match like that. Either Crm.Library needs to reference MVC4 like the rest of the projects, or you need to upgrade them all to MVC5.