改变目标框架

发布于 2024-11-05 18:50:27 字数 2793 浏览 0 评论 0原文

在 Visual Studio 2010 Express [VB.NET] 中,如果我通过“应用程序属性”>“更改目标框架”编译>从 4.0 到框架 2.0 的高级编译选项,我得到了一个错误列表:

Warning 5   The referenced component 'System.Xml.Linq' could not be found.  
Warning 6   The referenced component 'System.Data.DataSetExtensions' could not be found.    
Warning 4   The referenced component 'System.Core' could not be found.  
Warning 2   The primary reference "System.Xml.Linq", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "System.Xml.Linq" or retarget your application to a framework version which contains "System.Xml.Linq".   WindowsApplication3
Warning 3   The primary reference "System.Data.DataSetExtensions", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "System.Data.DataSetExtensions" or retarget your application to a framework version which contains "System.Data.DataSetExtensions". WindowsApplication3
Warning 1   The primary reference "System.Core", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "System.Core" or retarget your application to a framework version which contains "System.Core".   WindowsApplication3
Warning 7   Namespace or type specified in the project-level Imports 'System.Xml.Linq' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.   WindowsApplication3
Warning 8   Namespace or type specified in the project-level Imports 'System.Linq' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.   WindowsApplication3

我已经四处搜索,但是,我似乎找不到我认为对我有用的答案。我只是使用一个空白项目,上面什么都没有。


Warning 1   Namespace or type specified in the project-level Imports 'System.Xml.Linq' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.   WindowsApplication3
Warning 2   Namespace or type specified in the project-level Imports 'System.Linq' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.   WindowsApplication3

In Visual Studio 2010 Express [VB.NET], if I change the target framework via Application properties > compile > advanced compile options to framework 2.0 from 4.0, I get a list of errors:

Warning 5   The referenced component 'System.Xml.Linq' could not be found.  
Warning 6   The referenced component 'System.Data.DataSetExtensions' could not be found.    
Warning 4   The referenced component 'System.Core' could not be found.  
Warning 2   The primary reference "System.Xml.Linq", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "System.Xml.Linq" or retarget your application to a framework version which contains "System.Xml.Linq".   WindowsApplication3
Warning 3   The primary reference "System.Data.DataSetExtensions", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "System.Data.DataSetExtensions" or retarget your application to a framework version which contains "System.Data.DataSetExtensions". WindowsApplication3
Warning 1   The primary reference "System.Core", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "System.Core" or retarget your application to a framework version which contains "System.Core".   WindowsApplication3
Warning 7   Namespace or type specified in the project-level Imports 'System.Xml.Linq' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.   WindowsApplication3
Warning 8   Namespace or type specified in the project-level Imports 'System.Linq' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.   WindowsApplication3

I have searched around, yet, I can't seem to find an answer that I think would be of use to me. I am just using a blank project with nothing on it.


Warning 1   Namespace or type specified in the project-level Imports 'System.Xml.Linq' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.   WindowsApplication3
Warning 2   Namespace or type specified in the project-level Imports 'System.Linq' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.   WindowsApplication3

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

空城仅有旧梦在 2024-11-12 18:50:27

尝试删除项目中的引用:

System.Xml.Linq
System.Data.DataSetExtensions
System.Core

它们是由 VS2010 Express 自动添加的。

您可以通过展开引用树、突出显示引用并点击删除来完成此操作。

Try removing the references in your project(s) to:

System.Xml.Linq
System.Data.DataSetExtensions
System.Core

They are added automatically by VS2010 express.

You can do that by expanding the references tree, highlighting the reference and hitting delete.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文