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 not installing in .NET Framework

I have created .net standard library project and I have created nuget package for this library, Now I need to install this package in both application .Net Core and .Net Framework4.5. Working fine in .Net Core but while installing .Net framework…
0
votes
1 answer

Embedded into NuGet package icon doesn't appear in VS

I generate a nuget package using my nuspec file below: CommonLib 1.2.3 ABC ULC
Tiger Galo
  • 289
  • 4
  • 15
0
votes
1 answer

Configure an azure devops pipeline to pack and push a UWP library with components

I am trying to 'publish' (build, nuget pack and push) a UWP library project to a private azure artifact feed using azure pipelines. I am using the classic editor in pipelines, with the following agents: Nuget tool installer - specify 5.5.1 Nuget -…
Ron
  • 3
  • 3
0
votes
1 answer

Nuget packing not including dependncies in right way

I have a C# library, let say "Utilities" that uses Log4net as dependency, I am using .net framwork 4.6.1, I finished developeing this library and do a nuget pack Utilities.projcs and then push this package. While I'm try to use this Utilities in…
0
votes
1 answer

error with push nuget package to azure devops artifact repository

I have a ClassLibrary App and i want to create nuget package from it and push to my azure devops artifact repository Now I am create nuspec file for my project from "nuget.exe spec myApp.csproj' and create package with "nuget.exe pack" , now when i…
0
votes
0 answers

Impossible to install GoogleAnalyticsTracker.Core Nuget package

I want to install the package GoogleAnalyticsTracker.Core from Nuget in my C++ project, but when I try to install, I get this error: Could not install package 'GoogleAnalyticsTracker.Core 4.0.0'. You are trying to install this package into a…
EMall
  • 29
  • 3
0
votes
0 answers

Nuget pack for assemblies that are append with version

I have to tag every .dll with it's version from assembly, so from Service.dll it becomes: Service-v1.0.0.21455.dll I tried this two approaches, but each has flows: Build > Rename > Pack with nuget pack Service.csproj The challenge is that after I…
697
  • 321
  • 4
  • 16
0
votes
1 answer

Create Nuget for net461 with content copy to output

I've created a nuget package targeting a .NET Core project. The idea here is to add xxx.dll as a reference with copy local as false and copy all DLLs in a subfolder in the output path and all resources files in subfolder\resources The nuspec…
Whiletrue
  • 551
  • 1
  • 7
  • 18
0
votes
1 answer

nuget.exe doesn't recognize any target framework in nuspec file

I have a project that generates a NuGet package directly in visual studio, by setting the following option in the CSPROJ file: true This causes the generated package to include all the embedded…
cat_in_hat
  • 635
  • 9
  • 15
0
votes
1 answer

How to stop NuGet packaging from including unwanted files

I'm building a NuGet package with a folder hierarchy that looks like this: ProjectDir Infrastructure class1.cs class2.cs Task class3.cs class3.cs StuffToInclude SampleCode …
Stephan G
  • 3,289
  • 4
  • 30
  • 49
0
votes
1 answer

Overwriting NuGet Package does NOT change the .NET Version

I had a NET45 project published to NuGet. For internal reasons (this is not a production application), I REQUIRE it to be Version 1.0.1 always no matter what. I am using my own private NuGet Server that is currently fully up to date, and TeamCity…
Suamere
  • 5,691
  • 2
  • 44
  • 58
0
votes
0 answers

NuGet package not copying files and transform files as expected

I am trying to understand how NuGet packages work so that I can package some of my repeatedly used source for future projects. I am working with a simple class library (.Net Foundation) and using the CLI to make the nuspec file and then packing from…
John S
  • 7,909
  • 21
  • 77
  • 145
0
votes
0 answers

Nuspec for Xamarin.Android and Xamarin.iOS nuget

Context: I want to create a nuget for both Xamarin.Android and Xamarin.iOS. Aside the dll nuget, for the Android project I need a xml file to be copied to a certain location which for some strange reason. Problem: The xml file gets copied for…
Alexandru Stefan
  • 635
  • 1
  • 9
  • 22
0
votes
1 answer

Overriding nuget package name when using "nuget pack" with a visual studio project

I am currently generating nuget packages by passing in a csproj file instead of a nuspec file. The problem is that I need to change the name of the nuget package to avoid conflicts with another project. This is the command I'm running: "C:\Program…
Josh Mouch
  • 3,480
  • 1
  • 37
  • 34
0
votes
0 answers

unable to load the service index for source https //api.nuget.org/v3/index.json

I just installed vs and created a mvc project But the nuget part in the references is a yellow sign, and when I try to create a controller, I encounter the "unable to load the service index for source https //api.nuget.org/v3/index.json"…