Reputation: 77
I'm writing my first library in .NET core and it works fine, but if I include it in another project it throws errors that the NuGet packages are missing ("Could not load file or assembly"). Is there any way to include them in the dll of my library or at least mark them as required so I don't have to run the application that is using the library multiple times to find out which packages are missing?
Thanks in advance
Upvotes: 3
Views: 1107
Reputation: 100
To get all the dependencies, in VS you can right click on the project and publish it. In the publish setting select the Publish Method to File System (so that you can collect your all dlls) and provide the target location and click on next. In next windows, select deployment mode as Self-Contained.
After publish process complete, you will find all the Dlls in the target location.
Upvotes: 2