Windows SDK Version not found


#1

error MSB8036: The Windows SDK version 10.0.17763.0 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting “Retarget solution”.

Been encountering this. Is there any way to fix it? Or am I missing something?

Here’s my .yml

language: cpp

os: windows
env:
  - MSBUILD_PATH="c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
script:
  - export PATH=$MSBUILD_PATH:$PATH
  - MSBuild.exe MySln.sln -t:Clean -t:Build -p:Configuration=Release;

#2

Adding choco install helps.

install: 
  - choco install windows-sdk-10-version-1809-all

But build now takes about 6 minutes. Is it required to install everytime? Or just the first run?

230 - 250 seconds of installing SDK.

Is there any way to cache it instead?