Sahil Sharma
Sahil Sharma

Reputation: 4247

Assembly 'System.Web.Http.Cors, 5.2.3.0 uses 'System.Web.Http, 5.2.3.0' which has higher version than referenced assembly 'System.Web.Http, 5.1.0.0

When i am installing FluentValidation.WebApi (through package manager console command "Install-Package FluentValidation.WebAPI") to my c# project, i get following error:

Assembly 'System.Web.Http.Cors, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' uses 'System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Http, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' d:\Code\companyname\libs\System.Web.Http.Cors.dll companyname.Service

What should i do to get rid of this? I have production project and i don't want to update anything that might impact any other controller or module. So i want some completely safe solution?

I noted very interesting thing. Before installing FluentValidation.WebApi, my project's references had System.Web.Http version 5.2.3.0. But once i install this package (FluentValidation.WebApi), the System.Web.Http version changes to 5.1.0.0.

Upvotes: 0

Views: 3166

Answers (1)

Douglas Wiley
Douglas Wiley

Reputation: 523

The package you installed introduced dependencies to MVC 5.2.3.0 dll's. The path I take is to update the MVC project prior to any other package installs:

Install-Package Microsoft.AspNet.Mvc -Version 5.2.3

https://www.nuget.org/packages/microsoft.aspnet.mvc

Upvotes: 0

Related Questions