【发布时间】:2011-11-17 06:48:22
【问题描述】:
这个问题单看标题就应该很清楚了,但让我更详细地解释一下。我刚刚在 .Net 4.0 框架中编写完我的应用程序(见下图)。在意识到我需要我的应用程序与最早版本的 .Net 框架兼容后,我返回并更改了 Visual Studio 的“属性”窗口中的目标框架。不幸的是,这样做给我留下了一长串令人痛苦的警告——以及一个严重错误。我很好奇是否有人对如何让我的应用程序(使用 .Net 4.0 框架编写)在运行 .Net 2.0 框架的环境中运行有一些解决方案。
原创编译
错误列表:
谢谢, 埃文
编辑:
我知道第二张图片对我们大多数人来说并不完全可见,所以我将在下面发布错误:
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
【问题讨论】:
-
通过重新编码以排除任何 4.0 特定功能。唉,我认为这里没有捷径。
-
如果您右键单击并选择查看图像,图像实际上是非常可见的。