dotnet pack doesn't let me provide my own nuspec
See original GitHub issueWhen I do “dotnet pack”, it synthesizes a .nuspec. This nuspec has several problems:
- Authors and Owners isn’t right
- requireLicenseAcceptance is wrong for my package
- URLs to license and product and icon are wrong
- It only has one dependency group on “.NETStandard”, but I wish to provide additional dependency groups so that UWP and .NET46 can consume my nuget package too
I wish to provide my own .nuspec file for it to use instead.
Expected behavior
If I do “dotnet pack” and my working directory already contains a .nuspec file, then it should use that.
Or: if I do “dotnet pack -h” then it should provide information on how to provide my own nuspec file.
Actual behavior
It doesn’t do either.
Environment data
dotnet --version
output: 1.0.0-beta-002133 on OSX
Issue Analytics
- State:
- Created 7 years ago
- Reactions:22
- Comments:34 (9 by maintainers)
Top Results From Across the Web
dotnet pack doesn't let me provide my own nuspec #5525
This nuspec has several problems: Authors and Owners isn't right; requireLicenseAcceptance is wrong for my package; URLs to license and product ...
Read more >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...
Read more >dotnet pack command - .NET CLI
The dotnet pack command builds the project and creates NuGet packages. The result of this command is a NuGet package (that is, a...
Read more >Create a package using the nuget.exe CLI
A detailed guide on designing and creating a NuGet package, including files and versioning.
Read more >Dotnet pack - include referenced projects
One disadvantage of the nuspec approach is that you have to include package references in your nuspec file manually and that those package ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
“dotnet-pack is going to be replaced by nuget pack” - https://github.com/dotnet/cli/issues/2893
And here I thought dotnet pack was intended to replace nuget pack. This tooling thrash is bonkers!
Okay, so as of April 23, 2017, should we be using nuget pack or dotnet nuget pack? If we use dotnet pack, is supporting separate nuspec files planned? Ultimately, I’m wondering how you’d go about specifying you’d like the spec to generate dependencies with ranges (e.g. <dependency id=“System.Logging” version=“[1,2)” />).
You can use
dotnet pack
against a project, and that csproj can include<NuspecFile>relative path here</NuspecFile>
within a<PropertyGroup>
. In order to get the right version number information into the nuspec, though, I have to have a build script generate that nuspec. I think what’s really missing is for this scenario to support the old $replacementtoken$ syntax, propagating values from the new csproj packaging tags.