.NET Runtime Failed to CoCreate Profiler
.NET Runtime Failed to CoCreate Profiler
by Jeff on September 18th, 2014 No Comments »
 

[Fixed] Event ID 1022 – .NET Runtime Failed to CoCreate Profiler

Jump to Solution
Over the last few weeks I was troubleshooting Event ID 1022 – .NET Runtime Failed to CoCreate Profiler on my Server 2008/IIS 7.5 machine. After some research, I found that this error was due to the installation of the Windows Diagnostic Tool for profiling .NET applications. The proper fix for the .NET Runtime Failed to CoCreate Profiler is to uninstall or disable any profiling tools, however, the installation was corrupt and would not allow me to uninstall it.

After some more research (postback links below), I found that there is an environment variable called COR_ENABLE_PROFILING that was set to 7 and it needs to be set to 0 to fully disable profiling and get rid of the .NET Runtime Failed to CoCreate Profiler error in the event log. One article listed a few registry keys to modify, however, they were overwritten on a reboot. Another article explained to to fully remove/change system wide environment variables. Putting the two articles together, I found the solution

Solution

  1. Open regedit (start->run->regedit) or type regedit in a command prompt
  2. Navigate to HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
  3. Change the REG_DWORD COR_ENABLE_PROFILING value to 0
  4. Ensure the REG_DWORD CORECLR_ENABLE_PROFILING value is also 0
  5. Reboot

net-profiling-regkeys

After a reboot, log into the system and run “set” from the command line. Find COR_ENABLE_PROFILING and ensure the value is 0. Next, verify that Event ID 1022 – .NET Runtime Failed to CoCreate Profiler is no longer showing up in your eventvwr

disabled-net-profiling

PostBack Links
http://stackoverflow.com/questions/10013493/failed-to-cocreate-profiler-error-but-not-using-a-profiler
http://stackoverflow.com/questions/13222724/command-line-to-remove-an-environment-variable-from-the-os-level-configuration


Leave a Reply

Your email address will not be published. Required fields are marked *

Tag List