Based on the previous answers, I came up with this manual procedure to install the visual studio integration without having to change my graphics driver (currently 397.64):
All the files needed for the Visual Studio integration are located in your_CUDA_9.1_zip\CUDAVisualStudioIntegration (see oregonduckman’s answer on the first page of this thread). I will refer to this directory simply as "" from now on. I tried executing the two installers (see evgeniy.mamchenko’s answer above) in this directory, with no success. After examining the other files in this directory, I realized that \CUDAVisualStudioIntegration.nvi is really an xml file telling the installer how to install the visual studio integration. I then used the file to figure out where the files need to go and how Visual Studio needs to be configured. This way, I could install the integration manually.
Install CUDA 9.1 without Visual Studio integration.
Open \CUDAVisualStudioIntegration.nvi in a text editor. The interesting stuff happens after line 120.
All tags with phase=installMSTools10 to phase=installMSTools14 indicate copying files to integrate CUDA into MsBuild. The tags tell you to copy files. The source property tells you which file (inside \ in your zip). The target property tells where the file needs to go. If some of the target folders don’t exist, don’t worry; then you most likely don’t have all supported MsBuild versions installed, simply install for those you have. The target paths contain path variables defined at the top of the file, go have a look there to find the exact location where MsBuild is installed on your machine.
The next three tags indicate how the same files as above need to be copied into some Visual Studio folder. Only do this for the version of visual studio you are using (see condition properties on the tags). The root of the target directories will be the install directory of Visual studio 2017 (pro/enterprise/community).
The seven large junks (phase=“installVSWizards”) below the previous installation step tell you to copy all the files in \extras\visual_studio_integration\CudaProjectVsWizards into some AppData folder. Only do this for the versions of Visual Studio you have installed or those you want the integration to be installed (see the condition properties of the tags).
Right after the last big junk, you will notice tags. Those with action=“CreateCustomShortcut” tell you to create shortcuts to some files. Again only do this for the Visual Studio version you have installed. root\location\name is the name of the shortcut to create and target is the file to be linked. In a nutshell, you will have to link two files that you just copied into Appdata per Visual Studio installation.
Ignore all tags with when=uninstall below. These are only needed for uninstalling.
The tags tell you to run Visual Studio from the command line with specific parameters. Do this for every installed version (or every version you want to have the integration installed). Basically, go find the executable directory of visual studio, open an elevated cmd prompt and type “devenv /setup”. The setup option will tell Visual studio to install new extensions by following the previously created shortcuts.
That’s it for installing. Now you should be able to launch Visual Studio and create CUDA 9.1 projects with Visual Studio 2017.
worked for me by evgeniy.mamchenko’s post
I installed CUDA 9.0.176 with vs 2017(15.7.2)
But a new problem is I cannot install CUDA 9.0 Patch 1,it says;
CUBLAS Development not installed
CUBLAS Runtime not installed
not only execute cuda_9.0.176.1_windows.exe but also setup.exe after extract by WinRAR
Patch 2 no these failed messages
So,can I only install Patch 2,but no Patch 1?
Where can I find the AppData folder in the step 5?
just ${{CommonAppData}} in the nvi file
Is C:\ProgramData ?
But under C:\ProgramData,there are only two dir:
NVIDIA
NVIDIA Corporation
but no NVIDIA GPU Computing Toolkit
DO I have to create this dir manually? and then copy those files?
I believe CommonAppData refers to the standard Appdata folder of the current user. It can be found by hitting Win+R (run window pops up) and entering %Appdata%. This will open an explorer window with the Appdata folder. Usually it is C:\users\your_username\AppData\Roaming.
However, you can probably install the files in any location you like, as long as visual studio can find and read the files there using the shortcuts created in step 6.
thanks to manuel3.schmidt and sebi.garmier
I do create the new dir under C:\ProgramData and now worked for me.
Maybe the shortcut can link to anywhere you put the extras DIR
Here is what worked for me, thank you everyone that has provided information in this and other threads. I’m pasting in the steps I took and and taking none of the credit.
FYI - the most important thing here is to use the right versions, and to think about what you’re doing as you follow the below instructions rather than blindly following them.
Step 1: Install the standard VGA driver:
1. Bring up the Windows Device Manager. You can do that my right-clicking on the Start button and then select Device Manager.
2. Expand the "Display Adapter" list, right-click on the GeForce card and then select "Update Driver Software".
3. Click "Browse my computer for driver software".
4. Then click the "Let me pick from a list of device drivers on my computer".
5. Uncheck the "Show compatible hardware" option.
6. Under the "Manufacture" scroll to the top and select the "(Standard display type)" and then click "Next". If you are running multiple GPUs then repeat steps #2 - #6 for each GPU.
7. Restart Windows. This will basically load the standard VGA driver.
Run the installer for Visual Studio 2017 15.4.5 from file downloaded in Step 3. Under ‘Individual Components’ select ‘VC++ 2015.3 v140 toolset for desktop (x86,x64)’. Under ‘Workloads’ select ‘Desktop development with C++’. Hit install and get that installed.
step 6:
Run the CUDA installer you got in step 4. Hit next a few times, this time everything should complete without a problem.
Since Windows 10 was not responding to my uninstall request, i used Revo uninstaller to remove all remaining programs (using revo uninstaller free version), aand then it worked !!
This is apparently still a problem with CUDA 10.0 on Windows 10 with VS 2013. Not finding a path to solution, but I haven’t attempted the Revo tool yet. CUDA 8.0 was working, and now nothing is.
CUDA on Windows is a side distraction - most of my work is on Linux, but the Windows/VS tools have [had] some advantage. I’m just gonna have to set that aside and struggle with my stone knives and bear skins.
Because I don’t have a life, and because these things do tend to keep me up at night, I continued to beat on it. Two things I did to get cuda_samples_v10.0/1_Utilities/deviceQuery to build:
installed Windows SDK
This got me past the “windows.h” issue.
The next level of error I got was “could not open” kernel32.lib and a warning “Could not find WindowsSDKDir variable from the registry.”
changed the “Platform Toolset” in the properties to WindowsXP
HOWEVER - cannot build bandwidthTest, or 0*/matrixMul - complains about
"Error 2 error : couldn’t get arguments: The parameter is incorrect cuda_samples_v10.0\1_Utilities\bandwidthTest\CUDACOMPILE bandwidthTest
"Could not find WindowsSDKDir variable in registry
The oregonduckman solution works for resolving the NVIDIA CUDA 10.0 installer problem with Windows 10 and VS2013 as well. Once REVO has cleaned things up, the installer works without complaint.
The recommendation is to just use REVO on the 30 day trial to do this. REVO Pro is just $29.95 for the “portable” version - if you have to deal with swarmy Windows applications at all the first hour you save will pay for this (and anybody how says they haven’t spent at least an hour trying to uninstall and reinstall a Windows application is probably lying).
That having been said, NVIDIA CUDA 10.0 Windows 10 VS2013 still fails to build the solution for Samples/1_Utilities/bandwidthTest. More looking to be done.