Brian
Brian

Reputation: 38035

How do I run the Visual Studio 2012 memory profiler? I'm getting the error DA0002

I'm trying to run the VS12 memory profiler on a WinForms project but when I do, the application starts up, it appears to be working correctly, but then the report comes up blank. In the Error List, I am getting this error...

Error 1 DA0002: It appears that the file was collected without properly setting the environment variables with VSPerfCLREnv.cmd. Symbols for managed binaries may not resolve.

The performance profiler worked fine. Is there something I'm supposed to do before running the memory profiler? Running VSPerfCLREnv.cmd in a command window doesn't seem like it would do anything for me (according to the docs, it's supposed to just set the environment variables for that command window).

I've got the trial version of Red Gate Ants installed. I'm uninstalling that now in case that is interfering. Any other suggestions? A good tutorial on running the profiler from a command line might be a good work-around (though I would rather VS12 just worked), but I don't want to profile the start up of the application.

Upvotes: 4

Views: 4103

Answers (1)

volody
volody

Reputation: 7199

I was able to generate Sample Profiling Report by using "Developer Command Prompt for VS2012" following VSPerfCLREnv

VSPerfCLREnv /SampleOn
VSPerfCLREnv /SampleGC
VSPerfCmd /Start:Sample /Output:MyApp.exe.vsp /Launch:MyApp.exe

Then after closing MyApp.exe have executed VSPerfCmd.exe /Shutdown in same Command Prompt, and MyApp.exe.vsp was generated

VSPerfCmd.exe /Shutdown

This file MyApp.exe.vsp can be open in VS2012

Note: Executing VSPerfCmd with /GC option shows the same DA0002 error. My environment is Win7 x86.

Upvotes: 3

Related Questions