I asked MSVC feedback team about this issue, but they said it’s not their problem.
Details are explained in the following URL:
The issue is that if the source file dependency becomes a little complicated, VS2019/VS2022 cannot detect the dependency of the .cu files.
This does not occur in the simplest project which includes just one source file and header file.
But I reproduced this in a quite simple project and the project files are attached here:
BugReport.zip (5.4 KB)
Actually, this is not observed in VS2017 and VS2019/VS2022 have this problem.
I first suspect that this is MSVC’s fault, but they proposed it’s not.
It has been bothering me for a long time, so I want it to be fixed.