Specify configuration based on image, but setting is ignored

Zev Spitz's Avatar

Zev Spitz

Jun 21, 2019 @ 12:07 AM

I am trying to pair a specific solution configuration with a specific image:

  • Visual Studio 2019 -> ReleaseCI configuration
  • Visual Studio 2017 -> ReleaseCI2017 configuration

I've written the following in my appveyor.yml:

image:
  - Visual Studio 2017
  - Visual Studio 2019

for:
- 
  matrix:
    only:
      - image: Visual Studio 2019
    
  configuration: ReleaseCI

- 
  matrix:
    only:
      - image: Visual Studio 2017
    
  configuration: ReleaseCI2017

but Appveyor still tries to build the solution's Debug configuration. How can I fix this?

  1. Support Staff 1 Posted by Owen McDonnell on Jun 21, 2019 @ 04:36 PM

    Owen McDonnell's Avatar

    It will work as you expect if you use environment variables like this...

    for:
    - 
      matrix:
        only:
          - image: Visual Studio 2019
        
      environment:
        configuration: ReleaseCI
    
    - 
      matrix:
        only:
          - image: Visual Studio 2017
        
      environment:
        configuration: ReleaseCI2017
    
  2. Ilya Finkelshteyn closed this discussion on Aug 21, 2019 @ 09:01 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? 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