Grokys
Grokys

Reputation: 16526

Assembly conflict upgrading to ASP.net MVC 4 RTM

I have just upgraded my project from ASP.net MVC 4 RC to RTM, but I am now getting this error:

Error 45 Assembly 'StudioMvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Net.Http.Formatting, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' d:\projects\StudioPlatform\StudioMvc\StudioMvc\bin\StudioMvc.dll StudioMvc.WebApi.Tests

The reference in the .csproj file is:

<Reference Include="System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
  <SpecificVersion>False</SpecificVersion>
  <HintPath>..\packages\Microsoft.AspNet.WebApi.Client.4.1.0-alpha-120809\lib\net40\System.Net.Http.Formatting.dll</HintPath>
</Reference>

I have tried altering the version there to 4.1.0.0 but to no avail (the same error message). Any idea what I should do next?

Upvotes: 0

Views: 1898

Answers (1)

Paul
Paul

Reputation: 12440

Try updating to:

<Reference Include="System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
  <HintPath>..\packages\Microsoft.AspNet.WebApi.Client.4.0.20505.0\lib\net40\System.Net.Http.Formatting.dll</HintPath>
</Reference>

If that does not work, reinstall Web API from NuGet.

Upvotes: 3

Related Questions