是否有可能引用面向.NET 4.5在4.0的目标一个项目的组件? [英] Is it possible to reference an assembly that targets .net 4.5 in a project that targets 4.0?
问题描述
我有一个MVC 3应用程序,面向.NET 4.0它有一个十几项目也瞄准了.NET 4.0
我已经建立了针对.NET 4.5,使用反射解决方案一个新的项目(有4.5的几个功能不错位,我想用)。当我尝试编译我得到一个错误说,类型或命名空间(新4.5 PROJ)找不到,是否缺少指令或程序集引用。
是否有可能有一个参考的目标4.0项目针对.NET 4.5的组件?
是否有可能有一个引用针对.NET 4.5的组件 在针对4.0的一个项目?
没有。它不应该是。有可能是被用来在.net 4.5组件,它不是.NET 4.0中的一部分,在这种特殊情况下,它应该会失败的某些功能。
I have a MVC 3 application that targets .net 4.0 It has a dozen or so projects also targeting .net 4.0
I have created a new project for the solution targeting .net 4.5 that uses reflection (there are a couple of nice bits of functionality in 4.5 that I want to use). When I try to compile I get an error saying that the 'type or namespace (new 4.5 proj) could not be found, are you missing a directive or an assembly reference'.
Is it possible to have a reference to an assembly targeting .net 4.5 in a project that targets 4.0?
Is it possible to have a reference to an assembly targeting .net 4.5 in a project that targets 4.0?
No. It shouldn't be. There could be some features that are used in .Net 4.5 assembly which are not part of .Net 4.0, In that particular case, it should fail.
这篇关于是否有可能引用面向.NET 4.5在4.0的目标一个项目的组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!