Passing version variable to powershell build_script

oeybru's Avatar


22 Feb, 2021 08:22 PM


I'm struggling with passing the version nr string as input argument to my build script

Assembly info setup:

  patch: true
  file: AssemblyInfo.*
  assembly_version: '{version}'
  assembly_file_version: '{version}'

My build script, the problem is the value to --appVersion, All I get to the script is the string "version" instead of the actual value. I have tried lots of variants with curly braces, dollar sign, quotes etc.

  - ps: .\build.ps1 --buildPath="./path/to/bin/Release" --appId="MyAppName" --appVersion=version
How do I pass in the version value correct?
This is maybe a very basic powershell question, but I'm hoping the get some hints :)
  1. Support Staff 1 Posted by Feodor Fitsner on 22 Feb, 2021 08:26 PM

    Feodor Fitsner's Avatar

    Try this one:

      - ps: .\build.ps1 --buildPath="./path/to/bin/Release" --appId="MyAppName" --appVersion=$env:APPVEYOR_BUILD_VERSION
  2. 2 Posted by oeybru on 22 Feb, 2021 09:33 PM

    oeybru's Avatar

    Thank you very much for the solution :)

  3. oeybru closed this discussion on 23 Feb, 2021 09:18 AM.

  4. oeybru re-opened this discussion on 23 Feb, 2021 09:18 AM

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

Recent Discussions

27 Jan, 2023 08:06 PM
27 Jan, 2023 08:05 PM
25 Jan, 2023 03:23 PM
25 Jan, 2023 03:22 PM
23 Jan, 2023 03:29 PM