.Net 3.0 项目与.Net4.0项目之间互相引用的问题.

最佳答案:

Yes it is a problem. Much like you can't add a reference to a .NET 2.0 assembly from a .NET 1.0 or 1.1 project. The .NET 4.0 is a new runtime version of the framework (CLR). The .NET 3.5 and 3.0 releases both use the 2.0 runtime version of the framework (CLR).

You can always add a reference from an assembly built with a newer runtime to an assembly with an older runtime, but not the other way around.

From .NET 2.0 (3.0 and 3.5):
* Can reference .NET 2.0 (3.0 and 3.5) assemblies
* Can NOT reference .NET 4.0 assemblies

From .NET 4.0:
* Can reference .NET 4.0 assemblies
* Can reference .NET 2.0 (3.0 and 3.5) assemblies


原文: http://stackoverflow.com/questions/2557987/why-does-adding-a-reference-to-project-targeting-net-framework-4-0-fail

 

另外, 如果是WF3.0向WF4迁移, 那就另当别论了, 命名空间都变了.

posted on 2011-05-03 17:58  BobLiu  阅读(1396)  评论(0编辑  收藏  举报