How to install msbuild with a defined version?

moh.hassan20's Avatar


17 Aug, 2020 03:02 PM

The current version of msbuild of the image: Visual Studio 2019 is 16.6.0+5ff7b0c9e
How to install and build using msbuild 16.7.0+b89cb5fde of vs 2019 v16.7 (this version support C# 9)?

  1. Support Staff 1 Posted by Feodor Fitsner on 17 Aug, 2020 10:14 PM

    Feodor Fitsner's Avatar

    You probably need the latest .NET Core 3.1.400 which could be installed with the following script during the build:

    - ps: Invoke-WebRequest -Uri '' -UseBasicParsing -OutFile "$env:temp\dotnet-install.ps1"
    - ps: & $env:temp\dotnet-install.ps1 -Architecture x64 -Version '3.1.400' -InstallDir "$env:ProgramFiles\dotnet"

    Let me know if that worked.

    VS 2019 version 16.7.x installed that .NET Core. We will update the image on the next week.

  2. 2 Posted by moh.hassan20 on 21 Aug, 2020 04:32 PM

    moh.hassan20's Avatar

    I get a [parser error]

    Error parsing appveyor.yml: (Line: 14, Col: 9, Idx: 407) - (Line: 14, Col: 10, Idx: 408): While scanning an anchor or alias, did not find expected alphabetic or numeric character.

    It seems that yml don't accept the char & although the command can run on windows

  3. Support Staff 3 Posted by Feodor Fitsner on 21 Aug, 2020 08:04 PM

    Feodor Fitsner's Avatar

    Sorry about that. This is the fixed snippet:

    - ps: Invoke-WebRequest -Uri '' -UseBasicParsing -OutFile "$env:temp\dotnet-install.ps1"
    - ps: '& $env:temp\dotnet-install.ps1 -Architecture x64 -Version "3.1.400" -InstallDir "$env:ProgramFiles\dotnet"'
  4. 4 Posted by moh.hassan20 on 21 Aug, 2020 11:59 PM

    moh.hassan20's Avatar

    Thanks Feodor for help and support
    Netcore v3.1.401 is installed successfully.
    Now I can use c#9 with netcoreapp3.1

    Just a suggestion (feature request)
    It's nice if we can have an entry in appveyor.yml to auto install SDK like:

    dotnet: 3.1.401
  5. Support Staff 5 Posted by Feodor Fitsner on 23 Aug, 2020 01:54 AM

    Feodor Fitsner's Avatar

    Sure, thanks for the update!

  6. Feodor Fitsner closed this discussion on 23 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