为什么目标FW为2的项目在VS2008中可以使用3.0/3.5程序集? [英] Why can the project whose target FW is 2 use 3.0/3.5 assemblies in VS2008?

查看:57
本文介绍了为什么目标FW为2的项目在VS2008中可以使用3.0/3.5程序集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

感谢您阅读我的帖子.

我在目标FW为.NET FW 2.0的VS2008项目中更新了一个dll.

I updated a dll in a VS2008 project whose target FW is .NET FW 2.0.

更新后的dll取决于WindowsBase.dll和System.Core.dll.

The updated dll depends on WindowsBase.dll and System.Core.dll.

然后,更新的项目可以正确运行.我可以在VS2008的模块"窗口中找到WindowsBase.dll和System.Core.dll.

Then, the updated project can run correctly. I can find WindowsBase.dll and System.Core.dll in Modules window of VS2008.

这是VS2008的正确行为吗?当目标FW为2.0时,如何禁止VS2008使用3.0/3.5程序集?

Is this a correct behavior of VS2008? How can I forbidden VS2008 to use 3.0/3.5 assemblies when target FW is 2.0?

推荐答案

 

诺埃尔,

 

Hi Noel,

 

首先,您可以看到 链接,其中描述了".NET Framework的新增功能".

Firstly, you can see this link which describes "What's New in .NET Framework".

 

实际上,FW 3.0添加了WCF& WPF& WF& WCS的新功能,FW3.5添加了LinQ.但是FW 2.0和FW 3.0都使用CLR 2.0.这就是为什么项目可以成功加载针对FW 3.0的更新程序集的原因. 如果您不使用FW 3.5的新功能,则可以将更新的程序集更改为以FW 2.0为目标,这样您就不会收到警告.

Actually, FW 3.0 adds new features of WCF&WPF&WF&WCS, FW3.5 adds LinQ. But both FW 2.0 and FW 3.0 use the CLR 2.0. That is why project can load updated assembly which targets FW 3.0 successfully. If you don't use new features of FW 3.5, you can change updated assembly to target FW 2.0 so that you won't get the warning.

 

具有

Have  a nice day!


这篇关于为什么目标FW为2的项目在VS2008中可以使用3.0/3.5程序集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆