views:

400

answers:

1

I'm the author of Gallio which includes NCover integration so I was curious to see what NCover would do on .Net 4.0 Beta 1. I didn't expect it to work (it didn't). However I'm curious as to whether anyone could enlighten me as regards the error message since it suggests a workaround that might be useful to NCover v1.5.8 community edition users someday.

.NET Runtime version 4.0.20506.1 - Loading profiler failed. The profiler that was configured to load was designed for an older version of the CLR. You can use the COMPLUS_ProfAPI_ProfilerCompatibilitySetting environment variable to allow older profilers to be loaded by the current version of the CLR. Please consult the documentation for information on how to use this environment variable, and the risks associated with it. Profiler CLSID: '{9721F7EB-5F92-447c-9F75-79278052B7BA}'. Process ID (decimal): 5724. Message ID: [0x2517].

Googling for COMPLUS_ProfAPI_ProfilerCompatibilitySetting turned up no results. Any clues?

+1  A: 

Update: David Broman has published an update on the COMPLUS setting here http://blogs.msdn.com/davbr/archive/2009/05/26/run-your-v2-profiler-binary-on-clr-v4.aspx

-- David Broman explains what must be the "COMPLUS_ProfAPI_ProfilerCompatibilitySetting" environment variable in his blog post on 11/10/2008 (Stackoverflow won't let me post a link).

The NCover team has spent some time already investigating the work needed to make NCover .NET 4.0 ready, but the primary hurdle is the lack of documentation from Microsoft. Broman mentions several safeguards that the CLR places around .NET 2.0 profilers that are not placed around .NET 4.0 profilers, and we need to know what those safeguards are before we know whether any of them will be broken when we move to .NET 4.0. We've already been screwed by the reentrant requirement in .NET 2.0. The other complicating factors are time (we're starting two new products right now) and that the interface NCover needs to derive from, ICorProfilerCallback3, is still in Beta.

Once .NET 4.0 is released, making NCover 4.0 compliant jumps to the top of our to-do list.

Stephen Ward