tags:

views:

113

answers:

6

Hi All,

I am migrating to .net 3.5 and I want to know whether I can call from my 3.5 application, old .net 2.0 dll's methods?

Some external API's are in .net 2.0 dll. So I need those.

Kindly let me know. Thanks.

+11  A: 

Yes. You can do that.

Krunal
A: 

Yes.
Genrally, you can run .Net 2.0 applications on a computer with newer versions of .Net, and using a DLL isn't different.

Kobi
+2  A: 

Yes, .NET remains compatible with old versions. There might be some obsolete code but it will still work. Only before 2.0 there can be compatibility issues.

MrFox
And after 3.5 there are issues again as .net 4 introduced a new CLR. So we have 3 CLRs: .net 1.1, 2.0/3.0/3.5 and 4.0
Michael Stum
However, even though 4.0 introduces a new CLR, 2.0 assemblies generally work in 4.0 too - though you may need to tweak the app's config file if they contain native code/interop.
Eamon Nerbonne
+3  A: 

.NET 3.5 is nothing more than .NET 2.0 SP2 with some additional assemblies. This means that .NET 3.5 is .NET 2.0, to a large extent.

John Saunders
Yeah, the version names aren't the best...
Eamon Nerbonne
A: 

Sure, both are managed code soit should work as calling .net 3.5 assembly.

Michel Tol
A: 

Thanks a lot for your help.

Jai