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
3
votes
1 answer
How can I deploy a PS1 script with a nuget package
I have a PS1 script that I use in all my projects to sign the assemblies. Until now I copied this file over to all my projects. Now I wanted to create a nuget package with the PS1 file.
I created a nuspec file and put the file in "content".…

Martini Bianco
- 1,484
- 1
- 13
- 23
3
votes
1 answer
How to modify .nuspec file before NuGet pack in Visual Studio
Visual Studio makes creating NuGet packages easier these days by automating the process of creating the .nuspec file. It means that version dependencies etc. are automatically created and you can simply set up the textual values here:
So, most of…

Christian Findlay
- 6,770
- 5
- 51
- 103
3
votes
2 answers
Importing simple custom NuGet package with error: Package does not support any target frameworks
I created a .NET framework class library targeting 4.6.1 .NET Framework. The project contains one .cs class and no external references to any libraries, DLLs, or NuGet packages. Here is the nuspec:

chrisbuttacavoli
- 183
- 3
- 11
3
votes
3 answers
Create a Nuget package without its dependencies to be added as references
I need to create a Nuget package out of my library .net framework project.
The problem is that my project depends on many other dlls which I do not want my Nuget users to see. So I want people to install my package and see only my project dll in the…

Michael Mualem
- 31
- 1
- 4
3
votes
1 answer
nuspec dependency allowedVersions?
I have a nuspec file that builds a nuget-package. I would like to control the dependencies, where I allow a range of versions, but what to always install a spesific version.
Basically this (not valid syntax):

Gaute Odin Alvestad
- 47
- 5
3
votes
1 answer
How can the NuGet Documentation section be used?
As of lately, I see that the NuGet package pages include a Documentation section:
In all packages that I've checked, though, the only contents of that section is a seemingly expandable Show more item, which, when expanded, reveals to sport no…

F-H
- 663
- 1
- 10
- 21
3
votes
1 answer
edit nuspec file in nupkg
I would like to create a semantically versioned nupkg after ci process on TFS. The nupkg should be as shown below.
MSVersioningSample.1.0.7-ci-20170926-184446.nupkg
But, when I decided it is a release version. I would like to rename nupgk and…

clockworks
- 3,755
- 5
- 37
- 46
3
votes
1 answer
Git tag from AssemblyInfo version
TLDR; After installing and configuring gitversion, how do I "hook up" my git repo and .nuspec to use the generated version number by the injected AssemblyInfo ?
It's my first time trying to properly version anything automatically. So far I've always…

Mathieu VIALES
- 4,526
- 3
- 31
- 48
3
votes
1 answer
Is there an alternative to contentFiles with projects that use packages.config?
I have a nuget package with content that I want to be copied to the build output when users install my package. There is support for this: NuGet ContentFiles Demystified in NuGet v3.3. However, it only works in projects that use project.json. The…

Connie Yau
- 670
- 5
- 12
3
votes
1 answer
Two csproj DLLs, one NuGet package. How to do this?
I'm working on a project in Visual Studio that is split up into three different projects:
Acme.Webapplication
Acme.Domain
Acme.SDK
The WebApplication uses the Domain project where its entity classes are stored and some other "core" objects and…

Vivendi
- 20,047
- 25
- 121
- 196
3
votes
1 answer
Reference nuspec id elsewhere in the nuspec file?
I have a nuspec file defined like so:
PSP.Build.Vcs.Svn
…

jamiet
- 10,501
- 14
- 80
- 159
3
votes
3 answers
Nuspec snippet to install dependencies' latest version
Introduction
According to this documentation it is possible to specify dependencies including versions per package as follows:
Question
Which Nuspec snippet needs…

030
- 10,842
- 12
- 78
- 123
2
votes
0 answers
How do I cause my nuget package to include runtime in the consumer's csproj file?
I am creating a NuGet package, and I would like, when this package is referenced, for the reference to look like this:
runtime
The…

Mark
- 11,257
- 11
- 61
- 97
2
votes
1 answer
NuGet Pack in Jenkins CI Server
I'm building a NuGet package in a build step in Jenkins (although Jenkins is probably unrelated).
I'm running NuGet command line like this:
NuGet Pack MyProject.csproj
There is also a MyProject.nuspec file in the same folder, I'm using a few…

jonathanpeppers
- 26,115
- 21
- 99
- 182
2
votes
2 answers
Nuget Package Manager not displaying package info in VS2019
My NuGet package "MyTestPackage" is installed in a C# project in Visual Studio 2019. When I view it via the NuGet Package Manager, it does not display the package info in the pane on the right.
I have included screenshots of my package and a package…

skataben
- 2,023
- 1
- 22
- 25