title: How to add content from a target in a csproj file?
body: <p>I would like to add content to my web application depending on the configuration. I have declared the target in the initials target and the target looks like this :</p>
  
  <pre><code>  &lt;Target Name="ApplicationNameDefinition" Outputs="$(MashupName)"&gt;
  &lt;MSBuild.ExtensionPack.Framework.TextString TaskAction="StartsWith" String1="$(ConfigurationName)" String2="Config1"&gt;
    &lt;Output TaskParameter="Result" PropertyName="isConfig1" /&gt;
  &lt;/MSBuild.ExtensionPack.Framework.TextString&gt;
  &lt;MSBuild.ExtensionPack.Framework.TextString TaskAction="StartsWith" String1="$(ConfigurationName)" String2="Config2"&gt;
    &lt;Output TaskParameter="Result" PropertyName="isConfig2" /&gt;
  &lt;/MSBuild.ExtensionPack.Framework.TextString&gt;
  &lt;MSBuild.ExtensionPack.Framework.TextString TaskAction="StartsWith" String1="$(ConfigurationName)" String2="Config3"&gt;
    &lt;Output TaskParameter="Result" PropertyName="isConfig3" /&gt;
  &lt;/MSBuild.ExtensionPack.Framework.TextString&gt;
  &lt;MSBuild.ExtensionPack.Framework.TextString TaskAction="StartsWith" String1="$(ConfigurationName)" String2="Config4"&gt;
    &lt;Output TaskParameter="Result" PropertyName="isConfig4" /&gt;
  &lt;/MSBuild.ExtensionPack.Framework.TextString&gt;
  &lt;Error Condition=" !$(isConfig1) And !$(isConfig2) And !$(isConfig3) And !$(isConfig4) " Text="Configuration $(ConfigurationName) Inconnue" /&gt;
  
  &lt;PropertyGroup&gt;
    &lt;MashupName Condition="$(isConfig1)"&gt;App1&lt;/MashupName&gt;
    &lt;MashupName Condition="$(isConfig2)"&gt;App2&lt;/MashupName&gt;
    &lt;MashupName Condition="$(isConfig3)"&gt;App3&lt;/MashupName&gt;
    &lt;MashupName Condition="$(isConfig4)"&gt;App4&lt;/MashupName&gt;
  &lt;/PropertyGroup&gt;
  &lt;Error Condition="'$(MashupName)'==''" Text="Configuration $(MashupName) Inconnue" /&gt;
  &lt;ItemGroup &gt;
    &lt;Content Condition=" '$(MashupName)'!='' " Include="App_Themes\$(MashupName)\**" /&gt;
  &lt;/ItemGroup&gt;
  </code></pre>
  
  <p></p>
  
  <p>However, the content is not added to the project. Any Idea ?</p>
  
  <p>Thanks.</p>