Reputation: 137
It seems my solution is using two different versions of System.Web.Mvc. The question is how do I resolve this so it uses the same version?
Error 2 Assembly 'SportsStore.WebUI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Mvc, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
Upvotes: 0
Views: 2471
Reputation: 10068
Try adding this in your web.config
(make sure you do not over write existing sections)
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-5.2.2.0" newVersion="5.2.2.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Upvotes: 1
Reputation: 3285
If you installed the System.Web.mvc extension via Nuget, do an update for every project where you use it through the Nuget package manager;
Otherwise, for every project where you reference System.Web.mvc you could remove the reference manually and add it again (using the same version number everywhere).
Upvotes: 2