c# .net Adsense ADO.NET Linq Viruses/security asp.net MVC JQuery Angular-js Node-js SEO Java C++ SQL API Networking vb.net .Net Css JavaScript Generics c#.Net entity framework HTML Website host Website Construction Guide HTTP tutorial W3C tutorial Web Services JSON Psychology Ionic framework Angular ReactJS Python Computer Android
asp.net MVC

Compile time error, System.Web.HttpCors which has referenced higher version then reference assembly System.Web.Http

| | ASP-NET , MVC , web

I created the project in MVC5 web api for ionic mobile plateform and added several nuget package. I got this error code CS1705 and the below error description when I compiled the project. 

Assembly 'System.Web.Http.Cors' with identity 'System.Web.Http.Cors, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' uses 'System.Web.Http, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Http' with identity 'System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

Solution:

We need to reference the same version as of System.Web.Http for System.Web.Http.Cors.

Run the following nuget package command in PM (Package Manager),

Install-Package Microsoft.AspNet.Cors -Version 5.2.3.0

After installing package my application smoothly.