NuGet publishing using multiple images

Luca Piccioni's Avatar

Luca Piccioni

31 Oct, 2017 10:37 PM

Having the following environment:

    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
      SLN_PATH: OpenGL.Net_VC14.sln
      PUBLISH_NUGET: true
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
      SLN_PATH: OpenGL.Net_VC15.sln
      PUBLISH_NUGET: false

How I can configure the deploy section for publishing artifacts conditionally?
Essentially I want to control which image is used to publish artifacts, while testing on other images. I doubt that artifacts are published twice...

The complete configuration can be found at

  1. Support Staff 1 Posted by Ilya Finkelshte... on 31 Oct, 2017 11:02 PM

    Ilya Finkelshteyn's Avatar

    The same way as you did with tags, using conditional deployment.

      - provider: NuGet
        . . .
          appveyor_repo_tag: true
          PUBLISH_NUGET: true

    Also I would recommend to condition each nuget pack statement with if %PUBLISH_NUGET%==true to save some build time.

    P.S. I understand the idea with publish_nuget: %PUBLISH_NUGET% but this setting cannot be substituted with environment variable right now.

  2. 2 Posted by Luca Piccioni on 31 Oct, 2017 11:35 PM

    Luca Piccioni's Avatar

    Many thanks. Now it seems so obvious...

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

18 Jun, 2018 12:07 AM
17 Jun, 2018 04:04 PM
16 Jun, 2018 08:06 PM
16 Jun, 2018 07:30 PM
16 Jun, 2018 09:22 AM


15 Jun, 2018 09:31 PM
15 Jun, 2018 08:31 PM
15 Jun, 2018 04:29 PM
15 Jun, 2018 12:39 PM
15 Jun, 2018 12:37 PM
15 Jun, 2018 08:21 AM