I wrote a small profiler for .NET applications. It uses the ICorProfilerCallback2
interface.
The profiler attaches and works well for .NET 2.0 application but doesn't work for .NET >2.0 (3.0, 3.5, 4.0). When I start an exe compiled with .NET 4.0 nothing happens, however for .NET 2.0 the profiler starts. I'm setting the following variables before running a managed exe
@Echo off
set Cor_Enable_Profiling=0x1
set COR_PROFILER={67D8965A-8686-2639-9C24-E1F7D13EE105}
set COR_PROFILER_DLL=e:\Debug\Profiler.dll
set COR_PROFILER_PATH=e:\Debug\Profiler.dll
Any idea why this might happen? It doesn't even get in DllMain