我不得不将我的程序从 .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/