"Unable to start profiling. The system cannot find the file specified" error occurs if attach to Windows Service process

Symptoms:

When you attach the profiler to the process, it shows the message "Preparing the profiler..." for about 1 minute and then fails with the error:

"Unable to start profiling. The system cannot find the file specified".

____________________________________________________________________________________

Possible cause:

CLR doesn't start the "attach" thread for the application.

To resolve the issue:

1) Open regedit.exe

2) Find HKLM\SYSTEM\CurrentControlSet\Services\<YourServiceName>

3) Add new multi-string value (REG_MULTI_SZ) with "Environment" name

4) Add value COMPlus_AttachThreadAlwaysOn=1 , then press Enter to get empty new line

Environment key

5) Click OK

6) Restart your service

 

 

Please sign in to leave a comment.

Have more questions?

Submit a request