gpt4 book ai didi

visual-studio-2010 - 改变目标框架

转载 作者:行者123 更新时间:2023-12-04 07:44:05 30 4
gpt4 key购买 nike

在 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

最佳答案

尝试删除项目中的引用:

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

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

您可以通过展开引用树、突出显示引用并点击删除来做到这一点。

关于visual-studio-2010 - 改变目标框架,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5946654/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com