$env:CONFIGURATION not set in deploy.ps1 script

kristian's Avatar


18 Feb, 2019 02:35 PM


after deployment my deploy.ps1 script is executed.
This line gets the variable APPVEYOR_PROJECT_NAME
$projectName = $env:APPVEYOR_PROJECT_NAME

however this variable is empty
$configurationName = $env:CONFIGURATION

According to this, it should be the configuration used for the artifact deployed.

Am i getting this wrong?

  1. Support Staff 1 Posted by Owen McDonnell on 18 Feb, 2019 10:28 PM

    Owen McDonnell's Avatar

    Are you deploying inline (as a step in the build process) or asynchronously via a deployment environment?

  2. 2 Posted by kristian on 19 Feb, 2019 06:45 AM

    kristian's Avatar


    Im deploying manually via the appveyor agent. Could that be the issue?
    Im deoploying a build with at specific configuration, so the information
    should be available?

  3. 3 Posted by kristian on 19 Feb, 2019 07:00 AM

    kristian's Avatar

    Oh, just realized that i might have been looking at the wrong varianble reference list.
    According to this list, the Configuration parameter is not available.

    So let me rephrase my question: is is possible to get the build configuration name when running deploy.ps1 ?

  4. Support Staff 4 Posted by Owen McDonnell on 19 Feb, 2019 10:11 PM

    Owen McDonnell's Avatar

    If you were doing inline deployment you could pass variables to the deployment provider in the deploy: section of the configuration, but for asynchronous deployment this is not possible so you could use a script like this to which you could add a configuration variable.

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

20 Mar, 2019 01:15 PM
20 Mar, 2019 11:09 AM
20 Mar, 2019 10:37 AM
20 Mar, 2019 09:01 AM
20 Mar, 2019 08:51 AM


20 Mar, 2019 02:33 AM
19 Mar, 2019 06:21 PM
19 Mar, 2019 06:03 PM
19 Mar, 2019 05:22 PM
19 Mar, 2019 05:08 PM
19 Mar, 2019 05:00 PM