I managed to use VS 2019 using the following commands:
before_install:
- choco install visualstudio2019buildtools --package-parameters "--includeRecommended --includeOptional"
- choco install visualstudio2019-workload-vctools
I hope it helps.