Compilation problem with Visual Studio 2013 professional.

Me and my friend are working on the same project that has some functions with CPU and GPU implementations. The GPU code is written in CUDA. We both tried to run the programs using the CPU implementations on two identical machines with AMD hardware and Visual Studio 2013. (My computer has Visual has some Visual Studio Command Prompt tools alongside Visual Studio 2013)

We both installed CUDA 7.5 first and then tried to compile. My friend did not have any issue but I get the following error :

Error 12 error MSB4062: The “Nvda.Build.CudaTasks.SanitizePaths” task could not be loaded from the assembly C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\Nvda.Build.CudaTasks.v7.5.dll. Could not load file or assembly ‘Microsoft.Build.Utilities.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\CUDA 7.5.targets 160

Does anyone know what is the source of the problem ?

Thanks,
Edward Huang.

I was facing same problem with CUDA 6.5 Toolkit + VS2013 Professional.

I resolved it by:

-> uninstalling CUDAToolKit 6.5 from ControlPanel
-> Repairing Visual Studio 2013 Professional
-> installing CUDAToolKit again

In your case this may work as well with CUDA 7.5. I am guessing that upgrading to Windows 10 might have caused the issue (in my case).

Some of them have also suggested moving to recent version of visual studio.

Here are some references for you:

http://stackoverflow.com/questions/11506220/error-msb4062-when-trying-to-build-my-cuda-program

https://devtalk.nvidia.com/default/topic/611280/cuda-setup-and-installation/can-t-compile-samples-with-cuda5-5-with-vs2012-express-error-msb4062/

http://answers.microsoft.com/zh-hans/windows/forum/windows_10-other_settings/cuda-in-win-10/caea8f20-e85e-4d31-9261-6e17783af5dc?auth=1

Hope this helps!