当我尝试在 .NET 4.6.1 项目中更新或配置服务引用时,VS 抛出下一个错误:
Could not resolve mscorlib for target framework '.NETFramework,Version=v4.6.1'. This can happen if the target framework is not installed or if the framework moniker is incorrectly formatted.
路径长度没问题,我还检查了另一个关于 SO 的答案,但没有任何效果。 也许有人有类似的东西?
最佳答案
我在 VS2019 上遇到同样的错误。
发生此错误是因为我从未恢复 nuget 包并构建解决方案。
在恢复 nuget 包并完全重建解决方案后,错误消失了!
关于c# - 无法解析目标框架 '.NETFramework,Version=v4.6.1' 的 mscorlib,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51724177/