Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install Nuget package solution wide

I build a Nuget package that copies some sepcific files to a directory in my solution directory. The directory is not included in the Solution itself, it only stores some files which are to be used by some projects in my solution.

Now my problem ist that I have to choose the projects in which the package is to be installed. But I don't want it to be included in all of my projects as the only job of the package is to distribute files globally.

Is it not possible at all to install a Nuget package for the solution itself?

like image 681
Kaweoosh Avatar asked Nov 09 '16 13:11

Kaweoosh


1 Answers

Solution-wide packages have been deprecated, as explained in this comment:

We deprecated solution level packages in NuGet 3.0 and we don't plan to support them going forward.

There were plans on restoring them in the future, unfortunately these plans had been cancelled:

no plan to bring this back for now. Dotnet tools (available with 15.7 shortly) will bridge this gap. https://github.com/dotnet/cli/issues/5147#issuecomment-359836475

Workarounds include:

  • external scripts
  • a fake project that acts as a representative for the solution node on the project level
  • GetNuTool
like image 148
BartoszKP Avatar answered Nov 08 '22 11:11

BartoszKP