how to push the version into the .nuspec for chocolatey?

eric's Avatar


27 Aug, 2014 01:59 PM

How can I get the ${version} number passed into the .nuspec file so chocolatey can use it?

  1. 1 Posted by eric on 27 Aug, 2014 02:55 PM

    eric's Avatar

    I did it with some powershell:

    cat timberwinr.nuspec.template|%{$_-replace "\$\{version\}",$env:APPVEYOR_BUILD_VERSION} > timberwinr.nuspec

    Replaces ${version} with the version and writes it out as the .nuspec file.

  2. Support Staff 2 Posted by Feodor Fitsner on 27 Aug, 2014 04:13 PM

    Feodor Fitsner's Avatar

    Or you can specify version in nuget pack command. Otherwise, if nuget pack is run against VS project file it extracts package version from assembly meta-information.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac