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
2
votes
0 answers
C# Class library Copy content not copied to output
I made a class library in which i have a .bin folder containing files.
Two of these files (an exe and an extension-less file (node script)) have the folowing properties
Build Action : Content
Copy to Output Directory : Copy if newer
When I include…

Mathieu VIALES
- 4,526
- 3
- 31
- 48
2
votes
2 answers
Put files and folders of nuget package in root folder
I am trying to package my project file and creating a nuget package using something like this:
NuGet pack file.csproj -p Configuration=$(ConfigurationName); -NoPackageAnalysis.
But the problem is it's putting the files/folders relevant to project…

Abhishek Singh
- 406
- 1
- 6
- 18
2
votes
2 answers
Is it possible to rename a file during copy with Nuspec files node
I am currently working on changing our codebase to use Nuget. As part of the process the copying of ressources to the output directory should be moved from postbuild events in the projects to the files tag in the .nuspec file.
For the particular…

Levantin
- 21
- 4
2
votes
1 answer
How to to produce both release and pre-release packages from one nuspec in VSTS?
Currently my build produces both packages having a newer version every time:
Release: Automatic package versioning = Use the build number
Pre-release: Additional build properties = Version=$(user.BuildFullVersion)-beta
And the only one nuspec has a…

abatishchev
- 98,240
- 88
- 296
- 433
2
votes
1 answer
Options for placing and updating PowerShell files in Project folder using NuGet
I am building a NuGet package that only contains a set of PowerShell scripts. The desired behavior is for the scripts to be placed in the project and/or solution folder, removed when the package is uninstalled, and updated when the package is…

Erick T
- 7,009
- 9
- 50
- 85
2
votes
1 answer
How to add Release Notes file path reference in nuspec file
I'm working on a solution which has several projects. Each project has it's own release notes.I need to specify path of the release notes in the specific project's nuspec file. How do I achieve that?.. If I just add file path it doesn't seem to…

SKN
- 520
- 1
- 5
- 20
2
votes
1 answer
Nuget: How to use files in the tools folder in the target application?
I have added a build EXE tool in the tools folder of my nuspec, and it is correctly added to the target application under \packages\xxx\tools folder.
But I need to invoke this file as a Build Action in the target project. What's the correct way to…

Paymon
- 1,173
- 1
- 9
- 26
2
votes
3 answers
Nuspec - Why is "contentFiles" ignored if you add "files" node? How to fix?
I have a nuspec file for a package containing UWP as well as Android and iOS assemblies.
In the UWP version I also need to include a content file.
According to this reference, I should use the contentFiles tag, which works fine in the following…

Paymon
- 1,173
- 1
- 9
- 26
2
votes
0 answers
Nuget pack existing build from csproj
In my CI build I have MSBuild which outputs Release builds into .\.output\_Build folder; in this case this folder has the exe that I want to package into a nupkg.
When I execute:
NuGet.exe pack -Version "0.1.0" -BasePath ".\.output\_Build"…

aateeque
- 2,161
- 5
- 23
- 35
2
votes
0 answers
Specifying a non-dll to be copied to all referencing projects' bin folders in a NuGet package
I have two solutions, Foo and Bar.
One of the projects in Foo, Foo.A, outputs a nuget package, which our build server pushes to an internal nuget feed. One of the projects in Bar, Bar.A, references this nuget package.
Foo.A contains a config file,…

Tomas Aschan
- 58,548
- 56
- 243
- 402
2
votes
1 answer
How to generate a *.NUSPEC file during a VSTS build?
Currently the NuGet Packager VSTS Build Step seems to not support *.VBPROJ files, so it looks like the only alternative will be to use *.NUSPEC files.
However, I'm unfamiliar with how to automatically create a *.NUSPEC file on the server at build…

InteXX
- 6,135
- 6
- 43
- 80
2
votes
1 answer
Use "dotnet" or ".NETPlatform5.0" in NuGet nuspec?
I have a NuGet .nuspec created with with various framework dependencies.
Based on this article, one of the dependencies is "dotnet":
[dependencies here]
When I pack the .nuspec file using NuGet 3.3, the…

Damien Dennehy
- 3,937
- 2
- 19
- 21
2
votes
0 answers
nuspec omit dlls to be referenced from the lib folder
I have the following nuspec structure:
lib
net40
mylib.dll
And the following nuspec file
...