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
2 answers

Prerelease versioning in NuGet

I am trying to create a NuGet pre-release package. Here is my NuSpec file: xxx.Web.Mvc 1.0.3-prelrelease1 xxx xxx
Program.X
  • 7,250
  • 12
  • 49
  • 83
0
votes
0 answers

Creating an x86/x64 nuget package without nusepc in new csproj format

One of the drawbacks of the nuspec file is that you need to list you nuget dependencies all over again and don't you dare forget it when updating one of your dependencies. For example here. As a test balloon I was trying to achieve the same goal…
Dee J. Doena
  • 1,631
  • 3
  • 16
  • 26
0
votes
0 answers

ProjectReference conflicts Transitive PackageReference

This question has been discussed on several topics here but I can't find a solution for my case. I have a library project I'm working on. Let's call it LibraryProject. To test and validate it during the development process, I have another project in…
M. Ozn
  • 1,018
  • 1
  • 19
  • 42
0
votes
0 answers

Unable to install any NuGet packages to my .NET application

Unable to install any NuGet packages to my .NET application and getting below error. NuGet\Install-Package : Unable to load the service index for source https://api.nuget.org/v3/index.json. An error occurred while sending the request. The underlying…
0
votes
1 answer

Nuget package references and depencies problem

I have c# projects with packages and references in hierarchy like this Project-A package1 package2 Project-B package3 package4 Project-C package5 package6 So project A references some packages and Project B, which…
0
votes
0 answers

Add Nuget packages to private store the have dependencies on other stores

I have created a private Nuget store for internal dll to share among projects. These dlls have dependencies on packages from the main Nuget.org store. Is there way to tell the my packages that the dependency is located on a different store? Example,…
eweb
  • 27
  • 7
0
votes
0 answers

c# cross build different glue to native code for mac, windows in single nuget package inside docker linux image

I am trying to build bindings to C library. Api(sizes of types mostly) different for each operation system. I want to put #if MACOS or whatever macros in code to isolate differences. I tried to add very specific target frameworks like this…
crashtua
  • 472
  • 2
  • 14
0
votes
1 answer

How do i remove dll(s) from Nuget package?

Im using Visual Studio 2022 and created a Nuget Package using this article https://arsenshnurkov.github.io/gentoo-mono-handbook/building-nupkg.htm I run nuget pack and i see the nupg file and upload it to our Azure Artifacts. Below is the spec…
He-Man
  • 19
  • 1
  • 6
0
votes
1 answer

Excluding files from Nuget package

I have a few projects, which could be a console application, Web Application, WebAPI, MVC etc) and a normal Class Library (not Core/.Net 6) which contains Newtonsoft.Json dll (latest version). Each of the applications have their own version of…
Computer
  • 2,149
  • 7
  • 34
  • 71
0
votes
0 answers

How to hide implementation of Nuget package?

I've created a Nuget package. After adding that nuget package to a test project, I'm able to navigate to the definition and see the implementation. I've packed the nuget using release configuration only. So, any help how to disable this definition…
Mega
  • 95
  • 2
  • 2
  • 7
0
votes
0 answers

net6/7: Build x86 and x64 in Github script and deploy to nuget

Currently I'm building a .NET 4.5.2 library in x86 and x64 and use the microsoft/setup-msbuild@v1 script on Github to build and NuGet/setup-nuget@v1.0.7 to deploy to Nuget, see pushPackageToNugetOrg.yml For this I have my own .nuspec…
Dee J. Doena
  • 1,631
  • 3
  • 16
  • 26
0
votes
0 answers

NuGet Reference not found

I have below situation solution #1 c# proj1 -- depends on proj3 dll c# proj2 C# proj3 - this is a library and also referenced in proj1 as I have to create new NuGet as below solution #2 C# NuGet #1 needs Proj3, i changed proj 3 as NuGet and Included…
0
votes
0 answers

Chocolatey configuration listing installed software and checksum files

I am trying to undestand how Chocolatey knows which packages are isntalled locally from an algoritihim perspective. Breaking a similair question down, it says packages are installed by listing %ChocolateyInstall%\lib - Further, it is not based on…
morleyc
  • 2,169
  • 10
  • 48
  • 108
0
votes
0 answers

How to correctly handling nuget dependencies without pollution main project with unnecessary dependencies

Issue: "Could not load file or assembly Razorlight...." during attempting to intaracting with CustomProject instance within the main solution Prerequisites: The main solution consumes custom project as nuget package The custom project nuget…
AllmanTool
  • 1,384
  • 1
  • 16
  • 26
0
votes
2 answers

ProjectReference is not copied to output as part of parent NuGet package

I have 2 csproj projects: Child.csproj and Parent.csproj. Child.csproj is referenced by Parent.csproj through ProjectReference: netstandard2.0
vkolesnik
  • 367
  • 2
  • 13