0

I want to add items (not projects) to a solution via a NuGet, but I have created a Nuspec file with the following files elements:

<files>
    <file src="..\A.txt" target="content" />
</files>

But the file A.txt is added to the project not solution. So I want to know is there any way to add the file to solution level not the project level?

David.L
  • 101
  • 3
  • 6

1 Answers1

0

So I want to know is there any way to add the file to solution level not the project level?

I am afraid there is no such direct way to do that. Because NuGet team deprecated solution level packages in NuGet 3.0.

So, at this moment, the nuget is package manager for project level, we could not add the file to solution level directly .

However, you can do this by install.ps1 file. Matt provided the PowerShell script in following thread, you can refer to:

Adding solution-level items in a NuGet package

Hope this helps.

Leo Liu
  • 71,098
  • 10
  • 114
  • 135