Can anybody explain why i'm suddenly getting this when trying to do any kind of performance profiling (the same way i always have) from within VS2012.
VSP2340: Environment variables were not properly set during profiling run and managed symbols may not resolve. Please use vsperfclrenv before profiling.
I've googled and tried a few things, but i'm unable to find out how to get this working from within VS2012 again.
I found somebody with the same unanswered issue a couple of weeks back here: VS2013: "VSP2340: Environment variables were not properly set" even when running from IDE
Thanks in advance.
HSG
I've had the same issue on Visual Studio 2012. Follow the steps below:
- Start - All Programs - Microsoft Visual Studio 2012 - Visual Studio Tools
- Right click "Open VS2012 x64 Native Tools Command Prompt" and select run as administrator
- The command prompt opens. Run
vsperfclrenv /globalsampleon
- Reboot machine
来源:https://stackoverflow.com/questions/26440318/vsp2340-environment-variable-issues-suddenly-when-profiling-an-app