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

How to specify commit and branch in csproj for nuget package creation

So currently you could configure the branch and commit a .nuspec (see reference):
Julian
  • 33,915
  • 22
  • 119
  • 174
7
votes
1 answer

NuGet doesn't copy config file

I've tried many different things now, none of which seem to work out as expected. I would like to share an example config(or image or whatever) file with my library that someone would be able to use and derive from. I tried to default to just To do…
Kjellski
  • 925
  • 10
  • 24
6
votes
1 answer

NuGet to copy files into the project directory

I've created a .nuspec file which packages a bunch of .proto files for sharing between projects. This is great. Unfortunately, for the .proto files to be built, they need to be actually copied over to the project directory, not just referenced. Note…
MBender
  • 5,395
  • 1
  • 42
  • 69
6
votes
1 answer

VSTS: ##[error]No value was found for the provided environment variable

I've spent numerous hours trying to figure this one out and simply cannot. FWIW, this projects packs fine from a local command line and from TeamCity. It is also building on VSTS but this error makes the task fail. What environment variable is the…
Will Tartak
  • 548
  • 7
  • 17
6
votes
1 answer

Targeting Specific Framework for NuGet Package in .nuspec

Is there a way to pack and push a NuGet package to a specific framework, in my case it being net35? I want to push a package so when other's install it, it will show as targetFramework="net35" in their packages.config. Can I specify this in the…
Corghee
  • 133
  • 2
  • 6
6
votes
0 answers

NuGet Package icon is not updated

We are using Team city as an internal NuGet repository. I have added an icon url to my nuspec file and placed the icon file on an IIS with Content Browsing enabled. And the icon shows up in the NuGet Manager in Visual Studio. Now I want to update…
Michael
  • 3,350
  • 2
  • 21
  • 35
6
votes
1 answer

NuGet direct project references as versioned dependencies

I have 2 Projects Libraries in my Example Solution > Visual Studio. I directly reference one of them in the other. When I now publish my nuget package, on the dependency overview I get that my directly referenced nuget is >= 1.0.0.0, when I do it…
Mikatsu
  • 530
  • 2
  • 4
  • 15
6
votes
0 answers

How can I include a config file in a nuget package

I would like to ask how I can inlude a configuration file in a nuget package. I have an aseembly, that needs a configuration file, and in order to make it easy to use, I want the config file to be copied during the build process of the nuget package…
6
votes
2 answers

Nuget Dependencies not getting installed

I am running a private Nuget Server locally on IIS. I am creating packages and uploading them all via commadline using nuget.exe (Later on I have to put this on build server, hence the command line). However there is one issue I am stuck at. I am…
NotAgain
  • 1,927
  • 3
  • 26
  • 42
6
votes
1 answer

Multiple .nuspec files inside a project's directory?

Is it possible to have multiple nuspec files inside a single directory for the same project and still be able to merge the project and the specified nuspec file. I wonder if something like this is possible: nuget pack MyProject.csproj…
Ivan Zlatanov
  • 5,146
  • 3
  • 29
  • 45
5
votes
1 answer

How to define the successor package ID after a rename of the NuGet Package ID

I know, you should not change the Package ID of a NuGet Package. But I did, because of a big refactoring. Now I want to know if there is a proper way to define a successor NuGet package. Old ID in Nuspec: OldLibrary1 New ID in Nuspec/csproj file:…
rittergig
  • 715
  • 1
  • 5
  • 16
5
votes
2 answers

Pass variable to nuspec with dotnet pack

When using dotnet pack, how do I pass a variable to my nuspec file? I am trying to pass the version. Here is the nuspec:
Don Chambers
  • 3,798
  • 9
  • 33
  • 74
5
votes
1 answer

NuGet Dependency Strategy

I am splitting many of my application models and interfaces into its own nuGet package. The question is: Is there any good practice recommended strategy when creating nuGet packages regarding the definition of dependencies? Sometimes a package A…
diegosasw
  • 13,734
  • 16
  • 95
  • 159
5
votes
1 answer

How to create a nuget package supporting multiple platforms

First of all I read a few articles in this regards like https://learn.microsoft.com/en-us/nuget/create-packages/supporting-multiple-target-frameworks but they don't cover my scenario and whatever I tried didn't work. I have totally 4 assemblies with…
Alex
  • 655
  • 1
  • 8
  • 16
5
votes
2 answers

Nuget files being packed into the wrong places

I have a nuget spec file with the file spec:
Alex C
  • 16,624
  • 18
  • 66
  • 98
1 2
3
16 17