Setting an environment variable for the performance analyzer in visual studio 2013
<p>I am currently trying to use the performance analyzer for my projects in Visual Studio 2013 (C++). The project runs in debug and release mode in Visual Studio with the Configuration Properties -> debugging -> Environment set to PATH=$(MYPATH);%path.</p>

<p>I use this to allow Visual Studio to find all the dlls I need which are scattered in different directories (for instance the boost dlls are all in one place on my computer).</p>

<p>For some reason, it does not work when using the Performance Wizard. I used the recommended CPU sampling and made sure my app could start on F5. When started from the performance wizard it says :</p>

<p>"The program can't start because mydll.dll is missing from your computer..."</p>

<p>I suspect the problem is with the environment variable the profiler uses on start. Is there anyway to tell the profiler to use a specific environment variable ?</p>

<p>I have searched for a while but I have not found any information on how to do that. Maybe I am not using the proper keywords ? I have read these but they do not really help :</p>

<ul>
<li><p>clearly not what I want : <a href="https://msdn.microsoft.com/en-us/library/dd557761.aspx" rel="nofollow noreferrer">https://msdn.microsoft.com/en-us/library/dd557761.aspx</a></p></li>
<li><p>won't fix the problem for the integrated profiler : <a href="https://stackoverflow.com/questions/3205672/how-do-i-set-environmental-variable-for-my-application-while-profiling-it-under">How do I set Environmental variable for my application while profiling it under visual studio 2008</a></p></li>
<li><p>this is not the same problem : <a href="https://stackoverflow.com/questions/15421201/how-do-i-run-the-visual-studio-2012-memory-profiler-im-getting-the-error-da000">How do I run the Visual Studio 2012 memory profiler? I&#39;m getting the error DA0002</a></p></li>
<li><p>I am using property sheets much like described here but for VS2013: <a href="https://stackoverflow.com/questions/16876424/c-using-environment-variable-in-property-sheet-for-visual-studio-2010">C++ - Using environment variable in property sheet for Visual Studio 2010</a></p></li>
</ul>

<p>**To be noted : if I copy the missing dlls in my .exe folder it works fine. This solution requires a lot of copying and I would rather avoid it if possible.</p>