Executing MSTest with APIs and IsEnabled is always false

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
bmorley
Posts: 1
Joined: Fri Mar 30, 2012 7:39 am

Executing MSTest with APIs and IsEnabled is always false

Post by bmorley » Fri Mar 30, 2012 7:45 am

Suspect I am missing something obvious here, but I have 4.0 running and am attempting to try out the APIs to add memory leak detection. Each time I execute my test "MemProfiler.IsEnabled" is set to false. Running Windows 7, 64-bit, vs2010, MSTest building in debug mode (despite the warning) guy to see how it works and what the assertion would look like. In my test dll configuration I added "gcConcurrent" to false and "supportedRuntime" to 4.0.30319 (although that is my target framework for the test assembly).

What am I missing here?

Andreas Suurkuusk
Posts: 1028
Joined: Wed Mar 02, 2005 7:53 pm

Re: Executing MSTest with APIs and IsEnabled is always false

Post by Andreas Suurkuusk » Fri Mar 30, 2012 7:58 am

Have you included the /noisolation command line argument to MSTest? Without this argument, MSTest will spawn a separate test process when running the tests, and the profiler will not be enabled for this process,
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests