Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the differences between managed and unmanaged libraries?

Can you tell me what changes between libraries external managed and unmanaged? is the exact same thing between managed and unmanaged code?

like image 671
missenna Avatar asked Jan 18 '26 14:01

missenna


1 Answers

Yes, a managed library contains .NET code (also called an assembly), an unmanaged library contains native code of some sort (C++, VB6 or similar).

External usually means that you didn't compile it yourself but use a 3rd party component.

To check whether as assembly is managed or not,

  • I open it in dotPeek. If it is .NET, it will say something like "msil", otherwise "not supported".
  • Another option is ILSpy, which will say "This file does not contain a managed assembly."
  • The tool ILDASM comes with the Windows SDK and says "no valid CLR header" in case of native assemblies.
  • You could also see if it has mscoree (.NET) as a dependency
like image 153
Thomas Weller Avatar answered Jan 20 '26 06:01

Thomas Weller



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!