Thursday, October 21, 2010

Using NProf 0.11 and CLRProfiler in .NET 4.0

I am obsessed about memory allocation and function speed optimization so my favorite tools where the CLRProfiler and NProf but when I moved to .NET 4.0 they where not working anymore, luckily there is a fix.

Create a bat in the directory where you have CLRProfiler or NProf and type in it :
set COMPLUS_ProfAPI_ProfilerCompatibilitySetting=EnableV2Profiler
NProf.exe(or CLRProfiler.exe)

That's it now when you will call the bat you will be able to use the profilers like in the past.

1 comments:

  1. Thanks for the fix.
    I was gutted to discover NProf didnt work for me since upgrading my "MiG Madness" game to XNA 4.0.

    A quick google turned up your solution and it worked first time. Phew!

    Thanks again.

    ReplyDelete