# Cuda 9.2 does NOT work with Visual Studio 2017 15.7.1

**URL:** <https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368>\
**Category:** CUDA Setup and Installation\
**Created:** [May 17, 2018, 10:25am UTC](https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368 "2018-05-17T10:25:43Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![RickBlacker](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@RickBlacker](https://forums.developer.nvidia.com/u/RickBlacker)\
**Post date:** [June 4, 2018, 3:51pm UTC](https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368/21 "2018-06-04T15:51:11Z")

</div>

Yep, worked for me too! At least getting it installed, I have not tried to compile anything yet. Thanks stuwmp!!!

---

<div class="post-metadata">

**Author:** ![james.r.mainwaring](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@james.r.mainwaring](https://forums.developer.nvidia.com/u/james.r.mainwaring)\
**Post date:** [June 6, 2018, 11:54am UTC](https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368/22 "2018-06-06T11:54:20Z")

</div>

This fiasco has done us a massive favour to be honest.

It forced us to consider whether locking ourselves to one vendor is the sensible way to go. We now have our application working (very well) with Vulkan, and I am SO pleased we did.

It means we can use non-NVIDIA cards in machines that were sitting around doing nothing until now. And our students can run our application on their machines if they have powerful AMD cards for instance. They are obviously pleased too!

Thanks NVIDIA / Microsoft - worked out better for us in the end :-)

---

<div class="post-metadata">

**Author:** ![PaulK\_UK](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@PaulK\_UK](https://forums.developer.nvidia.com/u/PaulK_UK)\
**Post date:** [June 15, 2018, 11:52pm UTC](https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368/23 "2018-06-15T23:52:19Z")

</div>

I got some of the sample programs to build but when trying a simple program from the book Cuda for Engineers, dist\_v2\_cuda example wouldn’t compile and I got the same message about the version of VS not being compatible and the line with **device** was shown with the red squiggles etc. I’m using VS 2017 15.7.x.

Has anyone got it working with 15.6.x?  
I’m just starting out with CUDA and these issues arn’t encouraging.

Is there any news of a solution or patch yet?

---

<div class="post-metadata">

**Author:** ![sshinderman](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sshinderman](https://forums.developer.nvidia.com/u/sshinderman)\
**Post date:** [June 16, 2018, 12:35am UTC](https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368/24 "2018-06-16T00:35:22Z")

</div>

PaulK\_UK,  
I was able to get that sample running (cloned from github here: [GitHub - myurtoglu/cudaforengineers: Source code repository for the projects from CUDA for Engineers](https://github.com/myurtoglu/cudaforengineers))

Under Project-\>Build Customizations changed from CUDA7.5 to CUDA9.2

(you might need that macro change I mentioned too ;) )

E:\dev\cudaforengineers\dist\_v2\_cuda\x64\Debug\dist\_v2\_cuda.exe  
i = 32: dist from 0.500000 to 0.507937 is 0.007937.  
i = 33: dist from 0.500000 to 0.523810 is 0.023810.  
i = 34: dist from 0.500000 to 0.539683 is 0.039683.  
i = 35: dist from 0.500000 to 0.555556 is 0.055556.  
i = 36: dist from 0.500000 to 0.571429 is 0.071429.  
i = 37: dist from 0.500000 to 0.587302 is 0.087302.  
etc – does this look correct?

![BuildCustomization.PNG](https://global.discourse-cdn.com/nvidia/original/2X/c/cf5a44de3a613b2051a168f6b4c009b88546d733.png)

![BuildCustomization.PNG](https://global.discourse-cdn.com/nvidia/original/2X/c/cf5a44de3a613b2051a168f6b4c009b88546d733.png)

---

<div class="post-metadata">

**Author:** ![PaulK\_UK](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@PaulK\_UK](https://forums.developer.nvidia.com/u/PaulK_UK)\
**Post date:** [June 16, 2018, 7:07am UTC](https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368/25 "2018-06-16T07:07:53Z")

</div>

I changed the host\_config file as you described, and while that got rid of the incompatibility message, the build errors persisted.

Your output looks correct. It shows the data from element 32 to 64 first then 0 to 31. The book says something about sorting out that issue later, I just havent got that far yet.

I downloaded VS2017 version 15.6.7 and will try installing everything again next week. Yet more time to waste…

---

<div class="post-metadata">

**Author:** ![AeroClassics](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@AeroClassics](https://forums.developer.nvidia.com/u/AeroClassics)\
**Post date:** [June 20, 2018, 4:59am UTC](https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368/26 "2018-06-20T04:59:07Z")

</div>

While I agree that it is very frustrating when the two major corporations cannot work together, but I will give some slack as Nvidia seems to kick out new releases at breakneck speed. It seems hard enough to keep up with them much less adding VS 2017 into the mix. For my own sanity, I keep both VS 2015 and VS 2017 (15.5.1) on my machine. I also have Cuda 8.0, 9.0, 9.2 and 9.2 installed. I find VS 2015 is the better tool for Cuda stuff and VS 2017 for running Python since it supports 3.6.

I am building the Cuda 9.2 samples with VS 2015 while building OpenCV 3.4.1 with support for Cuda 9.2.After that I will build dlib 19.13 with Cuda 9.2. I had Tensorflow-GPU running and I will see if it is worth upgrading to 9.2.

Will all this work? Don’t know yet. But I will know soon. I need a reliable Windows 10 environment and a Ubuntu 16.04 environment and my new dual GPU (p-500’s) will be here tomorrow.

Doug

---

<div class="post-metadata">

**Author:** ![alferganh3](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@alferganh3](https://forums.developer.nvidia.com/u/alferganh3)\
**Post date:** [June 21, 2018, 8:45pm UTC](https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368/27 "2018-06-21T20:45:07Z")

</div>

what is the cudnn version you used and what visual studio version?  
i have gtx 1060 nvidia card , i failed to make my GPU work  
please let me know if you have any idea how to set my GPU with windows 10 and better in annacoda env.

thank you in advance

---

<div class="post-metadata">

**Author:** ![vacaloca](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@vacaloca](https://forums.developer.nvidia.com/u/vacaloca)\
**Post date:** [June 22, 2018, 1:13pm UTC](https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368/28 "2018-06-22T13:13:03Z")

</div>

Didn’t see it in this thread, so pointing folks to the downloadable installer for MSVS that works with the latest 9.2 CUDA installer: (release 15.6.7 or earlier)

> **[Visual Studio 2017 Release History](https://learn.microsoft.com/en-us/visualstudio/releases/2017/vs2017-relnotes-history)**
>
> A list of released versions and build numbers for Visual Studio 2017.

---

<div class="post-metadata">

**Author:** ![eng.moni2012](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@eng.moni2012](https://forums.developer.nvidia.com/u/eng.moni2012)\
**Post date:** [June 23, 2018, 6:57pm UTC](https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368/29 "2018-06-23T18:57:59Z")

</div>

I have tried to install CUDA 9.0 on VS 2017 15.7.4 but still has an error:

```auto
The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin\nvcc.exe" -gencode=arch=compute_30,code=\"sm_30,compute_30\" --use-local-env --cl-version 2015 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64" -x cu -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include" -G --keep-dir x64\Debug -maxrregcount=0 --machine 64 --compile -cudart static -g -DWIN32 -DWIN64 -D_DEBUG -D_CONSOLE -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /FS /Zi /RTC1 /MDd " -o x64\Debug\kernel.cu.obj "C:\Users\amani\source\repos\TestCuda9.0_2017\TestCuda9.0_2017\kernel.cu"" exited with code 53.

```

Is it possible to run CUDA 9.1 or even 9.0 on VS 2017 15.7.4 ? or I have to install an earlier release ?

---

<div class="post-metadata">

**Author:** ![fancynapkin](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@fancynapkin](https://forums.developer.nvidia.com/u/fancynapkin)\
**Post date:** [June 23, 2018, 10:50pm UTC](https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368/30 "2018-06-23T22:50:56Z")

</div>

> [@](#):
>
> **installing CUDA 9.2 with VS2017 integration worked for me this way:**

Did the templates also install correctly? I tried this and they’re missing.

---

<div class="post-metadata">

**Author:** ![vacaloca](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@vacaloca](https://forums.developer.nvidia.com/u/vacaloca)\
**Post date:** [June 24, 2018, 1:40pm UTC](https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368/31 "2018-06-24T13:40:23Z")

</div>

> [@eng.moni2012](#):
>
> I have tried to install CUDA 9.0 on VS 2017 15.7.4 but still has an error:
> 
> ```auto
> The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin\nvcc.exe" -gencode=arch=compute_30,code=\"sm_30,compute_30\" --use-local-env --cl-version 2015 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64" -x cu -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include" -G --keep-dir x64\Debug -maxrregcount=0 --machine 64 --compile -cudart static -g -DWIN32 -DWIN64 -D_DEBUG -D_CONSOLE -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /FS /Zi /RTC1 /MDd " -o x64\Debug\kernel.cu.obj "C:\Users\amani\source\repos\TestCuda9.0_2017\TestCuda9.0_2017\kernel.cu"" exited with code 53.
> 
> ```
> 
> Is it possible to run CUDA 9.1 or even 9.0 on VS 2017 15.7.4 ? or I have to install an earlier release ?

You would need to at the very least install the previous (15.6) toolset and compile with it. The visual studio installer should have an option for that, Or install a previous version, yes.

---

<div class="post-metadata">

**Author:** ![GLJeff](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@GLJeff](https://forums.developer.nvidia.com/u/GLJeff)\
**Post date:** [August 4, 2018, 4:09am UTC](https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368/32 "2018-08-04T04:09:55Z")

</div>

> [@](#):
>
> **installing CUDA 9.2 with VS2017 integration worked for me this way:**
> 
> **1)** extract cuda\_9.2.88\_win10.exe to a folder
> 
> **2)** in _\CUDAVisualStudioIntegration_ edit _CUDAVisualStudioIntegration.nvi_
> 
> and delete lines 88 to 111:
> 
> ```auto
> <custom phase="handleExistingNsight" action="HandleExistingNsight"/>
> <custom phase="detectDisableCallHome" action="DetectDisableCallHome"/>
> <msi platform="x86" phase="NsightMSINoTraffic" name="${{NsightMSI}}" condition="NsightMSIActionActiveAndNoTraffic" installText="Installing Nsight Visual Studio Edition">
> <arg name="CUDAINSTALLER" value="true"/>
> <arg name="DISABLE_NV_CH" value="1"/>
> </msi>
> <msi platform="x86" phase="NsightMSITraffic" name="${{NsightMSI}}" condition="NsightMSIActionActiveAndTraffic" installText="Installing Nsight Visual Studio Edition">
> <arg name="CUDAINSTALLER" value="true"/>
> <arg name="DISABLE_NV_CH" value="0"/>
> </msi>
> <confirm phase="Confirm-install" when="install" condition="NsightMSIActionActive">
> <fileExists target="${{CommonAppData}}\NVIDIA Corporation\Nsight\Nsight_${{nsightVersion}}_InstallSummary.xml"/>
> </confirm>
> <standard phase="copytemp" condition="NsightMSIActionActive">
> <copyFile source="NVIDIA_Nsight_Visual_Studio_Edition_Win64_5.6.0.18099.msi" target="${{CommonAppData}}\NVIDIA Corporation\Nsight\NVIDIA_Nsight_Visual_Studio_Edition_Win64_5.6.0.18099.msi" />
> 
> </standard>
> <standard phase="createStartMenuStortcuts" condition="NsightMSIActionActive">
> <createShortcutGroup location="startMenu" linkGroup="${{NsightProgramGroup}}"/>
> <createShortcutLink location="startMenu" targetPath="${{CommonAppData}}\NVIDIA Corporation\Nsight\NVIDIA_Nsight_Visual_Studio_Edition_Win64_5.6.0.18099.msi" linkGroup="${{NsightProgramGroup}}" linkName="Nsight Redistributable"/>
> </standard>
> <custom phase="ParseWarningPage" action="ReadWarningPage" condition="NsightMSIActionActive"/>
> 
> <msi platform="x86" phase="NVTXMSI" name="${{NVTXMSI}}" installText="Installing NVTX"/>
> 
> ```
> 
> (wouuld normally install Nsight & NVTX)
> 
> **3)** run the setup with VS integration (should work now)
> 
> **4)** from _\CUDAVisualStudioIntegration_ then manually install:  
> NVIDIA\_Nsight\_Visual\_Studio\_Edition\_Win64\_5.6.0.18099.msi  
> NVIDIA NVTX Installer.x86\_64.Release.v1.21018621.Win64.msi
> 
> **5)** as sshinderman mentioned edit _C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include\crt\host\_config.h_ and change line 131 from
> 
> ```auto
> #if _MSC_VER < 1600 || _MSC_VER > 1913
> 
> ```
> 
> to
> 
> ```auto
> #if _MSC_VER < 1600
> 
> ```
> 
> all samples compiled successful :)

NVidia needs to hire you. After retargeting the solutions, the examples actually compiled. Thanks.

---

<div class="post-metadata">

**Author:** ![sir.seko](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/sir.seko/32/77397_2.png) [@sir.seko](https://forums.developer.nvidia.com/u/sir.seko)\
**Post date:** [September 6, 2018, 7:38pm UTC](https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368/33 "2018-09-06T19:38:40Z")

</div>

If anyone’s still having this problem, do this:

1. open c:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include\crt\host\_config.h
2. find this line: #if \_MSC\_VER \< 1600 || \_MSC\_VER \> 1913
3. replace it with this: #if \_MSC\_VER \< 1600
4. observe:  
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

:)

Should probably work with future version conflicts as well.

---

<div class="post-metadata">

**Author:** ![LukeCuda](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@LukeCuda](https://forums.developer.nvidia.com/u/LukeCuda)\
**Post date:** [September 7, 2018, 11:20am UTC](https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368/34 "2018-09-07T11:20:00Z")

</div>

nvidia with its billions cant do it but simple users can. love it.

---

<div class="post-metadata">

**Author:** ![obermann1995](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@obermann1995](https://forums.developer.nvidia.com/u/obermann1995)\
**Post date:** [September 10, 2018, 10:41pm UTC](https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368/35 "2018-09-10T22:41:03Z")

</div>

Hey guys,  
first of all this issue is really driving me nuts. I have been trying to install the CUDA v9.2 version on my laptop (XPS5970) for the last couple of days and could not get it to work at all. After a while I had found this blog and was relieved that the steps mentioned above would resolve this issue, but unfortunately I still get the error below after I had done replaced the code segment above. I also tried to reinstall it multiple times, but it didn’t seem to work. I would appreciate any help I can get on this.

The error after I have done all the steps above:

1\>------ Build started: Project: matrixMul, Configuration: Debug x64 ------  
1\>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Platforms\x64\PlatformToolsets\v141\Toolset.targets(36,5): 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”.  
1\>Done building project “matrixMul\_vs2017.vcxproj” – FAILED.  
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

PS: Just so that you guys know, I am not a developer and am just looking to maximizing my computing power for deep learning as this is a field of interest to me. Therefore I have only basic understanding of the art of computer programming.

---

<div class="post-metadata">

**Author:** ![GLJeff](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@GLJeff](https://forums.developer.nvidia.com/u/GLJeff)\
**Post date:** [September 10, 2018, 11:26pm UTC](https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368/36 "2018-09-10T23:26:03Z")

</div>

Ober, that is the error you want to have because it’s so easy to fix. Just right click the solution and click retarget solution. Pick whatever version of the windows SDK you have installed. You should be able to compile.

---

<div class="post-metadata">

**Author:** ![cudahead](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@cudahead](https://forums.developer.nvidia.com/u/cudahead)\
**Post date:** [September 20, 2018, 8:17am UTC](https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368/37 "2018-09-20T08:17:27Z")

</div>

Wonderful news: CUDA 10 is out and the documentation says: “Starting with CUDA 10.0, nvcc supports all versions of Visual Studio 2017 (past and upcoming updates)”.

---

<div class="post-metadata">

**Author:** ![iballard](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@iballard](https://forums.developer.nvidia.com/u/iballard)\
**Post date:** [September 20, 2018, 12:23pm UTC](https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368/38 "2018-09-20T12:23:12Z")

</div>

Yeah, right, compute 7.0 / 7.1 will not work (Cuda 10), I get compile errors on Windows 10 system.

If I remove these, the program will compile with Cuda 10.

They work fine in Cuda 9.2.

Nvidia — What gives ?

---

<div class="post-metadata">

**Author:** ![gopinathk](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@gopinathk](https://forums.developer.nvidia.com/u/gopinathk)\
**Post date:** [September 21, 2018, 11:43am UTC](https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368/39 "2018-09-21T11:43:59Z")

</div>

Hello

I have installed cuda 9.0 and mirosft visual studio 2017  
I try to open cudA samples I am facing following issue

error : Designtime build failed for project ‘C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.2\0\_Simple\matrixMul\matrixMul\_vs2017.vcxproj’ configuration ‘Debug|x64’. IntelliSense might be unavailable.  
Set environment variable TRACEDESIGNTIME = true and restart Visual Studio to investigate.

However I have added environment variable still my error is persist

it would be great if some one can help me to resolve this issue

Thank you

Gopi

---

<div class="post-metadata">

**Author:** ![AeroClassics](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@AeroClassics](https://forums.developer.nvidia.com/u/AeroClassics)\
**Post date:** [September 21, 2018, 6:07pm UTC](https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368/40 "2018-09-21T18:07:43Z")

</div>

I am sure no one wants to here this but here goes. I do not trust VS 2017, seen too many odd behaviors when work on large C# applications. Never got VS2017 to work with Cuda.anything. So I use VS 2015 with Cuda 8.0, 9.0, 9.1 and 9.2.

Doug

[Previous page](https://forums.developer.nvidia.com/t/cuda-9-2-does-not-work-with-visual-studio-2017-15-7-1/61368.md?page=1)
