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 how to make Package without "Bin" Folder

I am trying to get rid of Bin Folder in NuGet Package but preserve the structure. part of my nuspec file: My Current package produces: project1\bin\*.dll project2\bin\*.dll Desired Result:…
Borik
  • 438
  • 3
  • 9
0
votes
0 answers

Explicity Registering NuGet DLL's with Dependency

My nuspec file uses both managed and unmanaged DLL's. The following example works correctly and creates a project reference to managedDLL.dll...
FormulaChris
  • 101
  • 4
0
votes
1 answer

Package multiple project into a single NuGet Package

I'm trying to wrap my head around the NuGet package system. Recently I released a class library for NuGet, targeting only .NET Framework 4.5.2, but as of demand, I decided to create a new class library targeting .NETStandard 1.4. Here's where I get…
Detilium
  • 2,868
  • 9
  • 30
  • 65
0
votes
1 answer

Creating Multiple Nuget Packages from a Visual Studio Solution

I have a Visual Studio 2015 Solution which contains multiple projects. Some of these projects reference each other. Example Solution Project A Project B - references Project A On teamcity, I want to create nuget packages for each of these…
Obi
  • 3,091
  • 4
  • 34
  • 56
0
votes
2 answers

Created nuget package's dll can not be accessable from package's loaded project

I want to create a nuget package of my .net core class library. I copied the nuget.exe file to the root folder of my Solution Run nuget spec and Solution.nuspec file created. I modified it as below:
ayse
  • 93
  • 8
0
votes
1 answer

Nuget unpacks assembly in wrong platform folder

I've created a simple nuget package containing one assembly that is located under lib\net40. If I unzip the nuget package I can verify that the assembly is indeed present under lib\net40. Now, when I install this package in my .net project using the…
Merijn
  • 661
  • 1
  • 7
  • 21
0
votes
2 answers

Private Nuget Server: I can't see my packages from Nuget Package Explorer

I followed the Microsoft official Guide for create a Private Nuget Server. Everything seems to work, I can see my packages feed from browser and I can see my packages from Visual Studio package manager. However when I try to push, read or create new…
Davide
  • 131
  • 5
  • 18
0
votes
1 answer

MSBuild: How to update xml by xpath

I am trying to find a solution, how can I update release notes in the nuspec xml using MSBuild script. Now I have create MSBuild target with XmlUpdate:
Alex
  • 842
  • 11
  • 33
0
votes
1 answer

The Nuget package (nupkg) doesn't sync with the project latest changes?

I created a Nuget package, I made some changes to the project and added some comments, but after updating the package, those changes didn't apply, and still has the first release. I have the NuGet.exe, the *.nuspec and the *.nupkg files in the same…
mshwf
  • 7,009
  • 12
  • 59
  • 133
0
votes
1 answer

How can I reference a project as a package dependency with a specific version in AppVeyor and GitVersion?

I have following after_build definitions in my appveyor.yml: after_build: - cmd: nuget pack "%project_file%" -properties "Configuration=%configuration%" -version "%GitVersion_NuGetVersion%" -symbols - cmd: nuget pack "%extras_project_file%"…
user57508
0
votes
1 answer

Nuget Packaging fails after automating it in VSTS

For a Common library I use very often for all kinds of projects, I setup a nuget server. For a while i published the nuget package manually like: nuget pack .\ProjectFolder\CommonProjectName.csproj -Symbols -Build -Properties…
Luuk Krijnen
  • 1,180
  • 3
  • 14
  • 37
0
votes
1 answer

NuGet does not copy content and does not run install.ps1

I am trying to create a Nuget package using NuGet.exe 1.2.20311.3, and the following specification:
Sasha Palmer
  • 153
  • 1
  • 9
0
votes
1 answer

Can I create a NuGet package that references a different source?

I have a project I need to publish as a NuGet package. This project references other NuGet packages, that are available on a MyGet feed. Is there any way to include a referent to the MyGet feed in my NuGet package, so that these references will…
Joda
  • 12,796
  • 10
  • 34
  • 33
0
votes
1 answer

Creating nuget packages for framework projects

We have more than 70 projects for our framework and we would like to create nuget packages for all of them. In order to do that we identified the hierarchy of dependencies of those 70 projects and found that we have 4 levels down reference between…
classic_vmk
  • 495
  • 2
  • 15
0
votes
1 answer

Nuget: dependencies between projects in a solution

I can't figure out how to create a package with references to a solution project and a third party assembly I have a solution with 2 projects, A and B. B references A. Also, B references C which is a dll located in Solution/libs A and B are supposed…
javros
  • 825
  • 10
  • 31