Installiton issue: Samples run correctly, but new project not.

My cuda goes wrong, Samples run correctly, but my own project can’t.

If I copy the code of a basic sample to a new created project, it will tell me "Unable to start the program’\project\X64\Debug\test.exe’ The sysetem can not find the file specified "

Moreover, There is always an error MSB3721 “The command’C\Program Files…’ exited with code 2” in new project.

Could anyone help me to solve the problem?

Does the file ‘\project\X64\Debug\test.exe’ actually exist?

Is the compiler generating the output file (.exe) in the correct place?

The first step to figuring this out is to determine what the compiler is actually doing and then make sure that is what you really want it to do.

Thanks for replying.

Answer is no, and that’s what the problem is. If I run my own code, it would tell me cannot find the test.exe file.

Moreover, I checked the bin/win64/debug/ . The samples [.exe] are generated, but my projects not.

Maybe my problem is why compiler cannot generate the [.exe] file