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
1
vote
1 answer

Invalid .nuspec file: target framework `Unsupported,Version=v0.0` is not supported

So embarrassing to ask something that is that well documented, but I am lost with an error which I get when I push my NuGet package: System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: Response…
1
vote
1 answer

Creating a local NuGet feed

Basically I am trying to set up a Local NuGet feed on our network to pass out the dll's to other developers in the team. I have the NuGet feed working and can find my package and try and install it but I get many error all stating 'The type or…
1
vote
1 answer

Microsoft.Azure.ActiveDirectory.GraphClient requires incorrect version of dependencies

In Asp.Net Core solution targeted to 4.6.1 full Framework I am using 2.1.1 Microsoft.Azure.ActiveDirectory.GraphClient.dll In MSTest tests library TestMethods I am getting exception: System.IO.FileLoadException: Could not load file or assembly …
Michael Freidgeim
  • 26,542
  • 16
  • 152
  • 170
1
vote
1 answer

asp.net core nuspec project dependency

I got a couple of projects made with asp.net core that I wanted to export to NuGet. Everything was fine with the first version (0.9.0). But when I updated a package to 0.9.1, I started having version issues, cause the app started looking for all…
Lucas Phillip
  • 185
  • 4
  • 15
1
vote
1 answer

Nuspec metadata and sharedassemblyinfo.cs

I have a multiproject solution written c#. I created a sharedassemblyinfo.cs file to share version number, etc...across the different projects in my solution. I need to build this project as a nuget package. In my nuspec file there's placeholders…
1
vote
1 answer

Can't add nuget to xamarin.android project with project.json

I try to add the nuget package MPAndroidChart ( https://www.nuget.org/packages/MPAndroidChart/3.0.1) to my android project. But I always get the message: Package MPAndroidChart 3.0.1 is not compatible with monoandroid71 (MonoAndroid,Version=v7.1) /…
1
vote
1 answer

nuget package dll or source files

I'm new to nuget package publishing. The project under progress is a dot net core app and it's an open source project. I undertand the two options content and lib when it comes to specifying target for distribution files. Because so far I've not…
user2727195
  • 7,122
  • 17
  • 70
  • 118
1
vote
1 answer

How to resolve ArgumentNullException caused by adding to .nuproj project file?

According to the NuProj documentation, NuGet supports adding references to framework assemblies as well. You can specify those via the FrameworkReference item:
1
vote
0 answers

Version error while installing nuget package for .net core class library

I have created a nuget package for my .net core class library. below is my Project.json code for my nuget packaged class library { "dependencies": { "NETStandard.Library": "1.6.0", "Newtonsoft.Json": "9.0.1", …
Satish Kumar
  • 203
  • 3
  • 8
1
vote
0 answers

Nuget pack does not include external package source

I have written a little library for Sitecore(a CMS product) which means my library depends on Sitecore. Sitecore, the company, have recently made their product available as nuget packages. However they have chosen to host their own nuget package…
Galtrold
  • 75
  • 9
1
vote
0 answers

Content files do not included

I am trying to include some files as content in my package. But all samples disregarding of how simple they are for some reason don't work for me. My nuspec files is:
fxdxpz
  • 1,969
  • 17
  • 29
1
vote
0 answers

NuGet setup for code analyzers not working

I am working on setting up an internal NuGet package for code analyzers used by my team with Visual Studio 2015 Enterprise. I kept it simple by creating a new folder and used the "nuget spec" command to create the nuspec file. My nuspec file is as…
1
vote
1 answer

NuGet package adds incorrect hint path

During an automated build, my nuget package needs to be non framework dependent, however I keep finding that the nuget package getting added is incorrectly adding a HintPath. Within my nuspec I've defined the files that are part of the…
Randy Walker
  • 153
  • 1
  • 9
1
vote
2 answers

Nuget pack from `.csproj` doesn't replace sample values

I'm trying to automate the building of a nuget package, but I have a few issues with example values, namely things like License URL, Icon URL, etc. I want to be able to replace the project URL, Tags, and Summary, while completely removing the…
TechnicalTophat
  • 1,655
  • 1
  • 15
  • 37
1
vote
1 answer

Nuget spec editing values via command line switches

I'm making a library, and creating a nuget package using the nuget spec and nuget pack commands. However, every time I run nuget spec, I get a load of rubbish in the .nuspec file that I don't want (like 'SampleDependency') I was wondering if it's…
TechnicalTophat
  • 1,655
  • 1
  • 15
  • 37