Hi all,
is it possible to call some methods of a class library developed with .net framework 4.0 in an application developed by using .net framework 2.0?
Many thanks,
Francesco
Printable View
Hi all,
is it possible to call some methods of a class library developed with .net framework 4.0 in an application developed by using .net framework 2.0?
Many thanks,
Francesco
As long as 4.0FW was installed... I don't see why not... Good question... never occurred to me. I've gone the other way, where a 3.5 object called into 2.0, and that worked, I guess I kind of assumed that it would work going upwards too... I'll have to try that later.
-tg
no it is not possible your manifest defines the version of the dlls that are required to run your application. If those dlls are not present the application will not run.
True... if FW4.0 isn't installed on the system, there shouldn't be an expectation that it would run.... BUT... if FW4.0 IS installed...
-tg
Yes of course, I have installed both .net 2.0 and .net 4.0.
My question is about the use of a .net 4.0 class library.
If I add a reference to that class library in a .net 2.0 application an error occurs.
Well, then that should be your answer right there. It would seem that the answer is "no, you can't."
Just out of curiosity, what is the error you get?
-tg
If I'm correct (not 100% sure), you can't run .NET 2.0 DLLs in your .NET 4 application because they use a different CLR. .NET 2.0 uses the CLR 2.0 and .NET 4 uses the CLR 4.
You can use .NET 3.5 in a .NET 2.0 app because .NET 3.5 also uses the CLR 2.0.