MSVS 2019 and CUDA 10.1 Issues

Hi,

Facing some odd issues after installing MSVS 2019 and CUDA 10.1

  1. No NVIDIA-> CUDA option is coming under NEW PROJECTs

  2. Trying to build a sample project always tells:

Severity	Code	Description	Project	File	Line	Suppression State
Error	MSB8036	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".	bandwidthTest	C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v150\Microsoft.Cpp.WindowsSDK.targets	46

even though I Retargeted Solution to Windows SDK 10.0 (latest) and Platform Toolset to 142, the same error message is coming.

  1. In the Build Dependencies customizations two CUDA checkboxes are coming:
CUDA 10.1 (.targets, .props) -> $(VCTargetsPath)\Buildcustomizations\CUDA 10.1.targets

and

CUDA 10.1 (.targets) -> $(CUDAPropsPath)\CUDA 10.1.targets

Kindly help to resolve these problems.

Thanks.

  1. I don’t know about this one. I am staying with VS2017 for a while. However, what I have done is I first got some sample programs to compile and then I copy and edit the project files that worked for other projects. It’s clunky but it works for me.

  2. To fix this you have to select the appropriate Windows SDK Version. In VS2017 this is on the project’s properties, Configuration Properties, General page. There should be a drop-down selection entry there with the available SDK versions listed. The latest I have is 10.0.17763.0. You currently have an older version selected.

  3. I don’t understand your description of the problem. These two items have caused me problems though. When I updated from CUDA v10.0 to v10.1 it broke those things in all my projects and the samples. My solution was to define another environment variable, CUDA_VERSION, and I substituted that in the project files and it works.

Hi,

Thanks for replying.

2. To fix this you have to select the appropriate Windows SDK Version. In VS2017 this is on the project's properties, Configuration Properties, General page. There should be a drop-down selection entry there with the available SDK versions listed. The latest I have is 10.0.17763.0. You currently have an older version selected.

I’ve changed my Windows SDK to 10.0.17763.0 and the platform toolset to v142 as according to your advice.
But I’m still getting the same error:

Error	MSB8036	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".	bandwidthTest	C:\Program Files (x86)\Microsoft Visual Studio019\Community\MSBuild\Microsoft\VC\v150\Microsoft.Cpp.WindowsSDK.targets

Thanks.

You should look more carefully at those property pages. If it is still asking for 10.0.15063.0 then you didn’t get it changed correctly. By “correctly” I mean it needs to be changed for all modules in your project and for the build mode you have selected.

Nope! Could not find anywhere else in the properties that referring to 10.0.15063.0.

Also in VS 2017 and CUDA 9.1, under New Projects -> Installed, NVIDIA->CUDA 9.1 used to appear. Could not see that kind of entry in CUDA 10. Is this ok?

Thanks

I found a solution to this.

  1. Copying the content of the folder:
    C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\extras\visual_studio_integration\MSBuildExtensions

to:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations

  1. Close all running instances of Visual Studio.
    Go to C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\NVIDIA.
    Create a directory here called CUDA 10.1 Wizards, then create a sub-directory underneath it called 10.1.

  2. In this 10.1 sub-directory, create shortcuts to: (VS will not allow to create the shortcuts directly here. Create the shortcuts on the desktop and move them from there to this 10.1 sub-directory):

C:\ProgramData\NVIDIA GPU Computing Toolkit\v10.0\extras\visual_studio_integration\CudaProjectVsWizards\2019\extension.vsixmanifest

and

C:\ProgramData\NVIDIA GPU Computing Toolkit\v10.1\extras\visual_studio_integration\CudaProjectVsWizards\Nvda.Vsip.CudaWizards.dll.pkgdef

  1. Once these shortcuts are in place, open a Visual Studio 2019 developer command prompt in administrator mode and run ‘devenv.com /setup /nosetupvstemplates’.

  2. Re-start Visual Studio 2019 and see if the project templates are available now.

All information collected above are from the forums. Only summarizing it here.

However the intellisense does not work.

Thanks.

This works in 2017, but not in 2019.

It’s is work for me in 2019, thanks.

@prdas31 Thankyou! You totally solved my issues with 10.1 and VS2019, all works now save for a couple of intellisense syntax errors here and there, which don’t seem to cause any build and runtime issues!

@p80542002 and @spee2k12, did you only try the steps given by @prdas31? Because I tried it but it didn´t work. Actually, the template was available, but there was an error when creating the project.
Also, I don´t have the C:\ProgramData\NVIDIA GPU Computing Toolkit\v10.0\extras\visual_studio_integration\CudaProjectVsWizards\2019 directory, I have C:\ProgramData\NVIDIA GPU Computing Toolkit\v10.0\extras\visual_studio_integration\CudaProjectVsWizards\2017 instead. Does it happened to you? I am using VS2019 Enterprise, by the way.

I hope you can help. Thank you.