ANTS Memory Profiler 8

Failed to CoCreate Profiler

This article applies to both ANTS Performance Profiler and ANTS Memory Profiler.

If ANTS Performance or Memory Profiler is used to profile a Windows Service, it modifies the running environment of the service temporarily, then undoes the changes when profiling is stopped. If the service crashes with an unhandled exception during profiling, however, the modified environment may be left behind. This means the service will be permanently 'hooked' into ANTS Performance orMemory Profiler, so the service will attempt to load the Profiler's "core" component at service startup time.

Because ANTS Performance or Memory Profiler isn't running, the following error entry is written to the application event log:

Source: .NET Runtime
Category: None
Event ID: 1022
Description: .NET Runtime version 2.0.50727.832 - Failed to CoCreate profiler.

In order to restore the normal environment of the service, the registry editor must be used. Click the start bar, then 'run', then type regedit and press enter.

Look for the short name of your service in the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

Open the key that has the same name as your service, and in the right-hand pane, right-click Environment and select Modify.

Locate the entries COR_ENABLE_PROFILING=1 and COR_PROFILER={a GUID} and remove these name/value pairs from the registry value. When the service is restarted, the error should no longer occur.


Didn't find what you were looking for?