gpt4 book ai didi

C# 从 .NET 3.5 转换为 3.0

转载 作者:行者123 更新时间:2023-12-02 05:43:17 25 4
gpt4 key购买 nike

我不得不将我的程序从 .NET 3.5 降级到 3.0。我所做的是转到 properties->application 并将“目标框架”从 3.5 更改为 3.0。这是正确的步骤吗?现在我收到警告:

我只有这个

using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;
using System.IO;

但我还是明白了

Warning 1 The primary reference "System.Core", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v3.0". To resolve this problem, either remove the reference "System.Core" or retarget your application to a framework version which contains "System.Core". ProgName1

Warning 2 The primary reference "System.Xml.Linq" could not be resolved because it has an indirect dependency on the framework assembly "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v3.0". To resolve this problem, either remove the reference "System.Xml.Linq" or retarget your application to a framework version which contains "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". ProgName1

Warning 3 The primary reference "System.Data.DataSetExtensions" could not be resolved because it has an indirect dependency on the framework assembly "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v3.0". To resolve this problem, either remove the reference "System.Data.DataSetExtensions" or retarget your application to a framework version which contains "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". ProgName1

Warning 4 The primary reference "System.Xml.Linq", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v3.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". ProgName1

Warning 5 The primary reference "System.Data.DataSetExtensions", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v3.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". ProgName1

最佳答案

警告告诉您这五个程序集是 .Net 3.5 的新程序集,不能从 .Net 3.0 中引用。
只需删除这些引用即可。

关于C# 从 .NET 3.5 转换为 3.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10657500/

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