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

Specify PackageID for NuGet nuspec file

I'm writing a deploying app to take my DLL's and create .nuspec files for each, package them, and push out to Artifactory. Trying to use command line in c# to do this. The problem I'm having is that the DLL's are on a network drive, and calling…
Sir Funk
  • 23
  • 4
2
votes
1 answer

How do I add an icon url to my Nuget package using Visual Studio for Mac

I set the Icon Url using the nuget properties of my .csproj in Visual Studio for Mac. However, when I deploy it to Azure Artifacts (which is like nuget.org), no image icon appears. I am also deploying using Azure Pipelines. I've also tried clearing…
2
votes
3 answers

How to convert a class library project into NuGet package

We have below in .sln file. 1.Website project 2.Service project 2.Framework ClassLibrary project We want to create a NuGet package of this ClassLibrary project which will be used in any other project. As of now website & service project contains…
Sukhjeevan
  • 3,074
  • 9
  • 46
  • 89
2
votes
2 answers

create multi target nuget package

hi i want create multi target nuget package. Everything seems to work well Except that whene i create wpf NetCore3 app and install my package The .NET Framework dll is used and The NetCore3 library is not used
hadi khodabandeh
  • 585
  • 2
  • 7
  • 20
2
votes
1 answer

Migrate from PCL to .netstandard

I'm trying to figure out how to migrate a project from PCL to .netstandard 1.2. I have a solution where I have a PCL project (portable45-net45+win8+wpa81) and a .Net Standard (netstandard1.2) project which has all it files linked into the PCL…
grmbl
  • 2,514
  • 4
  • 29
  • 54
2
votes
1 answer

Express transitive dependency in MSBuild without Importing PackageReference

I have a project MySdk.csproj that I'm packing at build time via dotnet pack. I want to express that this project has a transitive dependency on Trans.nupkg, but I don't actually want to import all the assets from Trans.nupkg during the build of…
Jeff
  • 35,755
  • 15
  • 108
  • 220
2
votes
1 answer

Should I publish the nuspec file in a repository?

When creating an open source library on GitHub or another public website, should I publish the .nuspec file that describes the corresponding NuGet package? I've done this a couple of times (since no API key or other sensitive information is included…
Theodoros Chatzigiannakis
  • 28,773
  • 8
  • 68
  • 104
2
votes
1 answer

How can a files without extensions be renamed through Nuspec

The .nuspec File Reference says that files without extensions can be selected in the following manner: To include files without an extension, use the * or ** wildcards: And, then also says that files can be…
roydukkey
  • 3,149
  • 2
  • 27
  • 43
2
votes
1 answer

Nuget prevent generating packages folder in solution

I hava a solution which contains two Project. /Solution .sln .nuget.config /ProjectA .csproj .nuspec /ProejctB .csproj .nuspec When I add a dependency ProjectA via nuget. Project structure is…
clockworks
  • 3,755
  • 5
  • 37
  • 46
2
votes
0 answers

NuGet packing same dll twice in different folders: Cannot add part for the specified URI because it is already in the package

I have the following two lines in my nuspec which result in the error: Cannot add part for the specified URI because it is already in the package. Here's the code in the nuspec:
Randy Walker
  • 153
  • 1
  • 9
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
1 answer

nuget is not a recognized as an internal or external command not working for Visual studio 2015

I am trying to create a Nuget Package. Was in the process of Nuget Manifest file. Got this error while running the command in command prompt nuget spec.
rvgenius
  • 143
  • 2
  • 10
2
votes
1 answer

How to Modify and Test Nuget Package Xamarin Media Plugin?

in Xamarin Media Plugin when I take a picture I have two options, save or discard the photo. But i want to add a popup question asking if the user really want to discard the photo. I already downloaded the package from github…
chr0m1ng
  • 199
  • 2
  • 12
2
votes
0 answers

Can I include files in a NuGet package, but only when package is installed directly (not as a dependency)?

I want to create a NuGet package that contains files that are added to the project the package is installed to. So far, everything is straightforward. But then, I want to create a NuGet package from that project as well. And install it to a third…
Bulgur
  • 97
  • 1
  • 11
2
votes
2 answers

VSTS Automated Build NuGet Packager/Publisher

My package builds successfully and is uploaded to the Packages feed in VSTS however I can't seem to figure out how to edit the Description and Author of the package so that my set values show in the Package feed. From what I read I put my content in…
LorneCash
  • 1,446
  • 2
  • 16
  • 30