jonchicoine
jonchicoine

Reputation: 464

how can you target both .net 3.5 and 4.0 in same app?

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

Upvotes: 2

Views: 230

Answers (1)

Michael Liu
Michael Liu

Reputation: 55529

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.

Upvotes: 5

Related Questions