Code Optimization

Interesting things about software development and code optimization

Performance Profiler Could not load type System.Threading.Interlocked

If you run into this issue trying to profiling your code with Visual Studio Performance Profiler and getting this error:

Unhandled exception. System.TypeLoadException: Could not load type System.Threading.Interlocked

This is because of you enabled the checkbox under the CPU Usage > Collect call counts (.Net Only)







Just disable it and it should start working again.


1vqHSTrq1GEoEF7QsL8dhmJfRMDVxhv2y



Unable to find vcvarsall.bat or not found

Dear User,


If you re-installed your Visual Studio or updated it to a new version then you may loose the vcvarsall.bat file and here are quick steps to restore it:

1. Run the Visual Studio Installer

2. See the screenshot below to find the package you need

3. Click install/modify




After installed you will find it there (depending on a drive you installed your Visual Studio):

D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build



Thank you and see you ;)



1vqHSTrq1GEoEF7QsL8dhmJfRMDVxhv2y



the debugger's worker process (msvsmon.exe) unexpectedly exited

Hello friends,


seems that you just have faced the same problem as me - "the debugger's worker process (msvsmon.exe) unexpectedly exited"


Quick and easy solution for that is just to DELETE all breakpoints:

- DEBUG -> Delete All Breakpoints


Thank you,

and see you son ;)


1vqHSTrq1GEoEF7QsL8dhmJfRMDVxhv2y