"Failed to prepare kernel for profiling" in Nsight Compute2024.1.0 on Windows11

Yesterday, I upgraded Nsight Compute to 2024.1.0, but when I performed CUDA program analysis, there was a “Failed to prepare kernel for profiling” error. Detailed errors are displayed as follows:

==ERROR== Failed to prepare kernel for profiling
==ERROR== Unknown Error on device 0.
==ERROR== Failed to profile “reduceGmem” in process 21112
==PROF== Trying to shutdown target application
Process terminated.
The profiler returned an error code:1(0x1)

This program was successfully analyzed at Nsight Compute2023.3.1.1 yesterday, so I don’t think this is a problem with my program. But when I rolled back the version to 2023.3.1.1, this version also had this problem.
This problem occurs when I select the “pmsampling” and “full” options in the “Metrics” Settings.

My CUDA version is 11.6 and I am using Windows11.

How do I solve this problem?

I solved the problem as follows:
You need to add “target\windows-desktop-win7-x64” from the directory where you installed nsight compute to the environment variable “Path”.
I hope this approach can help you too.

@NUC_Taoer

Thanks for the update and good to know the issue is resolved !