Child pages
  • Known issues with "profile" NGEN Images

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Some tools (e.g. BugAid) for performance reasons create a special kind of NGEN images (“Profile” images) for some of the .NET framework assemblies.
Due to a bug in the Microsoft .NET Profiling API, this leads to incorrect behaviour of the instrumenting profilers.
In case of dotCover and dotTrace you may get the following exception:

System.MissingMethodException: Method not found: 'Void System.Runtime.Versioning.TargetFrameworkAttribute.JetBrains_Profiler_Core_Instrumentation_Begin(UIntPtr ByRef)

Full description:

When an IL instrumenting profiler detects that an NGEN /Profile assembly exists, this assembly is immediately loaded, even though in fact it cannot be instrumented.
According to Microsoft, this issue will be fixed in their next release: there will be a flag in the Profiling API that the instrumenting profiler can turn on, which will cause it to ignore the existance of NGEN /Profile assemblies and go back to JITing.