Questions tagged [nuget-spec]

NuGet spec is a command on the nuget executable. The command is used to generate a .nuspec file for a new package. This .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.

spec command (NuGet CLI)

Applies to: package creation • Supported versions: all

Generates a .nuspec file for a new package. If run in the same folder as a project file (.csproj, .vbproj, .fsproj), spec creates a tokenized .nuspec file. For additional information, see Creating a Package.

Usage

nuget spec [<packageID>] [options]

where <packageID> is an optional package identifier to save in the .nuspec file.

Options

Option | Description

AssemblyPath | Specifies the path to the assembly to use for metadata.

Force | Overwrites any existing .nuspec file.

ForceEnglishOutput | (3.5+) Forces nuget.exe to run using an invariant, English-based culture.

Help | Displays help information for the command.

NonInteractive | Suppresses prompts for user input or confirmations.

Verbosity | Specifies the amount of detail displayed in the output: normal, quiet, detailed (2.5+).

Also see Environment variables

Examples

nuget spec

nuget spec MyPackage

nuget spec -a MyAssembly.dll
226 questions
0
votes
1 answer

How to call a function from powershell script install.ps1 when installing nuget package

I am trying to automatically call powershell script when install my own nuget package. My install.ps1 is as below I want to call a function in functions.ps1 which is in tools\Functions.ps1 Functions.ps1 Function Write-HelloWorld($param1 ,…
Mukil Deepthi
  • 6,072
  • 13
  • 71
  • 156
0
votes
1 answer

.nuget include file from other project

I have three visual studio database projects with .sql files. Instead of publishing the projects to a database, the SQL needs to be executed at a specific moment. I added another project to package everything into one nuget package (including some…
MrFox
  • 4,852
  • 7
  • 45
  • 81
0
votes
2 answers

Nuget Push (update to package) - showing as new install in package manager

I have a very simple post build script which packages all dlls from my project to a custom nuget server. This works fine, however, when opening package manager from any solution, I see the nuget package as a new install, as opposed to the expected…
DavidReid
  • 449
  • 1
  • 5
  • 21
0
votes
1 answer

How to force a NuGet dependency to be in the target directory?

I'm trying to publish a project on NuGet staging server. The project has two dependencies: Mono.Cecil and ILRepack. When installing my project at project level: Mono.Cecil dependency is installed automatically at project level. I can also find it…
Arseni Mourzenko
  • 50,338
  • 35
  • 112
  • 199
0
votes
1 answer

Merge code files with nuget instead of overwrite

I have built several nuget packages that can be used either individually or together. Each has a specific file called Config.cs.pp which then of course becomes Config.cs when you add the package. The problem is, if I am using multiple packages,…
maxmoore14
  • 701
  • 7
  • 26
0
votes
2 answers

Why doesn't NuGet pack add files to tools directory?

I have the following nuspec file: when I run NuGet pack project.nuspec, the process completes…
RoelF
  • 7,483
  • 5
  • 44
  • 67
0
votes
0 answers

nuGet Package dependencies and project references

After publishing a new version of one of out nuGet packages we run into errors when running an application that consumes some of our packages. Solution 1 contains the code for the packages that will be publsihed to nuGet. project A, version…
W van Noort
  • 383
  • 2
  • 16
0
votes
0 answers

How to build NuGet package containing a .nuspec template file?

I'm trying to create a NuGet package for an MSBuild Extension that should contain a template .nuspec file. However when I specify a .nuspec file to be content of my package, I'm not able to install it in a .nuget folder of the target project. As you…
Eivind Gussiås Løkseth
  • 1,862
  • 2
  • 21
  • 35
0
votes
1 answer

How to add a nuspec as a reference to a project

I am trying to add to my project a nuspec as reference.. by : right click on references > add reference > browse > nuspec_file it doesn't work... what is the right way to do it ?
Damkulul
  • 1,406
  • 2
  • 25
  • 59
0
votes
1 answer

Create CoApp package with property sheets

I want to create a CoApp package which will just install my department's custom property sheets (currently they come from a Mercurial subrepository and we want to get rid of as many subrepositories as possible). The property sheets reside in a a few…
Dina
  • 1,346
  • 1
  • 15
  • 35
0
votes
1 answer

Nuget packages without Open Package Conventions enforced

Im building some nuget packages on our build server and have run into a problem. I have to use nuget pack xxx.csproj to get replacement tokens to work with my nuspec file which is allright. But when I do the nuget pack on the csproj a lot of "noise"…
Christian Mikkelsen
  • 1,661
  • 2
  • 19
  • 44
0
votes
1 answer

How to maintain the "content" source-code of a Nuget package?

I am in process of setting up a whole series of NuGet packages for our framework. Beside the simple binary-packages (.dll's for modules of the framework) there are also packages that deliver source-code into the projects that are using them done…
Marc
  • 4,715
  • 3
  • 27
  • 34
0
votes
0 answers

building NuGet package; want to add content to disk, but not solution

I am building a NuGet package. I want to add content that will be written to disk, but not added to the project. I've looked at many websites and the available documentation, but nothing is jumping out at me. I suspect I could achieve this in a…
Rob Allen
  • 2,871
  • 2
  • 30
  • 48
0
votes
1 answer

How does a nuget package specify copylocal

I have issues that I am dealing with where certain nuget installed package added via VS2012 have the copylocal value set to true where as others don't have any value set. How does nuget know when to add copylocal and not to? Is there some setting…
rizan
  • 339
  • 1
  • 3
  • 16
-1
votes
1 answer

Nuget Spec AspNet vs AspNetCore

I am creating a library that I want to have different behaviour based on the type of project that is dependent on it. Here are the 3 types of projects I want to separate: AspNet (.NET Framework) AspNetCore 2.1 AspNetCore 3.1 Here is my…
Linvi
  • 2,077
  • 1
  • 14
  • 28
1 2 3
15
16