无法为目标框架'.NETFramework,Version = v4.5'解析mscorlib. [英] Could not resolve mscorlib for target framework '.NETFramework,Version=v4.5'.

查看:220
本文介绍了无法为目标框架'.NETFramework,Version = v4.5'解析mscorlib.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我要在Windows 10上的VS 2012中对Visual Studio 2012项目进行一些维护工作,在尝试构建项目时会出现一些令人费解的引用错误,但最严重的是VS无法找到.NET 4.5.

I'm dropping into some maintenance work on a Visual Studio 2012 project, in VS 2012 on Windows 10. There are several puzzling errors with references when attempting to build the project, but the most severe is that VS can't find .NET 4.5.

我在主要项目属性下的资源",服务",设置"部分看到此错误(或其他类似错误):

I'm seeing this error (or another just like it) on the 'Resources', 'Services', 'Settings' sections under the main project properties:

"无法解析目标框架'.NETFramework,Version = v4.5'的mscorlib. 如果未安装目标框架,或者框架标记的格式不正确,则可能会发生这种情况."

"Could not resolve mscorlib for target framework '.NETFramework,Version=v4.5'.  This can happen if the target framework is not installed or if the framework moniker is incorrectly formatted."

我的理解是.NET 4.5被引入到Win 10中,所以这是如何发生的事,对我来说完全是个谜.手动检查解决方案和项目文件没有发现任何线索.

My understanding is that .NET 4.5 is baked into Win 10, so it's a total mystery to me how this is happening. Manually inspecting solution and project files has not revealed any clues.

任何建议都会有所帮助!

Any advice would be helpful!

推荐答案

欢迎访问MSDN论坛.

根据错误消息,它看起来与.NET Framework 4.5有关,我建议您使用.NET Framework安装程序验证工具验证NET Framework 4. http://blogs.msdn.com/b/astebner/archive/2008/10/13/8999004.aspx . 一旦发现任何问题,请使用.NET Framework修复工具: https://www.microsoft.com/en-us/download/details.aspx?id=30135 到 维修.

According to the error message, it looks like related with the .NET Framework 4.5, I recommend you verify the NET Framework 4. with the .NET Framework setup verification tool: http://blogs.msdn.com/b/astebner/archive/2008/10/13/8999004.aspx. Once it finds any issue, please use .NET Framework Repair Tool: https://www.microsoft.com/en-us/download/details.aspx?id=30135to repair.

同时,请查看该项目下的references文件夹,如果有警告,请删除此引用并重新添加.

顺便说一句,当您在VS 2012中构建任何类型的项目时,是否遇到此问题? /span>

BTW, did you meet this issue when you build any type projects in VS 2012?

最好的问候,

Sara


这篇关于无法为目标框架'.NETFramework,Version = v4.5'解析mscorlib.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆