Visual Studi 运行CUDA自带demo报错:
错误 MSB4019 找不到导入的项目“D:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 11.2.props”。请确认 Import 声明“D:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 11.2.props”中的表达式正确,且文件位于磁盘上。 simpleTemplates E:\Program\v11.2\0_Simple\simpleTemplates\simpleTemplates_vs2019.vcxproj 37
将路径:
…\NVIDIA GPU Computing Toolkit\CUDA\v***\extras\visual_studio_integration\MSBuildExtensions
下的所有文件复制至路径:
Microsoft Visual Studio*\Community\MSBuild\Microsoft\VC\v\BuildCustomizations
例: