Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All samples fail to load with VS2022 #281

Open
tksharpless opened this issue Jul 5, 2024 · 5 comments
Open

All samples fail to load with VS2022 #281

tksharpless opened this issue Jul 5, 2024 · 5 comments

Comments

@tksharpless
Copy link

Just cloned and tried to load project "Samples_VS2022.sln". Every single project load fails with the same error message. Example:
C:\Users\tksha\cuda-samples\Samples\6_Performance\UnifiedMemoryPerf\UnifiedMemoryPerf_vs2022.vcxproj : error : The imported project "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA 12.4.props" was not found. Confirm that the expression in the Import declaration "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA 12.4.props" is correct, and that the file exists on disk. C:\Users\tksha\cuda-samples\Samples\6_Performance\UnifiedMemoryPerf\UnifiedMemoryPerf_vs2022.vcxproj
The same message appeared in a popup:
image

@tksharpless
Copy link
Author

tksharpless commented Jul 5, 2024

My Cuda Toolkit version is 12.5.
Evidently the problem is that the vcxproj files all import projects named "CUDA 12.4.xxxx", which don't exist on my system. The corresponding CUDA 12.5 ones do.
Unfortunately it is not possible to correct this via the VS IDE; it simply refuses to load the projects.

@tksharpless
Copy link
Author

As a quick and dirty workaround I made copies of the 3 files "CUDA 12.5.props", "CUDA 12.5.targets" and "CUDA 12.5.xml" with ".4" in place of ".5". This allowed VS 2022 to load (veerrry slllooowly) and eventually to build the test projects.
I strongly suggest you start using cmake to create correct MS projects on the fly. Many benefits would accrue.

@na10m
Copy link

na10m commented Jul 12, 2024

I had to uninstall 12.5 and install 12.4, and then it worked for me

@visionbike
Copy link

Another solution, you can open *.vcxproj, change "12.4" to "12.5". Then open .sln and build as usual.

@booomji
Copy link

booomji commented Sep 13, 2024

Another solution, you can open *.vcxproj, change "12.4" to "12.5". Then open .sln and build as usual.

I tried that. It then complained about not being able to find helper_cuda.h.
Cannot open include file: 'helper_cuda.h': No such file or directory

I'm trying to use the 11.8 version.

Thanks for any help
b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants