Interestingly, it works correctly for the Samples_vs2017 solution, but not for File->New Project->CUDA 9.1 Runtime. I can’t spot the relevant difference in the configurations. I am using the 2016 (v140) Platform Toolset for both cases.
Anyway… I can edit the code, hit F5, and it will run the last build without recompiling. I am reduced to Rebuild All every time I want to compile anything.
There’s a Stack Overflow already for the same issue: https://stackoverflow.com/questions/48183845/visual-studio-2017-not-detecting-change-in-cu-cuda-files