4

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.

Brian
  • 37,399
  • 24
  • 94
  • 109
  • It does not appear that Red Gate Ants was the problem (at least uninstalling it didn't resolve the problem). – Brian Mar 14 '13 at 22:18
  • This is Andre from Visual Studio Profiler. Were you able to resolve this? What environment are you profiling under? (If you will use vsperfclrenv, you need to run it before the application you want to profile starts. Also if you start your application from a different console then you probably want to run it like vsperfclrenv /golbalsamplegclife ) – Andre Hamilton Apr 14 '13 at 07:37

1 Answers1

3

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.

volody
  • 6,946
  • 3
  • 42
  • 54