'Reference a library which has only NuGet packages installed
Here is an interesting question.
I tried to install NuGet packages to a class library project and referencing it from different projects. However, after rebuilding it seems these different projects couldn't know the packages.
Isn't referencing to a project which has only NuGet packages installed supported?
Solution 1:[1]
Create a static class with a static method and in that method reference logic from each of the packages that you want to be included, just create an instance of a class and call ToString() on it. That way they are less likely to be optimised out of the build process.
The real question is why would you do this? Just make your own NuGet Package if you just want to groups them together. A NuGet Package can be empty, in the definition file just specify the dependencies.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Chris Schaller |
