Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Customize your project using the msbuild properties which you can do if you follow these steps:</p> <p>Go to the solution explorer and unload one project by right clicking on it and select Unload Project. </p> <p>Then right click again on the unloaded project and select Edit Project. This will open the XML definition of your project, and you will have intellisense for the layout which will help you perform the next steps. </p> <p>In the visual studio editor find the first PropertyGroup tag and add these lines near or at the end of the closing PropertyGroup tag:</p> <pre><code>&lt;SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'"&gt;..\&lt;/SolutionDir&gt; &lt;BuildDirectory Condition="$(BuildDirectory) =='' or $(BuildDirectory) == '*Undefined*'"&gt;$(SolutionDir)\build\&lt;/BuildDirectory&gt; </code></pre> <p>The above SolutionDir is defined in msbuild properties which you can obtain using this answer: <a href="https://stackoverflow.com/questions/5556168/msbuild-script-utilizing-solution-information" title="msbuild script utilizing solution information">msbuild script using solution information</a> and also check out the well known msbuild properties <a href="http://msdn.microsoft.com/en-us/library/vstudio/ms164309.aspx" rel="nofollow noreferrer">here</a></p> <p>The next step is to find the OutputPath tag for each configuration and edit it like this:</p> <pre><code>&lt;OutputPath&gt;$(BuildDirectory)\x86\AutomatedDebug\&lt;/OutputPath&gt; </code></pre> <p>The example above assumes you have a configuration named AutomatedDebug with destination platform x86.</p> <p>The output will be</p> <pre><code>x:\projects\whereever-your-solution-is\build\x86\AutomatedDebug\ </code></pre> <p>Repeat for each project. </p> <p>To unload more than one project, collapse all projects in the solution explorer and shift click or ctrl click to select all or some projects, then right click on the selected group to unload, unfortunately you cannot do this for editing, at least in visual studio 2010.</p> <p>I am the first to admit that this is somewhat cumbersome to do for existing projects, but you could easily create a visual studio project template that has these settings changed so that new projects will use a more convenient default output directory. </p> <p>You cannot edit the output directory directly in visual studio because the project properties editor escapes any $() enclosed text. </p> <p>Also you could only modify the OutputPath using the name of a system environment variable enclosed in $(). This last option is to enable a global output directory.</p> <p>If you build any single project modified in this way using msbuild directly in the commandline the output directory will be created one directory above from where you ran msbuild</p> <pre><code>..\build\x86\AutomatedDebug </code></pre> <p>If you are in a team, you should warn them not to edit the output directory directly by hand, as this action will overwrite any customization. </p> <p>Hope this info is useful. Greetings.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload