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.
Questions tagged [nuspec]
253 questions
4
votes
1 answer
NuGet: explicitly list package dependencies as package references in project so they can be uninstalled
I'm creating a NuGet package (let's call it Lib) that also has analyzers in a separate package (Lib.Analyzers).
By default I want Lib.Analyzers to be installed to the the project when Lib is installed. I can achieve this by listing Lib.Analyzers in…

Good Night Nerd Pride
- 8,245
- 4
- 49
- 65
4
votes
1 answer
How to include resx file in a Nuget package
I have a .Net Framework 4.6.1 project from which I make a nuget package. This nuget package simply installs 2 dlls and a couple of content files which is working fine.
The problem is that I now added resource string via a resx file that resides…

dhi
- 43
- 3
4
votes
1 answer
multi-platform native libraries in C# nuspec
We have a C# project (.net Core) which is cross-platform. It uses native libraries (C++), which are different for each platform.
We know that you can specify different frameworks in a single nuspec file, but this case is different:
There will be a…

Jaime
- 5,770
- 4
- 23
- 50
4
votes
1 answer
Excluding files from nuget package while including all
This question is similar but doesn't quite help me.
I'm using the following tag to try to add all files except for one folder, but it's not working.
** successfully copies all folders and contents, but…

DLeh
- 23,806
- 16
- 84
- 128
4
votes
1 answer
Can I use multiple wildcards in .nuspec file paths?
I am attempting to collect a series of Razor views into a NuGet package using .nuspec elements. My project structure is non-standard, however, for reasons I won't get into, I cannot change it.
Here's my project structure:
* Project
* Bar
…

Derek Hunziker
- 12,996
- 4
- 57
- 105
4
votes
2 answers
What is max length of summary and description for a Nuget package?
This Nuspec reference explains the description and summary text fields: https://docs.nuget.org/create/nuspec-reference
In regards to the summary it says it is
A short description of the package. If specified, this shows up in the middle pane of…

jakejgordon
- 4,008
- 7
- 36
- 45
4
votes
2 answers
When does OctoPack create the nuspec file?
The Using OctoPack mentions
A .nuspec file describes the contents of your NuGet package. OctoPack automatically creates one if you haven't provided one, by guessing some of the settings from your project.
I've run msbuild with the…

StuperUser
- 10,555
- 13
- 78
- 137
4
votes
2 answers
NuGet - adding group dependencies in .nuspec file when using the "Create New NuGet Package after each build" package
I am using the "Create New NuGet Package from project after Each Build" NuGet package by Daniel Schroeder to automatically create NuGet packages from my projects via Visual Studio 2013. I am running into a problem when group dependencies are…

Suchitha Joseph
- 41
- 1
- 3
4
votes
1 answer
How to exclude a subdirectory and contents from a nuget package
So I've a website that I'm trying to package for Octopus Deploy.
I've the following folder structure:
Web
|
Views
|
WantThis
Dontwantthis
WantThis1
WantThis2
... (lots more)
Scripts
I'm…

jaywayco
- 5,846
- 6
- 25
- 40
4
votes
1 answer
Is there an automated way to generate NuGet package ready for publishing to nuget.org from VS project
When I have a .csproj class library project, it already has some NuGet Dependencies and output files. (At least ProjectName.dll).
I've learned that I need to create a .nuspec file (as one of the steps) in order to publish the NuGet Package to a…

Maxim V. Pavlov
- 10,303
- 17
- 74
- 174
4
votes
2 answers
NuGet Pack .nuspec file returns "The replacement token 'version' has no value."
This is the error I got while trying to pack a project in Visual Studio 2013:
PM> NuGet Pack C:\ITVizion\RTVizion\ITVizion.RTVizion.Service\ITVizion.RTVizion.Service.nuspec -Prop Configuration=Release
Attempting to build package from…

Leniel Maccaferri
- 100,159
- 46
- 371
- 480
4
votes
1 answer
Creating Multiple Nuspec files
I am currently trying to publish a load of nuget packages for all the projects in this solution. The projects are setup in a simple tree, with Myre being the base project and everything depending on it:
Myre <- Myre.Debugging <- Myre.Debugging.UI <-…

Martin
- 12,469
- 13
- 64
- 128
4
votes
2 answers
generate nuspec file for solution?
Our situation might not be ideal, but we have a solution with about 10 core libraries which have various dependencies. Were trying to move to Nuget to get this solutions dependencies as well as package the libraries in this solution into a Nuget…

Andy
- 8,432
- 6
- 38
- 76
4
votes
3 answers
Nuget Package - Web.config.transform Add
I'm creating a NuGet package and want it to update the web projects Web.Config file with certain settings. I am using the web.config.transform to edit the web.config file of an application. It's working well when I simply add appSettings - like…

Deano
- 2,805
- 3
- 29
- 42
3
votes
2 answers
Can the Albacore nuspec task resolve all dependencies automatically?
Can the Albacore nuspec task resolve all needed dependencies for a solution? When I have several projects with changing dependencies it takes a lot of effort to keep the rakefile up to date. Can this be automated?
desc 'create the nuget…

Stephan
- 1,639
- 3
- 15
- 26