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
91
votes
12 answers
how to resolve "Unable to find package" nuget error
Working on creating a nuget pkg for a project (A.csproj) which depends on another project (B.csprojec) added as a project reference.
Here is the .nuspec ,
A.Client
…

yesIcan
- 1,441
- 1
- 11
- 18
61
votes
6 answers
Don't include dependencies from packages.config file when creating NuGet package
I am using Nuget to create packages. I would like to create a package which does not contain any dependencies (in the .nuspec) file to any other NuGet packages. My project does have NuGet package dependencies defined in its packages.config…

Jesse Webb
- 43,135
- 27
- 106
- 143
56
votes
3 answers
Unable to resolve assembly reference issue without frameworkAssemblies
I'm trying to validate that Protocol Buffers is going to work with the new portable runtimes from the ASP.NET team and ideally most other modern environments. The 3.0.0-alpha4 build was created a while ago using profile259, so I would expect some…

Jon Skeet
- 1,421,763
- 867
- 9,128
- 9,194
31
votes
4 answers
nuget spec dependencies, get latest version?
In the nuspec versioning docs I see
1.0 = 1.0 ≤ x
(,1.0] = x ≤ 1.0
(,1.0) = x < 1.0
[1.0] = x == 1.0
(1.0) = invalid
(1.0,) = 1.0 < x
(1.0,2.0) = 1.0 < x < 2.0
[1.0,2.0] = 1.0 ≤ x ≤ 2.0
empty = latest version.
I have a packages.config that looks…

George Mauer
- 117,483
- 131
- 382
- 612
25
votes
1 answer
How to include directories recursively in NuSpec file
I have a folder structure like this in my project...
Project/Folder1/Folder2-File1-File2-File3
Project/Folder1/Folder3-File4-File5-File6
Project/Folder1/Folder4-File7-File8
In a NuSpec definition file, how can I tell it to include everything under…

kyleb
- 1,968
- 7
- 31
- 53
19
votes
3 answers
NuGet Framework Assemblies not working
I'm trying to update a nuget package to add some assembly references, but I'm getting the following error:
The element 'metadata' in namespace 'http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd' has invalid child element…

Brad Robinson
- 44,114
- 19
- 59
- 88
18
votes
3 answers
Show NuGet package release notes
The nuspec reference says about the releaseNotes tag
v1.5 A description of the changes made in each release of the package. This field only shows up when the Updates tab is selected and the package is an update to a previously installed package. It…

adrianm
- 14,468
- 5
- 55
- 102
17
votes
2 answers
How can I set the 'copy to output directory' property in my nuspec file?
Please consider the following nuspec file:
[SOME METADATA]
The above has successfully packaged up the…
user1017882
16
votes
1 answer
How do I specify conditional dependencies based on target framework in NuGet?
I am building a NuGet package that references the Microsoft CommonServiceLocator assembly.
There are two versions of the Microsoft CommonServiceLocator out there:
CommonServiceLocator - targets the full .NET framework and is referenced by the…

Travis Illig
- 23,195
- 2
- 62
- 85
14
votes
1 answer
nuspec file with dependencies
My company has set up a nuget repository for packages that are proprietary to our business. I have a nuspec file for a package that lists dependencies that are located on the main nuget repository. When I install a package from our repository the…

Alan Floyd
- 141
- 1
- 1
- 6
13
votes
2 answers
NuGet Packing a Nuspec: Value cannot be null or empty string. Parameter name: value
I'm packaging up a bunch of javascript for a website. Here's what my .nuspec looks like.
$version$
…

user3066571
- 1,381
- 4
- 14
- 37
13
votes
1 answer
Nuget from portable class library: Value cannot be null or an empty string. Parameter name: profileValue
What I have
I have Portable Class Library MyProj.Backend.Contracts.csproj with following
project.json:
{
"supports": {
"net46.app": {},
"uwp.10.0.app": {},
"dnxcore50.app": {}
},
"dependencies": {
"Microsoft.NETCore":…

Liero
- 25,216
- 29
- 151
- 297
11
votes
4 answers
Creating NuGet package: NU5128 exception - not clear on how to fix
I have a DLL addressing the .NET 4.7.1 library.
Probably irrelevant, but it's written in C# and consumes NuGet packages using the "packages.config" pattern, rather than the newer PackageReference configuration.
I publish this as a NuGet package…

DrGriff
- 4,394
- 9
- 43
- 92
11
votes
3 answers
nuspec contentFiles Example
Yesterday NuGet 3.3 was released (release notes) and there is a new contentFiles element supported (docs). However, I can't seem to get this working.
I'm using the NuGet.exe as the build process. It is updated to v3.3. I have also updated my…

Timothy Klenke
- 814
- 1
- 10
- 21
10
votes
1 answer
Azure DevOps pipeline variables in .nuspec files
Is it possible to use Azure DevOps pipeline variables in .nuspec files, which are used for packages creation?
…

user3132547
- 193
- 2
- 13