Questions tagged [nuspec]

A Nuspec file is used in the generation of Nuget packages. It can be used to specify meta data about the package, to define a package's dependencies, and to specify which files should be packaged.

253 questions
10
votes
1 answer

Dependencies in Nuspec vs. csproj

I have a Dotnet Core 2.1 project which has both a nuspec and a csproj file - one major hassle is that the csproj describes dependencies like this:
Christian Sauer
  • 10,351
  • 10
  • 53
  • 85
10
votes
2 answers

dotnet pack "The element is unrecognized"

Im trying to create a NuGet package of a dotnet new template. I created a nuspec file to set the details of the package, and it sits adjacent to my contents foler, which contains everything I want packaged up:
Ethan Schofer
  • 1,718
  • 5
  • 26
  • 55
10
votes
1 answer

Are the conventions for formatting descriptions in nuspec files documented somewhere?

I've looked around and can't find where the conventions for formatting the description field in a nuspec file are documented. I can see that you can at least add paragraphs but I don't know how it is done and would like to know if there is anything…
Beth Lang
  • 1,889
  • 17
  • 38
10
votes
1 answer

NuGet exclude files from symbols package in nuspec

When doing a nuget pack against a .csproj file that has an accompanying .nuspec file, what is the syntax for excluding certain files from the symbols .nupkg? For clarity, I do not want to exclude these files from the normal .nupkg, just from the…
grenade
  • 31,451
  • 23
  • 97
  • 126
9
votes
2 answers

Where should I put the nuspec file

I've searched the entire stackoverflow community but I couldn't find an answer for this... I have a .nuspec file and I have no idea where I have to put it. Some topics say that I have to put it in the project directory and include in version…
no-stale-reads
  • 177
  • 1
  • 1
  • 11
9
votes
4 answers

how to create nuspec file in specific folder?

I tried to create .nuspec file in a different folder by giving path but it is giving me error Nuget.exe spec ..\MYDEMOFOLDER Nuget.exe pack ..\MYDEMOFOLDER\MYPROJECT.csproj pause want to create MYPROJECT.nuspec in ..\MYDEMOFOLDER folder…
Neo
  • 15,491
  • 59
  • 215
  • 405
9
votes
4 answers

How to get Octopack to use custom .nuspec file?

The documentation seems to be really incomplete. All it says is that you can use your own .nuspec file, but it makes no mention of where you're supposed to put it, or how to get octopack to use…
matthew_360
  • 5,901
  • 9
  • 32
  • 40
8
votes
1 answer

Msbuild v15 can't resolve the variables of metadata of nuspec file

I know Since the release of msbuild 15 (vs 2017) that NuGet is now fully integrated into MSBuild. I have a nuspec file with defining variables of package properties like: $id$ $version$
M.Hassan
  • 10,282
  • 5
  • 65
  • 84
8
votes
1 answer

Packing static content in Nuget for PackageReferece projects

I have a Class Library (net47) project and I'd like to pack into a nuget my dll and several files of static content (js, css, images...). I want to use this dll and the content from the consumer projects. These projects will be MVC PackageReference…
Alpha75
  • 2,140
  • 1
  • 26
  • 49
8
votes
2 answers

How to automatically update nuget package dependency?

I have have two packages \ projects "A" and "B". Where "B" is depending on "A" and use it as a reference. When my build process in TFS is building "A" it's creating a nuget package from the nuspec and giving it a new version and put's it on my TFS…
Aviram Fireberger
  • 3,910
  • 5
  • 50
  • 69
8
votes
1 answer

Hyperlink in the description of the NuGet package in .nuspec

I'm developing a NuGet package and keep it open source at github.com My package after installation requires a few configuration steps to be done in VS solution, and I document this in README.md file on github. I'd like to reference this README.md…
Ivan
  • 9,089
  • 4
  • 61
  • 74
8
votes
1 answer

How to specify configuration-specific folder in nuspec

The examples I've seen specify files to be included using a path relative to the location of the nuspec file, e.g.: Is there a way to specify this in such a way that it will use the appropriate…
Joe
  • 122,218
  • 32
  • 205
  • 338
8
votes
1 answer

Create a nuspec from csproj with GUI

I have a C# project which has a 2 Project References from projects within my Solution. It also has 5 NuGet package references from packages in my NuGet repository. Given the .csproj, How can I generate or create the nuspec file using NuGet Project…
GilliVilla
  • 4,998
  • 11
  • 55
  • 96
8
votes
1 answer

Optional or conditional folders in NuGet files tag?

I would like to do something that MsBuild has: set up conditions the files referenced in .nuspec file. Basically it would look like this:
CssaBee
  • 95
  • 6
8
votes
3 answers

Auto update the nuspec file during the build process

I have been able to use NuGetter to create a build definition to automate the NuGet package creation process and to upload the package to the NuGet repository. But, I would like to automate the process even further. The following is a list of steps…
H A
  • 1,251
  • 2
  • 24
  • 39
1
2
3
16 17