Using Win11 VS & CUDA, trying to just build some solution samples, endless MSB4019's

So I installed CUDA v12.6 and VS 2022 under Windows 11 and I did a git clone of the CUDA solution samples, opened VS and found the local directory they were in and tried to build any of them. For my trouble all I get is endless complaints and error failouts about not being able to locate various property files for earlier versions (11.5, 12.5 etc.), invariably accompanied by error MSB4019. Yes I’ve located various online “hacks” involving either renaming a copy of the new file with an older name, or an copying the entirety of various internal directories from the Nvidia path to the path on the VS side, but seemingly no matter how many of these I employ the build ALWAYS succeeds in complaining bitterly about files missing for some OTHER prior CUDA version. For crying out loud I’m not looking for some enormous capabilities here, but I would have thought a distribution that doesn’t include SOME sample solutions that can be successfully built clearly “isn’t ready for prime time”. Also I’ve heard rumours there’s a file called “vswhere.exe” that’s supposed to mitigate this from the VS side, but I don’t know how to use it. Isn’t there any sort of remotely structured resolution for this problem, or does it all consist entirely of ad-hoc hacks, with no ultimate guarantee of any resolution?

OK I posted this on another forum and someone told me they had ZERO problems buiding the samples. So I looked at GIT and found the samples were only versioned to support CUDA up through v12.5, but CUDA was v12.6. So I “reverted” CUDA back to v12.5.1 and everything’s now building OK, I guess there was no intent that the samples for 12.6 would build OK, somehow I thought that should have been documented somewhere but I guess it just doesn’t work that way, but this issue for me has been resolved, thank you.

It’s a late reply but for the people who encountered same problem. In the whole folder, find the string pattern “12.5” and replace with “12.6”. There you go.