The Windows SDK version 10.0.15063.0 was not found [ Nvidia Cuda GPU Sample Code Compilation]

I get the below error message snippet a lot while trying to compile Nvidia Cuda 10 samples for testing Cuda GPU development [ c++ code]:

The Windows SDK version 10.0.15063.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”.
145>Done building project “topologyQuery_vs2017.vcxproj” — FAILED.

Solution l have found is to double check the Visual Studio 2017 installer and check installing below. It seems even though l have a full VS 2017 installation with all the default sections installed, a more recent SDK is installed on my workstation.

I run Windows 10 Home together with Visual Studio 2017 Enterprise Edition, and have Nvidia Cuda 10 installed for GPU programming.

After doing above, l was able to successfully compile most of the Cuda Code samples as shown below, without the previous error. Yes!!

Making an offline installer for Visual Studio 2017

This is based on an article by Scott Hanselman – click here for it.

Below code worked for me

vs_community.exe –layout c:\vscommunity\vs2017offline –lang en-US –add Microsoft.VisualStudio.Workload.Azure Microsoft.VisualStudio.Workload.ManagedDesktop Microsoft.VisualStudio.Workload.NetCoreTools Microsoft.VisualStudio.Workload.NetWeb