Note that there are some explanatory texts on larger screens.

plurals
  1. POMSBuild task configuration property
    text
    copied!<p>I have three Visual Studio solutions. The first is configured to build as <em>Release</em>, and the other two are set to build as <em>Debug</em>.</p> <p>When running a simple <a href="http://en.wikipedia.org/wiki/MSBuild" rel="nofollow noreferrer">MSBuild</a> script explicitly stating the configuration to build (Debug), the first project is still built as Release.</p> <p>Sample script:</p> <pre><code>&lt;Target Name="Build"&gt; &lt;ItemGroup&gt; &lt;ProjectToBuild Include="$(SolutionsPath)\Solution1.sln"/&gt; &lt;ProjectToBuild Include="$(SolutionsPath)\Core\Solution2.sln"/&gt; &lt;ProjectToBuild Include="$(SolutionsPath)\UI\Solution3.sln"/&gt; &lt;/ItemGroup&gt; &lt;MSBuild Projects="@(ProjectToBuild)" Targets="Rebuild" Properties="Configuration=Debug;Platform=Any CPU"/&gt; &lt;/Target&gt; </code></pre> <p>I have tried variations of the above such as the following, but I always end up with the same result.</p> <pre><code>&lt;Target Name="Build"&gt; &lt;ItemGroup&gt; &lt;ProjectToBuild Include="$(SolutionsPath)\Solution1.sln"&gt; &lt;Properties&gt;Configuration=Debug&lt;/Properties&gt; &lt;/ProjectToBuild&gt; &lt;ProjectToBuild Include="$(SolutionsPath)\Core\Solution2.sln"&gt; &lt;Properties&gt;Configuration=Debug&lt;/Properties&gt; &lt;/ProjectToBuild&gt; &lt;ProjectToBuild Include="$(SolutionsPath)\UI\Solution3.sln"&gt; &lt;Properties&gt;Configuration=Debug&lt;/Properties&gt; &lt;/ProjectToBuild&gt; &lt;/ItemGroup&gt; &lt;MSBuild Projects="@(ProjectToBuild)" Targets="Rebuild" Properties="Platform=Any CPU"/&gt; &lt;/Target&gt; </code></pre> <p>I note there is a similar question, <em><a href="https://stackoverflow.com/questions/474403">MSBuild task - Build fails because one solution being built in release instead of debug</a></em>, but that is specific to TFS and Teambuild. I am talking pure MSBuild with a simple project file created from scratch.</p> <p>How can I fix this problem?</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