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

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

问题描述

大家好,


我正在运行VS 2017社区并尝试从我的github存储库打开一个文件,但收到此错误消息。 "无法解析mscorlib的目标框架'.NETFramework,Version = v4.0,Profile = Client'。如果未安装目标框架
或框架名字对象格式不正确,则会发生这种情况。"


任何帮助将不胜感激。谢谢。

解决方案

你好,


欢迎来到MSDN论坛。


你安装了.net framework 4.0吗?您可以使用此工具检查.NET Framework的完整性:
http://blogs.msdn。 com / b / astebner / archive / 2008/10/13 / 8999004.aspx  运行
选择了.NET 4.0的工具,然后检查工具日志的最后几行以获取测试应用程序返回代码。
如果返回代码不为0,框架已损坏且必须通过工具修复
https://www.microsoft.com/en-us/download/details.aspx?id=30135   first。


据我所知,Mscorlib是一个.Net组件。它位于"添加引用"的.NET选项卡中。根据您的错误消息,
它似乎与参考库有关 。我怀疑你试图在这个
文件中使用的'mscorlib'不是正确的版本。
如果有警告,请查看此项目下的references文件夹,   创建
a新项目并手动添加所有引用,然后重建它。构建过程恢复所有引用。
 这是一个复杂的方法,但它也是直接的方式
找到导致这个问题的具体参考。或者,请尝试从项目中删除旧项目,并设置对正在使用的.NET Framework的引用。


此外,我发现有些成员遇到过与你类似的情况,
"点击Explorer
下的项目名称(右键单击)属性 - 将.NET Framework 4客户端配置文件更改为.NET Framework 4。"


如果有任何更新,我们很高兴与您分享。


最好的问候



Hi everyone,

I am running VS 2017 Community and trying to open a file from my github repository but getting this error message. "Could not resolve mscorlib for target framework '.NETFramework,Version=v4.0,Profile=Client'. This can happen if the target framework is not installed or if the framework moniker is incorrectly formatted."

Any help would be greatly appreciated. Thanks.

解决方案

Hi mrhood,

Welcome to the MSDN forum.

Have you installed .net framework 4.0? you can check the integrity of your .NET Framework(s) with this tool: http://blogs.msdn.com/b/astebner/archive/2008/10/13/8999004.aspx Run the tool with .NET 4.0 selected, then check the last few lines of the tool log for the test app return code. If the return code is not 0, the framework is corrupt and must be repaired via tool: https://www.microsoft.com/en-us/download/details.aspx?id=30135 first.

As far as to my knowledge, Mscorlib is a .Net component. It's in the .NET Tab off of "Add Reference". based on your error message, it seems be related with reference library. I suspect that the 'mscorlib' you are trying to use from this file, is not the correct version. please have a look at the references folder under this project, if there has a warning, create a new project and manually adding all of the references back, then rebuild it. build process restores all the references. it is a complex method but it is also the direct way to find the specific reference that leads to this issue. Or Please try to drop the old one out of your project and set reference to the one for the .NET Framework you are working with.

Besides, i find some members have encountered similar situation as you, "Click on the project name (right click) property under Explorer - Change the .NET Framework 4 Client Profile to .NET Framework 4."

If any updates, we are pleased to share with you.

Best Regards

May


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

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