Cuda 9.2 does NOT work with Visual Studio 2017 15.7.1

When trying to compile CUDA samples the following error occurs:

c:\program files\nvidia gpu computing toolkit\cuda\v9.2\include\crt/host_config.h(133): fatal error C1189: #error: – unsupported Microsoft Visual Studio version! Only the versions 2012, 2013, 2015 and 2017 are supported!

Cuda 9.2 states to support: “Microsoft Visual Studio 2017 (RTW and Update 6)”

So I assume that means 15.6.7?

https://docs.microsoft.com/en-us/visualstudio/productinfo/installing-an-earlier-release-of-vs2017

Actually hacking around the _MSC_VER check with 15.7.1 has made the samples I have checked work so far… (15.7 was supposed to be a minor VS2017 update).

Of course I don’t trust it and cue all the “it’s not supported” comments.

I am getting the same error–finally managed to install CUDA 9.2 with local install. What is the hack you are referring to?

EDIT: Never mind, I have edited host_config.h to allow later versions and can now run some samples.

Hey guys… I just tried to install Cuda 9.2, but I’m running VS2017 (15.7.1) The install fails so I came here.
Is there no way to even get 9.2 to install if I have VS 2017 installed? Is the only option to uninstall Visual Studio first?

Cuda 9.2 installed without complaint for me for VS2017 15.7.1 even though it’s not officially supported etc. Maybe since the stealth release of 9.2 they edited a later installer to guard against that now?

Although as stated to be able to compile and run the Cuda 9.2 samples on VS2017 15.7.1 I had to hack the _MSC_VER check in the Cuda header files - no guarantees on how safe that is though of course. I have noticed rebuilds don’t quite work right all the time btw but I seem to remember having that problem before with earlier versions.

Today there is a VS2017 15.7.2 update too! As much as I sympathise with nVidia’s situation regards Microsoft’s VS2017 updates I think communication wise nVidia should have handled this much better.

Microsoft’s frequent stream of random VS2017 updates while well intentioned is a developer disaster, as opposed to the old system of more regularly spaced and forewarned updates and service packs to allow dependent partners and developers to keep reasonable pace. But then Microsoft is the company that has instigated forced software updates on end users in their latest OS which should be illegal and is actually a security risk. So I worry this is going to get worst as Microsoft continues to not understand the hell of software ecosystem dependencies despite the fact they should have the experience by now to know better :-(

then the solucion can is unistall visual studio to install cuda 9.2 ?

I have update visual studio at 15.7.2 and the cuda 9.2 installar give error …
… brrrrr shit !!

Hi cybernoid…

Did you have to do anything special on your computer to get 9.2 to install alongside VS2017 or did you just luck out? During the install I get past the system check, license. I’ve tried both Express and Custom installs. The reason I’m hoping for Custom Installs is because I want to pick where the software gets installed. After this, the installer starts churning away and I get a fail. The when looking down the list it says that it failed on the Visual Studio Integration step.

Just curious to know how you were able to get it to install anyway.

In this case, since there is no compatibility with the current version of VS 2017 and CUDA 9.2 would it just be better to uninstall and reinstall an older version of VS? I’m just starting with CUDA today and trying to get things to work has been very frustrating.

Same here, I just started yesterday.

This whole situation is ridiculous. I just wasted more time uninstalling all CUDA 9.0 components and downloading and installing 9.2

And STILL can’t even build the samples or my first CUDA program - flashlight, taken from CUDA for Engineers book.

If two of the biggest tech companies in the world can’t work together to make something that works at even a fundamental level, then someone somewhere is incompetent to say the least.

Completely lost interest in CUDA now - way more trouble than worth - bye-bye NVIDIA, not impressed!!! And this is probably the last straw as far as trying to develop on Windows is concerned too.

Now, where is that Vulkan book and Ubuntu DVD…

.

@RickBlacker

I installed it with VS2017 15.7.1 on a Windows 7 PC - not sure why the install worked for me but not you. It could well be they updated the installer to not allow that after I installed as it’s not officially a supported version.

I installed using the following named files:

cuda_9.2.88.1_windows.exe
cuda_9.2.88_windows.exe

For now the official line I guess will be to roll back to a previous VS2017 version but then they haven’t made it clear which exact VS2017 15.6.x version to my knowledge is ‘safe’. Hence my question of:

“Microsoft Visual Studio 2017 (RTW and Update 6) => So I assume that means 15.6.7?”

Yeah that’s the same two files I downloaded. I’m not in a big rush right now. Mostly I just wanted to start looking into CUDA, my job may head that direction later in the year.

With visual studio 15.7.2 I was able to get all the samples compiled by changing

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include\crt\host_config.h
#if _MSC_VER < 1600 /* REMOVE THIS-> || _MSC_VER > 1913 */

note that the permissions of the file might also need to be modified.

The point is that we should not have to mess about with settings.

NVIDIA should release a patch (as they have already done with 9.2 patch 1) so that the development kit can actually be used for development.

It seems they are not interested in supporting development on Windows.

What’s it like on Linux? Any better than this complete joke of a situation?

Our ubuntu linux is currently at 14.04 and the Cuda’s from 9.x onward seem to have dropped support for that version. I might try it in a 16.x container. Nvidia has some cuda-enabled docker images but that might end up just compounding the pain ;)

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:

<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

#if _MSC_VER < 1600 || _MSC_VER > 1913

to

#if _MSC_VER < 1600

all samples compiled successful :)

stuwph- your steps worked. Thanks!