I am currently working on a Web API project where I have a single simple controller that works correctly. I created a Unit Test project to test my API's controller. The project references System.Net.Http (4.0.0.0) and System.Web assemblies as well as Microsoft ASP.NET Web API 2.2 Web Host NuGet package and all its sub-packages. When I run my first TestMethod it fails and throws an exception saying:
Could not load file or assembly 'System.Web.Http, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
I tried a lot of things but nothing seemed to solve my issue and there isn't a System.Net.Http with version 5.2.2.0 in References -> Assemblies. I am currently using Visual Studio Community Edition 2013. Thanks!
Aucun commentaire:
Enregistrer un commentaire