Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing the .Net 4.0 Com from .Net 1.1 Project [duplicate]

I have external .net library compiled with .net framework 4 (it's provider moved recently to .net 4) My code currently runs on .net framework 3.5 How to use that external library in my application ? Moving whole application to .net 4 needs time and testing, so maybe in a future i will do that, but now, what are the possibilities ?

like image 403
alan Avatar asked Nov 17 '25 17:11

alan


1 Answers

There are no possibilities, the CLR version that comes with .NET 3.5 cannot load 4.0 assemblies. The metadata format was changed. You have to force your app to use the .NET 4.0 CLR version. Do so by recompiling it with VS2010, targeting 4.0, or by using a .config file that contains the <requestedRuntime> element to ask for "v4.0".

Compatibility for .NET 4.0 is excellent btw.

like image 79
Hans Passant Avatar answered Nov 21 '25 10:11

Hans Passant



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!