missenna
missenna

Reputation: 97

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?

Upvotes: 3

Views: 9725

Answers (1)

Thomas Weller
Thomas Weller

Reputation: 59258

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

Upvotes: 6

Related Questions