你怎么能在同一个应用程序中同时针对.net 3.5和4.0?(how can you target both .net 3.5 and 4.0 in same app?)

编程入门 行业动态 更新时间:2024-10-28 06:28:24
你怎么能在同一个应用程序中同时针对.net 3.5和4.0?(how can you target both .net 3.5 and 4.0 in same app?)

我准备升级我们的devexpress库。

我注意到他们说他们的最新版本是用.net 3.5构建的,支持3.5+。 嗯......怎么可能,3.5使用clr 2.0,4.0使用4.0(当然)......看看他们的一个dll中的清单你可以看到它的引用.net 2.0库...所以如何你会建立一个dll,它也可以在只有.net 4.0(如果用3.5构建)的系统上运行。

我知道有一个选项你可以放在一个应用程序配置文件,让它以更高的框架为目标,但我想我错过了某些......

我已直接通过电子邮件发送给他们,但尚未收到回复。

谢谢,乔纳森

Am prepapring to upgrade our devexpress libs.

I noticed that they say their latest release is built with .net 3.5 and supports 3.5+. Well... how is that possible, 3.5 uses the clr 2.0, and 4.0 used 4.0 (of course)... looking at the manifest in one of their dlls you can see it's references .net 2.0 libs... so just how would you build a dll that will also happily run on a system that only has .net 4.0 (if built with 3.5).

I am aware there is an option you can put in an app config file to let it target a higher framework, but i assume i'm missing somehting....

i have emailed them directly, but haven't heard back yet.

thanks, jonathan

最满意答案

引用.NET 2.0程序集的DLL在.NET 4.0中运行良好。 由于程序集统一 ,运行时将自动将引用重定向到相应的.NET 4.0程序集。

我认为“支持3.5+”意味着他们已经在.NET 4.0中测试了他们的代码。

DLLs that reference .NET 2.0 assemblies will run just fine in .NET 4.0. Due to assembly unification, the runtime will automatically redirect the references to the corresponding .NET 4.0 assemblies.

I assume that "supports 3.5+" means that they've tested their code in .NET 4.0.

更多推荐

本文发布于:2023-08-07 19:04:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1465702.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:你怎么   能在   应用程序   net   app

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!