Edward
Edward

Reputation:

How to avoid .dll dependencies under .NET

I am writing a C++/CLI which have access/"dependencies" to many DLL COM and DLL .NET libraries.

Is this possible to link/join all these libraries into my C++/CLI program and generate only one executable object in such a way that I never again have to consider these dependencies every time I have to move my object to another computer?

Thanks!!!

Upvotes: 0

Views: 544

Answers (1)

Tim Robinson
Tim Robinson

Reputation: 54764

ILMerge is an option for collapsing several managed assemblies into one: ILMerge Best Practices

However ILMerge might not be an option:

  • You can't merge the COM DLLs without having source code to them
  • Since you mentioned COM, I'm guessing that your C++/CLI program isn't pure IL: ILMerge won't touch assemblies like this that contain native code. (If your C++/CLI program uses COM through COM interop, and it's otherwise pure .NET, you should be OK.)

Upvotes: 3

Related Questions