Questions tagged [nuspec]

A 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.

253 questions
2
votes
1 answer

Specifying files to add to a nuget package in .csproj file

I am creating a nuget package from some code, but also need to deploy some tools with the package. In a .nuspec file, I can do this with the element, and this all works well. However when using a .nuspec file, the packageReferences from the…
cedd
  • 1,741
  • 1
  • 21
  • 34
2
votes
2 answers

Visual Studio - Publish dacpac as NuGet package in so other DB Projects can reference the DB

I'm working on setting up a new organization where we are currently using VS 2017 and creating many SQL Server (2016) DB projects. I've set up a private NuGet server on Azure to be able to use packages in each new project and my ideal solution would…
John Bustos
  • 19,036
  • 17
  • 89
  • 151
2
votes
1 answer

NuGet - NU5131: References declared in the nuspec file are not being packaged

I'm trying to reference two .dll files in a nupkg. I've added the files as references in the nuspec file: When i try…
Hamza Wasi
  • 79
  • 6
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
0 answers

Support the repository attribute in package metadata in Octopus Deploy

OctoPack / Octo.exe currently does not support the latest nuget XSD spec, and fails to run when newer elements are used in the nuspec: Octopus-deploy Version : Octopus 3.14.1 Repro steps: Create a new nuspec file with all the defaults and inside it…
Sahadevan
  • 323
  • 4
  • 16
2
votes
0 answers

Nuget package delivers an old version of my DLL

I wrote a NuGet package that when my other projects use it they get an old version of one of my DLLs. I include the newest version of my DLL as a reference in my NuGet project. Project1.nuspec:
JedK
  • 71
  • 5
2
votes
1 answer

Versions not resolving for Nuget packages

I am receiving a warning (which is treated as an error on my project) for an in-house developed Nuget package. I am not sure what I am doing wrong- according to the documentation, 1.0.0.13 >= 1.0.0 should resolve. The warning/error I am…
AndrewP
  • 1,598
  • 13
  • 24
2
votes
0 answers

Creating a NuGet Metapackage as a MSBuild Project

Is there any real way to create a NuGet metapackage as an msbuild .proj instead of directly using a nuspec? I want to do this so I can leverage other MSBuild functionality including PackageVersioning, including content files, etc. What I mean is…
Jeff
  • 35,755
  • 15
  • 108
  • 220
2
votes
1 answer

Package Manager Console vs Nuget.exe build file behavior

I have a .net 4.71 classic project to which I am trying to add nuget package I generated. When I use the Visual Studio package manager cli or interface files get added to the solution. When I add the package via nuget.exe (4.5.1.4879) those files…
2
votes
1 answer

How reproduce VS2017 Package Manager command "Update-Package -reinstall" with Nuget CLI

I've tried with Nuget Update, Nuget restore, but they are actually not the same and here's why: I've created a Nuget pkg only to distribute an executable file. When I install the Nuget the executable is added to my project so I can reference it and…
Sergio
  • 250
  • 1
  • 4
  • 18
2
votes
3 answers

validating .nuspec file with nuspec.xsd fails on 'package'

I'm trying to validate the following xml, which is inside of a .nuspec file: nuspec_test 1.2.3 Author Name
Derick Bailey
  • 72,004
  • 22
  • 206
  • 219
2
votes
0 answers

Nuget packages.config - 3rd Party dll's are not copied to the output directory

When I add my nuget package to a project with a package reference it works fine but when I add it to a project with a packages.config file the third party dll 'Software.Interop.program.dll' is not copied to the output directory. Here's my…
LorneCash
  • 1,446
  • 2
  • 16
  • 30
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

App.config XML transform from NuGet Package

I am attempting to follow these instructions to perform a simple XML transform on a target App.config file via a custom NuGet package. The app.config.transform file contains the following content:
wolfyuk
  • 746
  • 1
  • 8
  • 26
2
votes
1 answer

Only include wanted content files in NuGet package

I am building a nuget package from a c# class library project. The class library itself has files that are marked as build action=content and I can't change this. I don't want these content files in the nuget package. If I am using an empty files…
Jürgen Steinblock
  • 30,746
  • 24
  • 119
  • 189