在分析应用程序时,VSP2340环境变量突然发出问题

任何人都可以解释为什么我在尝试从VS2012内进行任何类型的性能分析(我总是这样)时突然得到这个。

VSP2340: Environment variables were not properly set during profiling run and managed symbols may not resolve. Please use vsperfclrenv before profiling. 

我用谷歌搜索并尝试了一些东西,但我无法找到如何在VS2012内再次使用它。

几个星期后我发现有人回答相同的问题: VS2013:“VSP2340:环境变量设置不正确”,即使从IDE运行也是如此

提前致谢。

我在Visual Studio 2012上遇到了同样的问题。请按照以下步骤操作:

  • 开始 – 所有程序 – Microsoft Visual Studio 2012 – Visual Studio工具
  • 右键单击“打开VS2012 x64 Native Tools命令提示符”,然后选择以管理员身份运行
  • 命令提示符将打开。 运行vsperfclrenv /globalsampleon
  • 重启机器