-
Notifications
You must be signed in to change notification settings - Fork 906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new - Token replacement with in nuspec should more closely match nuget #2100
Comments
As long as we have the understanding that while Chocolatey builds on NuGet, they are not one and the same and there are likely going to be differences between how the two behave, I think this could be a good change indeed. |
Updated the title, I think that makes sense. Thoughts? |
Looking into this a little bit, using a nuspec with the following:
If you run
And using the following nuspec:
And then you run
So in both of these places, the output is similar. The difference comes in when you run the command:
For the first nuspec file, a file called
We should have better handling in this area, so that either one of two things is changed:
|
What You Are Seeing?
Within the scaffolded .nuspec template generated by a command such as choco new -n bob, there are some tokens for replacement. Since choco uses nuget pack, I was able to successfully replace the default token REPLACE with$version$ and remove the need to edit/substitute the file.
What is Expected?
Should the default choco new command scaffold a valid nuspec with proper tokens, and verify on pack that all tokens are set?
This might require a feature flag to ensure backwards compatibility in builds and updates to tutorials and help.
https://docs.microsoft.com/en-us/nuget/reference/nuspec#replacement-tokens
There is some variations between nuspec and csproj behavior, not sure if fixed.
NuGet/Home#1795
I got here from following the tutorial
https://chocolatey.org/courses/creating-chocolatey-packages/nuget-packages-and-nuspec
How Did You Get This To Happen? (Steps to Reproduce)
Output Log
Full Log Output
The text was updated successfully, but these errors were encountered: