title: Passing properties to MSBUILD Task
body: <p>I am trying to call msbuild task for all the project files with properties. I call the msbuild task four times with hardcoded configurations and platform combination. Something like</p>
  
  <pre><code>&lt;MSBuild Projects="$(MSBuildProjectFile)" Targets="Build" Properties="Configuration=Debug;Platform=Win32" BuildInParallel="true"/&gt;
  &lt;MSBuild Projects="$(MSBuildProjectFile)" Targets="Build" Properties="Configuration=Debug;Platform=x64" BuildInParallel="true"/&gt;
  &lt;MSBuild Projects="$(MSBuildProjectFile)" Targets="Build" Properties="Configuration=Release;Platform=Win32" BuildInParallel="true"/&gt;
  &lt;MSBuild Projects="$(MSBuildProjectFile)" Targets="Build" Properties="Configuration=Release;Platform=x64" BuildInParallel="true"/&gt;
  </code></pre>
  
  <p>But I want to provide this property as ItemGroup something like this</p>
  
  <pre><code>Configuration=%(BUILD_CONFIG.Identity);Platform=%(BUILD_PLATFORM.Identity)
  </code></pre>
  
  <p>Code sample
  MyProject.vcxproj</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Project DefaultTargets="BuildAll" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
  &lt;Import Project="BuildAllConfiguration.vcxproj"/&gt;
  &lt;ItemGroup Label="ProjectConfigurations"&gt;
      &lt;ProjectConfiguration Include="Debug|Win32"&gt;
        &lt;Configuration&gt;Debug&lt;/Configuration&gt;
        &lt;Platform&gt;Win32&lt;/Platform&gt;
      &lt;/ProjectConfiguration&gt;
      &lt;ProjectConfiguration Include="Release|Win32"&gt;
        &lt;Configuration&gt;Release&lt;/Configuration&gt;
        &lt;Platform&gt;Win32&lt;/Platform&gt;
      &lt;/ProjectConfiguration&gt;
      &lt;ProjectConfiguration Include="Debug|x64"&gt;
        &lt;Configuration&gt;Debug&lt;/Configuration&gt;
        &lt;Platform&gt;x64&lt;/Platform&gt;
      &lt;/ProjectConfiguration&gt;
      &lt;ProjectConfiguration Include="Release|x64"&gt;
        &lt;Configuration&gt;Release&lt;/Configuration&gt;
        &lt;Platform&gt;x64&lt;/Platform&gt;
      &lt;/ProjectConfiguration&gt;
    &lt;/ItemGroup&gt;
    &lt;PropertyGroup Label="Globals"&gt;
      &lt;ProjectGuid&gt;{E6B6F967-3BE3-428F-9288-3F838B8E726A}&lt;/ProjectGuid&gt;
      &lt;Keyword&gt;Win32Proj&lt;/Keyword&gt;
      &lt;RootNamespace&gt;MyProject&lt;/RootNamespace&gt;
      &lt;WindowsTargetPlatformVersion&gt;8.1&lt;/WindowsTargetPlatformVersion&gt;
    &lt;/PropertyGroup&gt;
    &lt;Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /&gt;
    &lt;PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"&gt;
      &lt;ConfigurationType&gt;DynamicLibrary&lt;/ConfigurationType&gt;
      &lt;UseDebugLibraries&gt;true&lt;/UseDebugLibraries&gt;
      &lt;PlatformToolset&gt;v140&lt;/PlatformToolset&gt;
      &lt;CharacterSet&gt;Unicode&lt;/CharacterSet&gt;
    &lt;/PropertyGroup&gt;
  &lt;ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"&gt;
      &lt;ClCompile&gt;
        &lt;PrecompiledHeader&gt;
        &lt;/PrecompiledHeader&gt;
        &lt;WarningLevel&gt;Level3&lt;/WarningLevel&gt;
        &lt;Optimization&gt;Disabled&lt;/Optimization&gt;
        &lt;PreprocessorDefinitions&gt;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)&lt;/PreprocessorDefinitions&gt;
        &lt;SDLCheck&gt;true&lt;/SDLCheck&gt;
      &lt;/ClCompile&gt;
      &lt;Link&gt;
        &lt;SubSystem&gt;Windows&lt;/SubSystem&gt;
        &lt;GenerateDebugInformation&gt;true&lt;/GenerateDebugInformation&gt;
      &lt;/Link&gt;
    &lt;/ItemDefinitionGroup&gt;
  ... 
  Similar Configuration Details for release and Platforms x64
  </code></pre>
  
  <p>This project file includes BuildAllConfiguration.vcxproj</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
    &lt;PropertyGroup&gt;
      &lt;BUILD_PLATFORMS&gt;Win32;x64&lt;/BUILD_PLATFORMS&gt;
      &lt;BUILD_CONFIGURATION&gt;Debug;Release&lt;/BUILD_CONFIGURATION&gt;
    &lt;/PropertyGroup&gt;
    &lt;Target Name="BuildAll"&gt;
      &lt;ItemGroup&gt;      
        &lt;CONFIGURATION Include="$(BUILD_CONFIGURATION.Split(';'))"/&gt;
        &lt;PLATFORM Include="$(BUILD_PLATFORMS.Split(';'))"/&gt;
        &lt;ProjectToBuild Include="$(MSBuildProjectFile)"&gt;
          &lt;Properties&gt;Configuration=%(CONFIGURATION.Identity);Platform=%(PLATFORM.Identity)&lt;/Properties&gt;
          &lt;Targets&gt;Build&lt;/Targets&gt;
        &lt;/ProjectToBuild&gt;
      &lt;/ItemGroup&gt;
      &lt;Message Text="MSBUILD TASK input @(ProjectToBuild)"/&gt;
      &lt;MSBuild Projects="@(ProjectToBuild)" /&gt;
   &lt;/Target&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>This project will call MyProject.vcxproj with Target Build and Properties which is not getting wellformed. My expectation is that the properties goes as following</p>
  
  <pre><code>Properties=Configuration=Debug;Platform=Win32 
  Properties=Configuration=Release;Platform=Win32  
  Properties=Configuration=Debug;Platform=x64 
  Properties=Configuration=Release;Platform=x64
  </code></pre>
  
  <p>Instead the properties are passed as following</p>
  
  <pre><code>Properties=Configuration=Debug;Platform=
  Properties=Configuration=Release;Platform=
  Properties=Configuration=;Platform=Win32
  Properties=Configuration=;Platform=x64
  </code></pre>