No Cuda 10.1 runtime Template in Visual Studio 2019

I have installed Cuda 10.1 in Windows 10 and I have Visual Studio 2019. The existing sample CUDA projects build and run fine in Visual Studio but when I try to create a new project in Visual Studio 2019 there is no Cuda 10.1 runtime Template. I have installed Visual Studio Integration during CUDA installation and I’ve also copied the contents of

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

But still I didn’t found any CUDA Template in Visual Studio 2019.

I had problems getting Runtime 11.1 running, and did the following (I did the order has presented, not sure that matters but I suggest sticking to it):

1. Check / Create Project Template

I checked my older laptop and it had the Cuda Project template on:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\NVIDIA

So for me, I should have seen, but didn’t

CUDA 11.1 Wizards

So for you, it should be CUDA 10.1 Wizards.

If not, create the folder.

Inside the newly created folder, create another subfolder to for the version (11.1 for me, 10.1 for you).

Inside that folder, copy over the contents of

C:\ProgramData\NVIDIA GPU Computing Toolkit\v10.1\extras\visual_studio_integration\CudaProjectVsWizards

Note the version, and change accordingly.

Now you should have a file

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\NVIDIA\CUDA 10.1 Wizards\10.1\2019\extension.vsixmanifest

Open that file and ensure the following and save if having to update (make sure you open editor as Administrator in order to save)

InstallationTarget Id=“Microsoft.VisualStudio.Community” Version=“[15.0, 19.0]”

2. Repaired my installation Visual Studio (VS).

For some reason some installations of required dependencies of VS were not installed correct. I repaired it my selecting ‘Repair’ in the installed version of VS with Visual Studio Installer,

You will be asked to restart your computer for repairs to take effect. I suggest restarting even if you have to do Step 1.

I hope this helps you get back on track!

1 Like