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

NuGet package dependency version clarification

In a NuGet package, in its .nuspec file, the package dependencies are specified on a per-target framework basis. E.g., in the System.Collections.NonGeneric package, here are its TF dependencies:
Conrad
  • 2,197
  • 28
  • 53
0
votes
1 answer

CPack NuGet Warning NU5119 NoDefaultExcludes

I am trying to create a NuGet package using CPack and want to pack files starting with '.'. I couldn't find any CPack variable to pass option NoDefaultExcludes. Also there is no variable to modify CPack generated nuspec file to add file tag. Is…
Vijay Katoch
  • 548
  • 1
  • 6
  • 14
0
votes
1 answer

Create NuGet package that when installed copies content to $(OutputPath) regardless of machine

I am trying to get a content file that is included with my NuGet package to be copied to the $(OutputPath) (in my case bin\Debug\netcoreapp3.1 where all the DLLs end up) of a target C# project when the target is built. This needs to work on…
Kit
  • 20,354
  • 4
  • 60
  • 103
0
votes
0 answers

DLL in NuGet private server missing dependencies

I have a .NET Framework 4.6.2 (hence non-SDK) DLL project which my company wants to move in a private NuGet server. This project has some NuGet dependencies handled with PackageReference method and some 3rd party libraries currently stored in our…
IssamTP
  • 2,408
  • 1
  • 25
  • 48
0
votes
0 answers

powershell script is giving error cannot process argument transformation on parameter for chocolatey install

function deployapp(){ Param ( [Parameter(Mandatory=$true)] [string] $dest_api, [Parameter(Mandatory=$true)] [string] $a_api, [Parameter(Mandatory=$true)] [string] $data_api #…
0
votes
1 answer

Local Nuget Package Creation for console

Could any team help me for creating local nuget package file that can be utilize in to different all project if application belong to web application or console application ?How can we convey any console application project to nuget file that can be…
0
votes
1 answer

No files appear from Nuget package when imported

We are looking to use Nuget to share code between repos. I have created a Nuget package which contains all of the source code in a specified sub directory. In 7Zip I can explore it and see all of the files are present. I need to import it into…
Stefan
  • 3,669
  • 2
  • 32
  • 43
0
votes
1 answer

nuget not installing file in project\bin directory

Working in VS 2019 .NET framework 4.8 For my C# class library project, I ran nuget spec to create a nuspec file for the dll and its dependencies: MyId
BarnumBailey
  • 391
  • 1
  • 4
  • 13
0
votes
1 answer

How to create my own custom nuget package for System.Data.SQLite to correctly include the interop dlls?

I want to create my own custom package for System.Data.SQLite. I have the all the dll's I need but I'm unsure how to structure it and create the nuspec for it. Current folder structure of the dll's is this, whereabouts would I put the different…
0
votes
0 answers

Create variables for common path in nuget

I want to provide variables for common path in hint path in .cspoj after installing nuget package. Example: After installing myNuget package in cs poject, few deliverables are added to project reference. Unload the project, and edit the…
Kalyani Reddy
  • 131
  • 10
0
votes
1 answer

Restore nuget package in different folder

We have some projects (Plugins) which use in several projects, the output of these projects will copy to the specific folder in the target projects (Plugins folder). We pack project with Visual studio 2019 Pack option and after that, we push npkg…
Mahdi Farhani
  • 964
  • 1
  • 9
  • 22
0
votes
1 answer

Nuget Build, when it PackageName.Targets and PackageName.props consumed?

Given, a package file called example: example $version$ $title$ $author$
0
votes
0 answers

Difference in the way nuget and direct reference to dll works

I am all new into the .Net world and still trying to get a hang of it. I have a .Net core 2.1 project and I am trying to reference Microsoft.Identity.Client.Extensions and Microsoft.Identity.Client libraries directly in the project. I downloaded the…
hitesh
  • 55
  • 1
  • 8
0
votes
1 answer

Importing content-only package to DotNet Core 3.1 project in Visual Studio 16.6

I have defined and created a content-only package to share JSON schemas between different projects. I packaged it using nuget.exe, and could successfully add it to .Net Framework 4.6 library project. But when I tried to add it to the DotNet Core 3.1…
GKalnytskyi
  • 579
  • 7
  • 16
0
votes
1 answer

Nuget Package Compatibility and Upgrades

My company has internal components that we deliver via internal NuGet. Now i want to make a Version 5.X of these components which will be breaking a lot from the 4.X versions. However now if my colleagues browse for updates, the Nuget browser would…
Otterprinz
  • 459
  • 3
  • 10