0
votes

I have a class Library project that reference third party dlls. but when i reference my class library as a thrid party (dll) in the other projects(developers), they got an error. Could not load file or assembly "Thrid party dlls that my class library project reference". My need is I want to give others my class library dll alone without giving them the dlls that it depends on. How can i achieve that?

1
Simple answer is: You can't, you'll have to provide these references too somehow. If you really don't want to provide the individual DLLs then one option would be to merge the different assemblies (dlls) into a single file using ILMerge as described in this Code Project article. But also be aware of the lincensing of other 3rd parties (as you might not be allowed to do that!)bassfader
You mean that i can't do thisyo2011

1 Answers

1
votes

If your DLL depends on some other DLLs, you can distribute your DLL alone, but nobody will be able to use it without adding the correct dependencies.

This is for instance what Nuget does. You compile your DLL with a specific Nuget Package in mind. Distribute your DLL only and tell the users of your DLL to add the correct Nuget packages on their end.