我们有一个现有的解决方案,包括一个 ASP.NET MVC
项目和一堆库,所有项目都以 .NET 4.6.1
为目标。
将 Visual Studio 从 15.3 升级到 15.5 后,我收到一些编译错误,指出它找不到 System.Net.Http
程序集。
The type 'HttpResponseMessage' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
我读了release notes但我找不到任何会导致这个问题的东西。为什么将 Visual Studio 从 15.3 升级到 15.5 会导致这些错误?
最佳答案
我猜你的问题与这里写的内容有关 https://developercommunity.visualstudio.com/content/problem/160241/errors-reported-when-none-exist.html因为看起来这都是关于项目引用的。请查看是否有建议的解决方案
Uncheck option "Allow parallel project initialization"
对你也有帮助。
顺便说一句,值得一提的是,15.5 更新显然给现有项目带来了其他严重问题,如此处所写 https://developercommunity.visualstudio.com/content/problem/160609/vb-option-strict-on-warnings-are-shown-on-existing.html
我希望所有这些都有助于解决您的问题或至少对其进行更深入的调查。
关于c# - 将 Visual Studio 升级到 15.5 后缺少 System.Net.Http,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47689711/