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
2
votes
1 answer

Update-Module duplicates module instead of updating

I'm using PowerShellGet to install my own PowerShell module from my local Nuget feed (packed and published as here). I'm installing it once like this: Install-Module MyModule -Scope CurrentUser And then I'm updating it like this: Update-Module…
Anton
  • 10,890
  • 8
  • 45
  • 54
2
votes
0 answers

Why does vs2015 default nuget package include beta dependencies? And should I be installing them in my project?

When I create a new class library, for use with nuget, it has these dependencies / frameworks by default: { //.... stuff..... "dependencies": { "System.Collections": "4.0.10-beta-23019", "System.Linq": "4.0.0-beta-23019", …
Martin Hansen Lennox
  • 2,837
  • 2
  • 23
  • 64
2
votes
0 answers

How to make my nuget package compatibile with .net 4.5?

I am trying to create a private nuget package to allow our organisation to share MVC models across mutliple apps. It's my first, and I was inspired by the Chris's answer to this question. I thought I had it nailed.... it built OK and showed up in…
Martin Hansen Lennox
  • 2,837
  • 2
  • 23
  • 64
2
votes
0 answers

Nuget - create package with NativeReference for unregistered dlls

I want to use nuget with a manifest file that includes unregistered com dlls. When adding this manifest file to a project it will be added to But just adding this manifest file to the nuspec document and packing it won't work. I hope someone has a…
2
votes
1 answer

Programmatically read NuSpec file with NuGet.Core

While it is possible to read a nupkg file with new ZipPackage("local/path//to/my/nupkgfile"). ZipPackage is a class in the NuGet.Core nuget package. I would like to know if there is another class in this library that allows me to read the nuspec…
Andrew Gray
  • 3,593
  • 3
  • 35
  • 62
2
votes
1 answer

how to include separately added system.configuration dll in nuget package

I'm creating nuget package of my demo.csproj I have added system.configuration separatly into this project, I know that I can add this system.configuration.dll into my nuget by using either of adding tag or y tag inside …
Neo
  • 15,491
  • 59
  • 215
  • 405
2
votes
1 answer

Rename nuget package content file as per target project

While installing my custom Nuget package to target cs projects, I need to rename few content files as per the target project name. E.g. If the target project name is "XYZ.Model" then my Nuget package content file should be installed as…
Sam
  • 519
  • 1
  • 7
  • 32
2
votes
0 answers

Nuget: Version dependency in a tree

I'm creating a Nuget package, let's call it A. A is dependent on B version 4.3 [4.3.0,4.4). B is dependent on C version 4.0 [4.0.0,4.1). A is dependent on a slightly later version of C [4.0.8,4.1). When package A builds, it identifies that B brings…
pdr
  • 6,372
  • 1
  • 29
  • 38
2
votes
2 answers

NuGet - dependency installed but not found

I have a problem with the NuGet package manager. I published my library (a type provider, but I don't think this matters) and then testet it, but it fails to find a dependency. The complete error message is (full namespace/name ommitted for…
2
votes
0 answers

NuGet - Is there a way to have package dependency without causing it to be uninstalled?

I have a project (I am the package creator) that has several builds that each depend on MVC (Microsoft.AspNet.Mvc, Microsoft.AspNet.Razor, and Microsoft.AspNet.WebPages). When my package is installed into a brand new MVC project, everything works as…
NightOwl888
  • 55,572
  • 24
  • 139
  • 212
2
votes
1 answer

Possible to use XDT to transform custom xml in nuget package?

I've created a nuget package that needs to add some configuration to an existing xml file on installation. The xml file is located deep in the folder structure like: /app/config/site1/settings.xml Is it possible to use XDT to transform this file and…
Kulvis
  • 655
  • 11
  • 33
2
votes
1 answer

Is it possible to use multiple sets of version ranges in NuGet .nuspec files?

Specifying version ranges in NuGet .nuspec files is supported. However, I can't figure out if it's possible to have multiple sets of comma-separated version ranges. e.g. Maven Version Range Specification allows this with the following syntax: Range …
Nikos Baxevanis
  • 10,868
  • 2
  • 46
  • 80
1
vote
0 answers

why my nuget package triggers dependency dll downgrade when install?

I have a nuget package that consumed by internal teams. This is the dependency section in the nuspec file
daxu
  • 3,514
  • 5
  • 38
  • 76
1
vote
0 answers

"Go to definition" doesn't work in Visual studio for resource dictionary items even with debug symbol files or .pdb files packaged within nuget

I have a project named Components which contains a resource dictionary name TestResourceDictionary.xaml . I am able to refer this Components library from my root startup project and access the resources (SolidColor brushes, Font Files & other static…
Rana prathap
  • 23
  • 1
  • 6
1
vote
0 answers

Is there any way to use .net 5.0 nuget package with .net 4.5.1?

I've made a custom nuget package from .net 5.0 standard library. Is there any possible solution to Install this nuget with .net framework 4.5.1? This is the error message. enter image description here