When creating a new library MyAPI.dll
, I am referencing many other (non-standard) libraries such as RestSharp.dll
, Newtonsoft.dll
,MyUtilities.dll
, etc. My library works fine in my development environment because I've downloaded all of those other libraries and they're sitting in my project's bin folder, but as soon as I try to publish that library and use it in a new location, it fails because the referenced libraries cannot be found.
How to I set up my MyAPI.csproj
project so that these dlls/libraries get packaged into my published .dll
file, and future users of MyAPI.dll
don't have to worry about downloading and referencing those dependencies?
Thought this would be simple, but my google-fu is weak today. Setting those external references to CopyLocal = False
removes them from the /bin/
directory, giving the illusion that they are getting packaged into MyAPU.dll, but really Visual Studio is just adding them to my Global Assembly Cache (GAC), which doesn't help future users of the API.