Migration from (.NET 2.0, 3.0 or 3.5) to .NET 4.0

I know CLRs change from version 2.0.50727 to v4.0. Can  CLR 4.0 run a DLL that was created using .NET Framework 2.0, 3.0 or 3.5? Or does tha DLL have to be recompiled using .NET Framework 4.0 or greater in order for CLR 4.0 to run the DLL.
metro156Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
mcmahon_sConnect With a Mentor Commented:
0
 
metro156Author Commented:
can a CLR 2.0.50727 application execute while referencing a .NET 4.0 DLL ?
Because I thought assemblies using .NET 4.0 or higher have a different format for its PE Header.?????? Therefore will not execute.
0
 
mcmahon_sCommented:
If you mean can you add a reference to a .NET 4 dll in your .net 2 project, then no. I personally haven't tried it but you could force your .net 2 application to run under .net 4 using the <supportedRuntime> version in your config which would then allow the .net 4 dll to be loaded via reflection.
0
 
metro156Author Commented:
Thank you
0
All Courses

From novice to tech pro — start learning today.