CUDA 9.1 Visual Studio 2017 Preview compilation error - visual-studio

Just installed latest Visual Studio 2017 Preview 15.6 and CUDA Toolkit 9.1
Created new CUDA demo project and tried to compile, but got bunch of errors, one of them:
cannot open source file "stddef.h"
cannot open source file "stdio.h"
unsupported Microsoft Visual Studio version! Only the versions 2012, 2013, 2015 and 2017 are supported
Did anyone try to work with CUDA 9.1 in VS 2017 Preview?

As per advises from Robert and NVidia DevTalk forum in order to compile project I need to:
Install Visual Studio 2017.4 from here
https://www.visualstudio.com/en-us/productinfo/installing-an-earlier-release-of-vs2017
Reinstall CUDA
or
Add Visual Stodio 2015 Toolset to existing VS 2017 installation
Reinstall CUDA
Change project properties to use older toolset

I was able to get CUDA 9.1.85 to build with VS 2017 15.4.
I first uninstalled all previous VS instances and then reinstalled VS2017, making sure to go to "individual Components" and selecting VS 2015 Toolset.
I then used the Step A suggestion from #oregonduckman in this post and used the standard VGA driver for my display adapter (video card).
I then killed every NVIDIA process and manually deleted every NVIDIA folder on my machine.
Finally, I installed CUDA 9.1.85 including the VS Integrations which also reinstalled my display adapter driver that I had manually removed. I was then able to build all of the CUDA samples.
I suspect that the issue lays with either the VS Toolset is unsupported by CUDA 9.1 or there was an incompatibility between VS and my NVIDIA driver somehow.
Btw, I am running Windows 10 Pro with a GTX 780 card.

I do the following to fix the problem on VS 2017 Enterprise:
Open VS 2017--> Tools --> Get Tools and Features --> Add Visual Studio 2015 (v140) Toolset and Windows SDK Version 10.0.15063.0
Reinstall CUDA
Right click on the project --> Properties --> Configuration Properties --> General --> Set target platform version to 10.0.15063.0 and set platform toolset to Visual Studio 2015 (v140)

Related

Switching from Visual Studio Community 2022 to Visual Studio Professional 2022 breaks CMake build for CUDA language

When switching from VS 2022 Community -> Professional editions, my CMake build broke for my CUDA language files. My CMake version is 3.23.1, and my CUDA SDK is version 11.6.
The error I get is "No CUDA toolset found".
I got a similar error when upgrading from VS Community 2019 -> 2022, which I fixed by uninstalling my (then) CUDA SDK 11.4, and replacing it with 11.6.
How do I fix this error?
Again, I fixed this by uninstalling my CUDA 11.6 SDK and replacing it with CUDA 11.7, which theoretically is also compatible with the same drivers as the last version.

LLVM 7.0 does not provide specific Platform Toolset on Visual Studio 2015

I've just installed the LLVM 7.0.0 for Windows (64-bit) released few hours ago.
With the new version, all the platform toolsets provided by the previous release (6.0.1) for Visual Studio 2015 (named "LLVM-vs2014", "LLVM-vs2014_xp" and "LLVM-vs2010") are not available anymore.
I've seen a new extension named LLVM Compiler Toolchain in the Visual Studio Marketplace, but it is not available for Visual Studio 2015.
Do you know the reasons of this lack?
The Visual Studio extension appears to be compatible with Visual Studio 2015, despite official support not being mentioned. At least one LLVM reviewer was able to install the .vsix in VS2015 out of the box.
I personally use the VC++ Build Tools 2015, and was able to get away with simply extracting the contents of the .vsix's $VCTargets directory into C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140\.

This project is incompatible with the current version of Visual Studio VS2017

I have installed the Enterprise version of Visual Studio 2017 v 15.8.4 on Windows 7 Professional. I have downloaded the UWP Samples, when I attempt to load any of the C++ UWP sample solutions such as the Altimeter solution I get the error ..."This project is incompatible with the current version of Visual Studio." Online I found the suggestion that with a prior version of VS reloading the project worked, but in my case the project is greyed out. What is the problem?
From Visual Studio 2017 Product Family System Requirements:
Universal Windows app development, including designing, editing, and debugging, requires Windows 10. Windows Server 2016 and Windows Server 2012 R2 may be used to build Universal Windows apps from the command line.
You need Windows 10 to open UWP samples in Visual Studio 2017.

CUDA Visual Studio Integration Installation failure

I am trying to install CUDA 7.5 on Windows 10 with both VS 2013 Community and VS 2015 Community installed. The CUDA installer correctly detects VS2013, and installs the CUDA library correctly, but fails when attempting to install CUDA Visual Studio Integration tools. Are there any possible fixes for this problem?
I can't say much about VS 2013 without any more details about error messages etc. It should work, though. I was able to install the same combination.
CUDA 7.5 does not support VS 2015. Even CUDA Toolkit 8.0 RC supports only Visual Studio 2015 up to Update 1, but not Update 2 or 3.

CUDA 7.0 installation not detecting Visual Studio 2013 Express

I am trying to install CUDA 7.0 on my laptop. It's Windows 7 64-bit with Visual Studio for Desktop 2013 Express. I get the error message "No supported version of Visual Studio was found." In the CUDA documentation it specifies that VS 2013 is supported (however it doesn't mention the Express version). Any advice please?
Visual Studio 2013 Express is not a supported version for CUDA 7.0.
The supported versions are listed in the windows getting started guide.
Switch to a supported version.
If you are looking for a "free" Visual Studio version, use Visual Studio 2013 Community Edition. This has some advantages anyway, over the express versions:
64-bit compiler support
VS Plugin support (so you can use nsight VSE, although the warning message you received is not unique to nsight VSE. The CUDA 7 installer will report that.)

Resources