这个问题从标题就很清楚了,但是让我详细解释一下。我刚刚完成了我的应用程序,我相信它是在.Net 4.0框架下编写的(见下图)。意识到需要使应用程序与甚至最早版本的.Net框架兼容后,我回去修改了Visual Studio属性窗口中的目标框架。不幸的是,这样做留下了一个痛苦的长列表警告和一个关键错误。我想知道是否有人有解决方案,可以让我编写的使用 .Net 4.0 框架的应用程序在运行 .Net 2.0 框架的环境中运行。
原始编译
错误列表:
谢谢,
Evan
编辑:
我知道对于我们大多数人来说第二张图片不完全可见,所以我会在下面列出错误:
Warning 9 The referenced component 'System.Xml.Linq' could not be found.
Warning 10 The referenced component 'System.Data.DataSetExtensions' could not be found.
Warning 8 The referenced component 'System.Core' could not be found.
Warning 11 The referenced component 'Microsoft.CSharp' could not be found.
Warning 4 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". Protection
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=v2.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". Protection
Warning 5 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". Protection
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=v2.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". Protection
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". Protection
Warning 6 The primary reference "Microsoft.CSharp", 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 "Microsoft.CSharp" or retarget your application to a framework version which contains "Microsoft.CSharp". Protection
Error 7 Could not load file or assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Line 123, position 5. C:\Users\FARINA_EVAN\Documents\Programming\C#\Run Time Crypter\Run Time Crypter\Properties\Resources.resx 123 5 Protection