[英]Visual Studio 2015: Could not resolve mscorlib for target framework
I am trying to update a service reference but I'm getting the following error:我正在尝试更新服务参考,但出现以下错误:
Could not resolve mscorlib for target framework '.NETFramework,Version=v4.0'.无法为目标框架“.NETFramework,Version=v4.0”解析 mscorlib。 This can happen if the target framework is not installed or if the framework moniker is incorrectly formatted.如果未安装目标框架或框架名字对象格式不正确,就会发生这种情况。
i opened the project file in a notepad editor and removed this.我在记事本编辑器中打开项目文件并将其删除。
Target Name="EnsureNuGetPackageBuildImports" /> bla bla bla目标名称="EnsureNuGetPackageBuildImports" /> bla bla bla
This can happen if you have a bad service reference configuration如果您的服务参考配置错误,就会发生这种情况
try the following尝试以下
In my project, the nuget packages were not being restored correctly due to some connectivity issues.在我的项目中,由于某些连接问题,nuget 包未正确恢复。 Once the nuget packages have been restored successfully, the error went away.一旦成功恢复了 nuget 包,错误就消失了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.