Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>First of all - I would recommend you to use msbuild scripts to build your solutions, instead of direct building sln file using command line. E.g. use something like this:</p> <pre><code>msbuild SolutionName.Build.proj </code></pre> <p>and inside this Solution1.Build.proj you can put anything as simple as </p> <pre><code>&lt;Project ToolsVersion="4.0" DefaultTargets="BuildMe" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt; &lt;Target Name="BuildMe"&gt; &lt;MSBuild Projects="SolutionName.sln" Properties="property1=value1;property2=value2;"/&gt; &lt;/Target&gt; &lt;/Project&gt; </code></pre> <p>After this step, which adds flexibility to your build process, you can start leverage AdditionalProperties metadata for MSBuild task.</p> <p>Then you can use <code>&lt;Import</code> construction to store your list of shared properties in a separate file and item metadata for passing property values:</p> <pre><code>&lt;Project ToolsVersion="4.0" DefaultTargets="BuildMe" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt; &lt;Import Project="MySharedProperies.props" /&gt; &lt;ItemGroup&gt; &lt;ProjectToBuild Include="SolutionName.sln"&gt; &lt;AdditionalProperties&gt;SomeProjectSpecificProperty&lt;/AdditionalProperties&gt; &lt;/ProjectToBuild&gt; &lt;/ItemGroup&gt; &lt;Target Name="BuildMe"&gt; &lt;MSBuild Projects="@(ProjectToBuild)" Properties="@(MySharedProperies)"/&gt; &lt;/Target&gt; &lt;/Project&gt; </code></pre> <p>You can check this post for more details about <a href="http://blogs.msdn.com/b/msbuild/archive/2007/07/17/properties-and-additionalproperties-metadata-for-items-used-in-msbuild-task-s.aspx" rel="nofollow">properties and additional properties metadata</a> or <a href="http://msdn.microsoft.com/en-us/library/z7f65y0d.aspx" rel="nofollow">this original MSDN reference</a> (scroll to Properties Metadata section)</p> <p>This is the base idea how to do it, if you have any questions - feel free to ask.</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