tags:

views:

80

answers:

2

I feel like this is a dumb question and I'm missing something, but I haven't even figured out how to search for this one :(

Can an application written to target the .Net 3.5 Framework utilize libraries that were written in the 2.0 Framework?

Additional information in the answer such as the "why" and/or how this information was found would be helpful!

+1  A: 

Yes, it can, .Net framework 2.0, 3.0 and 3.5 all under the cover share the same CLR 2.0, which means the assemblies are all loaded by the same CLR and are binary compatible.

Pop Catalin
+3  A: 

Yes you can. The underlying runtime hasn't changed, it's still CLR v2.0 and c#3 still compiles to 2.0 MSIL which is executed on the 2.0 CLR. Also ASP.NET is still effectively at version 2.0 because the core underpinnings of that haven't changed (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll).

.NET 3.5 is an additive framework update, not a replacement. You will still be using v2.0 portions of the BCL and FCL at the same time as using 3.0 and 3.5.

Update: Just in case you're interested, I asked a question a while back about 2.0 code consuming 3.5 assemblies which is the other way round:

http://stackoverflow.com/questions/9508/c-20-code-consuming-assemblies-compiled-with-c-30

Hope that helps
Kev

Kev