How to fix Error MSB3721

MSB3721 is the VS way of saying “I ran nvcc, and it returned an error code.”

Other than knowing that your compilation failed, it is completely useless for understanding why it failed.

To understand why, it’s necessary to increase the verbosity of VS output so that it shows the actual invocation of nvcc and the actual error reported by nvcc (prior to VS reporting the MSB3721 error).

If you google how to increase verbosity of VS output, you’ll be able to find articles explaining how.