# Error compiling CUDA samples with MS Visual Studio 2013

**URL:** <https://forums.developer.nvidia.com/t/error-compiling-cuda-samples-with-ms-visual-studio-2013/38151>\
**Category:** CUDA Setup and Installation\
**Created:** [May 31, 2015, 1:03am UTC](https://forums.developer.nvidia.com/t/error-compiling-cuda-samples-with-ms-visual-studio-2013/38151 "2015-05-31T01:03:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bwana](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/bwana/32/9760_2.png) [@bwana](https://forums.developer.nvidia.com/u/bwana)\
**Post date:** [May 31, 2015, 1:03am UTC](https://forums.developer.nvidia.com/t/error-compiling-cuda-samples-with-ms-visual-studio-2013/38151/1 "2015-05-31T01:03:52Z")

</div>

Followed the ‘getting started’ page  
[http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-microsoft-windows/index.html](http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-microsoft-windows/index.html)

The precompiled executables are not included with the latest cuda7 download (I could not find deviceQuery ) .  
However, all the sample files are present and in the correct directories.

I loaded the file, bandwidthTest\_vs2013.sln, and went to build.  
No issues identified.  
I tried to debug and got a dialog that the build was out of date.  
(What? I just built it?) I answered yse to the dialog and watched it build again. Then another dialog appearred.  
“Unable to start program ‘…bandwidthTest.exe’  
Unrecognized error occurred in the windows Web Services Framework.”

Any clue what this means??

---

<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 10, 2015, 9:49pm UTC](https://forums.developer.nvidia.com/t/error-compiling-cuda-samples-with-ms-visual-studio-2013/38151/2 "2015-06-10T21:49:20Z")

</div>

I don’t have that problem. I did build the entire samples package. Then I went and loaded just the bandwidthTest\_)vs2013.sln. Did a clean, build and run in the debugger and no dialog. I have seen this before in some other projects. I usually don’t worry about and move on.

Hope that helps.

Doug

---

<div class="post-metadata">

**Author:** ![volkov-maxim](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/volkov-maxim/32/76009_2.png) [@volkov-maxim](https://forums.developer.nvidia.com/u/volkov-maxim)\
**Post date:** [February 22, 2021, 11:09am UTC](https://forums.developer.nvidia.com/t/error-compiling-cuda-samples-with-ms-visual-studio-2013/38151/3 "2021-02-22T11:09:19Z")

</div>

Thank to [AeroClassics](https://forums.developer.nvidia.com/u/AeroClassics) for idea!  
Had the same problem when building bandwidthTest sample in Visual Studio 2019.

My decision:

1. Open solution bandwidthTest\_vs2019.sln OR Samples\_vs2019.sln
2. For bandwidthTest project set:

- set actual path to CUDA target (for example: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\extras\visual\_studio\_integration\MSBuildExtensions\CUDA 11.2.targets)
- set the CUDA Toolkit Custom Dir field to $(CUDA\_PATH) (for example: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2)

Link for help: [Installation Guide Windows :: CUDA Toolkit Documentation](https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html#build-customizations-for-existing-projects)
