Visual Studio 2019 build image only contains Visual Studio 2017

james.price's Avatar


19 Aug, 2020 05:23 AM

Due to new language features, we're upgrading all environments to Visual Studio 2019.
In AppVeyor, we've updated our project "Environment" configuration, and set the "Build Worker Image" to "Visual Studio 2019"
Unfortunately, when running vswhere.exe during our build process, the output shows that only Visual Studio 2017 Community is installed.

What am I missing in order to use VS 2019?

vswhere.exe output:

Visual Studio Locator version 1.0.62 [query version]
Copyright (C) Microsoft Corporation. All rights reserved.
instanceId: 028c8375
installDate: 4/8/2017 
installationName: VisualStudio/15.9.19+28307.1000
installationPath: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community
installationVersion: 15.9.28307.1000
displayName: Visual Studio Community 2017
description: Free, fully-featured IDE for students, open-source and individual developers
updateDate: 2020-01-16T06:46:11.6824577Z
enginePath: C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service
channelId: VisualStudio.15.Release
channelPath: C:\Users\appveyor\AppData\Local\Microsoft\VisualStudio\Packages_Channels\4CB340F5\catalog.json
  1. Support Staff 1 Posted by Feodor Fitsner on 19 Aug, 2020 08:26 PM

    Feodor Fitsner's Avatar

    Hi James,

    VS 2019 image doesn't have VS 2017 at all which means the build is not using VS 2019 image.

    If you are configuring the build via appveyor.yml then UI settings are ignored and you need to specify the image in YAML:

    image: Visual Studio 2019
  2. 2 Posted by james.price on 19 Aug, 2020 10:55 PM

    james.price's Avatar

    unfortunately we don't use the yml file at all. Just the Web configuration UI.

    Exporting the yml file from the web interface gives us this:
    (with image: Visual Studio 2019)

    version: '{build}'
      do_not_increment_build_number: true
      - feature/22.1.0-DocGenAPI
      - feature/3119-entitlements-update
      - imageStorage
      - feature/ci/octopusdeploy
      - dev/database-maintenance
    image: Visual Studio 2019
    configuration: Debug
    force_https_clone: true
    clone_folder: C:\b
    - ps: >-
        iex ((new-object net.webclient).DownloadString(''))
        Set-TimeZone -Name "AUS Eastern Standard Time"
        secure: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      sonarQube_project_backend: iApply_CORE_Backend
        secure: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      sonarQube_url: https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      sonarQube_project_frontend: iAppy_CORE_Frontend
      octopus_url: https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        secure: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      octopus_tenanttag: Hosting/DEMO-WEB-Shared
      octopus_envname: CORE-DEV
      docker_registry: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      docker_username: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        secure: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        secure: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    - mongodb
    - iis
    - ps: '"C:\b\Build\BuildServer\PreInstall.ps1" | iex'
    - ps: '"C:\b\Build\BuildServer\CI_Build.ps1" | iex'
    - ps: '"C:\b\Build\BuildServer\RunTests.ps1" | iex'
    - provider: Octopus
      push_packages: true
      server: https://ixxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        secure: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    - provider: Webhook
      method: POST
      content_type: application/json
      body: "{\n\"attachments\": [\n{{#passed}}{\n    \"text\": \"Hi <@{{committerEmail}}>, \n\n<{{buildUrl}}|iApply {{projectName}} Build {{buildVersion}} has passed>\n<{{commitUrl}}|Commit {{commitId}} by {{commitAuthor}}>\n{{commitMessage}}\n\nKind regards,\nDevOps Team\",\n\"color\": \"#39e600\"\n}{{/passed}}\n{{#failed}}{\n    \"text\": \"Hi <@{{committerEmail}}>, \n\nUnfortunately <{{buildUrl}}|iApply {{projectName}} Build {{buildVersion}} has failed>\n<{{commitUrl}}|Commit {{commitId}} by {{commitAuthor}}>\n{{commitMessage}}\n\n<{{buildUrl}}|Please click here to review more information about the failure.>\n\nKind regards,\nDevOps Team\",\n\"color\": \"#FF0000\"\n}{{/failed}}\n],\n   \"username\": \"iApply CI Server\"\n}"
      on_build_success: true
      on_build_failure: true
      on_build_status_changed: true
    - ps: '"C:\b\Build\BuildServer\BuildSuccess.ps1" | iex'
    - ps: '"C:\b\Build\BuildServer\BuildFinish.ps1" | iex'
  3. 3 Posted by james.price on 19 Aug, 2020 10:57 PM

    james.price's Avatar

    I should note that I didn't configure this account originally, but I can't find any custom settings that would prevent us from switching images.

    Of further interest, if I remote Desktop into the server while a build is running, Visual Studio 2015 and 2017 are all installed as well as some vs2012 tools (images attached). VS 2017 is at version 15.9.19.

  4. 4 Posted by james.price on 19 Aug, 2020 11:05 PM

    james.price's Avatar
  5. Support Staff 5 Posted by Feodor Fitsner on 20 Aug, 2020 12:04 AM

    Feodor Fitsner's Avatar

    Yep, it's definitely not a VS 2019 image. What do you have on "Events" tab of build results? There must've a record what cloud and image is used.

  6. 6 Posted by james.price on 20 Aug, 2020 02:02 AM

    james.price's Avatar

    Ahh yes, in "Job Events" it shows the following:
    ** Image found: Visual Studio 2017 (362)

    Timestamp                 Category       Event
    2020-08-20 9:47:42.747    Information    Decommissioning worker: 367a2707e6984eae99b500f2f40a3dd2
    2020-08-20 9:47:42.674    Warning        Job has already completed
    2020-08-20 9:47:42.674    Error          Job has failed
    2020-08-20 9:47:42.674    Information    Decommission worker in cloud 154: 367a2707e6984eae99b500f2f40a3dd2
    2020-08-20 9:19:45.217    Information    Job has started
    2020-08-20 9:19:41.870    Information    Check worker status in 240 seconds
    2020-08-20 9:19:41.479    Information    Provisioning worker of type 'HyperV': 367a2707e6984eae99b500f2f40a3dd2
    2020-08-20 9:19:41.371    Information    Provision worker in cloud 154: 367a2707e6984eae99b500f2f40a3dd2
    2020-08-20 9:19:41.355    Information    Build cache configured on cloud level: lw-obj-cache-1
    2020-08-20 9:19:41.355    Information    Artifact storage configured on cloud level: azure-artifacts-westus-v2
    2020-08-20 9:19:41.355    Information    Job scheduled to cloud 154
    2020-08-20 9:19:41.355    Information    Fetching clouds with name/group 'pro-vs2017' for account 1
    2020-08-20 9:19:41.355    Information    Image found: Visual Studio 2017 (362)
    2020-08-20 9:19:41.355    Information    Started scheduling job
    Account queue: 1 job(s)
    Running jobs: 1 job(s)
    Hosted jobs to run: 1 (2 max)
    Hybrid jobs to run: 5 (5 max)
  7. Support Staff 7 Posted by Feodor Fitsner on 20 Aug, 2020 02:05 AM

    Feodor Fitsner's Avatar

    Are you sure there is no appveyor.yml in the repo?

  8. 8 Posted by james.price on 20 Aug, 2020 02:43 AM

    james.price's Avatar

    argh, yes you're right... one of the dependencies we installed had it's own appveyor.yml file. This is why it stopped working at the same time recently.

    It doesn't appear in out code-base as the folder it's in, is outside the developer source folders.

    I've removed that file and will try again to see where we get to.

    Thanks for pointing this out for me!

  9. Support Staff 9 Posted by Feodor Fitsner on 20 Aug, 2020 03:12 PM

    Feodor Fitsner's Avatar

    No problem, thanks for the update!

  10. Feodor Fitsner closed this discussion on 20 Oct, 2020 09:03 PM.

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

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