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
0 answers

Missing PackageReference in NuGet package targeting UWP with SDK 17134

I'm trying to update this NuGet UWP library but since I switched to the UWP SDK 17134 (both as minimum and target version), it seems like all the PackageReference I have get lost during the packaging process. As a result NuGet just shows "no…
Sergio0694
  • 4,447
  • 3
  • 31
  • 58
0
votes
1 answer

nuspec.xsd repository types

I've seen that it is now possible to download source code of a nuget package, if the package provides that. So I lookuped up the…
0
votes
1 answer

How to include dll,.xml, .txt, .config , pdb and lic files while creating a Nuget package

Using Nuget package explorer i'm creating nuget packages. There i'm directly adding the lib folder and adding the dll's. can i add config, XML, lic, pdb directly to the package? or is there any way to add these files while creating package? And…
ram.v
  • 1
  • 3
0
votes
0 answers

Using NuGet without .sln or .csproj files

I am currently working in a UFT project, using the VBScript language. This project does not have a .sln or even .csproj files, because of this i am using the nuget.exe. I want to use NuGet to manage binaries. I am already able to push a NuGet…
0
votes
1 answer

init.ps1 is not executing (nuget package)

My nuget package project is a structured like following (very simple): - lib MyCom.dll - tools Init.ps1 Init ps1's content: param($installPath, $toolsPath, $package, $project) $project.Object.References | Where-Object { $_.Name -eq "MyCom" } | …
Amen Jlili
  • 1,884
  • 4
  • 28
  • 51
0
votes
1 answer

NuGet not throw the error when pack nupsec file with same file in the different foder

When I pack a .nuspec file to generate a package, which contains some files in the different folder, but a file exists on both folder, then I pack this .nuspec file. NuGet pack it successfully, but just include one and not throw the error. My…
Joe
  • 27
  • 3
0
votes
0 answers

How do I specify current target framework in nuspec file?

Is there any way to swap the hard-coded net45 seen below with whatever is specified as the Target framework in my project settings? I was hoping to see something…
Craig
  • 417
  • 3
  • 12
0
votes
1 answer

nuget package add folder to solution

i have to create a nuget package but i have a problem: i want to add a folder named "Config", this folder contains three XML files. after a search on the web, i have tried two ways (editing my nuspec file) to add this custom folder into my nuget…
Lollo
  • 535
  • 2
  • 5
  • 18
0
votes
0 answers

Missing NetStatandard 2 after install my nuget package

I have a netstandard2 class library project, which contains some Roslyn analyzers. I'm trying to create NuGet package using a .nuspec and msbuild \t:pack command. All working find and i can create the nuget package easily. But as soon as i register…
Ali Foroughi
  • 4,540
  • 7
  • 42
  • 66
0
votes
2 answers

Distinguish project languages for Nuget source code packages

Let's say I want to build a Nuget package which puts source code files to the Visual Studio projects it gets installed to. Well this works pretty fine with the "content"-approach. That means I can bring these files in the following folder structure…
Waescher
  • 5,361
  • 3
  • 34
  • 51
0
votes
1 answer

nuget vs2015 Cannot Resolve Group Target Dependicies Correctly

I use visual studio 2015 and when I want to use a nuget package(includes .netcore and .net versions both) from my .net45 project that time nuget package manager try to resolve .netcore depencies and failed.What I am waiting if my project is .net45…
Bilgehan
  • 1,135
  • 1
  • 14
  • 41
0
votes
1 answer

Nuspec buildAction not applying to contentFiles

I've been recently trying to create a .nuspec file that attaches a .dll file as an Embedded Resource. To do so, I've used the contentFiles tag on metadata, setting the buildAction="EmbeddedResource", as described in the section Example contentFiles…
Matias G H
  • 41
  • 6
0
votes
1 answer

Why is nuget not adding my file?

I have this nuspec file: My.Package 1.0.1.7 My Package My name Mu author
Martijn
  • 24,441
  • 60
  • 174
  • 261
0
votes
1 answer

NuGet - choose references to add on install

I want to pack/publish a NuGet package. (private) using a .nuspec file : \build \netstandard1.4 \MyProject.dll \MyProject.Unmanaged.dll \net462 \MyProject.dll \MyProject.Unmanaged.dll In this package, I have…
user3544117
  • 587
  • 4
  • 9
  • 25
0
votes
1 answer

How do you add an xml file to the App_Data folder of a web site and then modify it with NuGet

I am creating a NuGet package that adds or modifies several xml files. I want the Nuget package to add and then modify the xml files, so the user does not have to do anything to get the file added if it does not exist. I need to modify the xml…
Timothy Dooling
  • 470
  • 1
  • 4
  • 17