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.
Post your comments / questions
Recent Article
- How to programmatically modifying the AppSetting value in web.config using c#?
- TypeError [ERR_INVALID_CALLBACK]: Callback must be a function. Received undefined
- How to calculate the age from jQuery ui datepicker using c#?
- How to calculate days difference between two dates in c#?
- Changing date format in jQuery ui datepicker
- How to set value to nicedit textarea using jQuery?
- How to load data from json file in angular?
- cannot find module consider using '--resolvejsonmodule' to import module with json extension angular
Related Article