CUDA Toolkit 5生产版和Visual Studio 2010集成 [英] CUDA Toolkit 5 Production Release and Visual Studio 2010 Integration

查看:351
本文介绍了CUDA Toolkit 5生产版和Visual Studio 2010集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在没有NVidia CUDA论坛,有没有人有任何想法如何解决这个问题?
看起来像CUDA工具包的VS集成有一个问题。

In the absence of the NVidia CUDA forum, does anyone have any idea how to fix this? It looks like the VS integration of CUDA toolkit has a problem.

我刚刚安装了CUDA工具包5的生产版本(32位笔记本电脑在Windows 7),替换版本候选人(工作良好),现在我不能编译或构建任何东西,包括CUDA示例。

I just installed the production release version of the CUDA toolkit 5 (32-bit for laptops on Windows 7), replacing the release candidate (which worked well) and now I can't compile or build anything including CUDA samples.

如:
... BuildCustomizations \CUDA 5.0.targets(360,9):错误MSB4062:
无法从程序集加载Nvda.Build.CudaTasks.ResolvePaths任务C: \\ Program Files(x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\ Nvda.Build.CudaTasks.v5.0.dll。
确认声明是正确的,程序集及其所有依赖项都可用,并且任务包含实现Microsoft.Build.Framework.ITask的公共类。

Everything I have tried gives an error like: ...BuildCustomizations\CUDA 5.0.targets(360,9): error MSB4062: The "Nvda.Build.CudaTasks.ResolvePaths" task could not be loaded from the assembly C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\Nvda.Build.CudaTasks.v5.0.dll. 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.

CUDA 5.0.targets文件(它是一个XML文件)有几个UsingTask元素,我没有看到任何引用的ITask类提到,但我不愿意开始编辑文件我不明白。

The "CUDA 5.0.targets" file (it is an XML file) has several UsingTask elements and I don't see any reference to the ITask class mentioned, but I am reluctant to start editing a file I do not understand.

如果我切换Build Customisations,则会出现类似的错误。

A similar error is given for CUDA 4.2 if I switch Build Customisations.

这是使用Visual Studio 2010专业。
非CUDA项目仍在编译和构建。

This is using Visual Studio 2010 Professional. Non-CUDA projects still compile and build.

有什么建议从哪里开始?

Any suggestions on where to start?

推荐答案

要解决此问题,您需要安装64位CUDA 5.0.32 SDK(CUDA 5.0的最新版本)。它包含比32位安装程序更新版本的Nvda.Build.CudaTasks.v5.0.dll(修改日期是25/09/2012不是2012年5月)。

To fix, you need to install the 64-bit CUDA 5.0.32 SDK (the latest release of CUDA 5.0). It contains a newer version of Nvda.Build.CudaTasks.v5.0.dll than the 32-bit installer (date modified is 25/09/2012 not May-2012).

我无法将Dll复制到正确的位置,因为它被另一个进程使用。要解决这个问题,我使用了一个使用Windows SAFE_MODE和CMD提示执行的批处理文件(在引导时使用F8选择安全模式启动选项)。

I had trouble copying the Dll to the correct location because it was in use by another process. To work-around this, I used a batch file executed using Windows SAFE_MODE with CMD prompt (use F8 at boot-time to select the safe-mode startup option).

批处理命令(在我的64位Windows系统上运行):
copy[您的安装路径] \CUDA\v5.0\ extras \visual_studio_integration\MSBuildExtensions\Nvda.Build.CudaTasks.v5.0.dllC:\Program Files(x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations

The batch command (worked on my 64-bit windows system): copy "[YOUR INSTALL PATH]\CUDA\v5.0\extras\visual_studio_integration\MSBuildExtensions\Nvda.Build.CudaTasks.v5.0.dll" "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations"

确保您的道具和目标也从SDK安装文件夹复制。

Make sure your props and targets are also copied from the SDK install folder.

这篇关于CUDA Toolkit 5生产版和Visual Studio 2010集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆