title: MSBuild: Add additional files to compile without altering the project file
body: <p>After looking around I can't find a simple answer to this problem.</p>
  
  <p>I am trying to create an MSBuild file to allow me to easily use SpecFlow and NUnit within Visual Studio 2010 express.</p>
  
  <p>The file below is not complete this is just a proof of concept and it needs to be made more generic.</p>
  
  <pre><code>&lt;Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
  
      &lt;PropertyGroup&gt;
          &lt;BuildDependsOn&gt;
              BuildSolution;          
              SpecFlow;
              BuildProject;           
              NUnit;
          &lt;/BuildDependsOn&gt;
      &lt;/PropertyGroup&gt;
  
      &lt;PropertyGroup&gt;
          &lt;Solution&gt;C:\Users\Craig\Documents\My Dropbox\Cells\Cells.sln&lt;/Solution&gt;
          &lt;CSProject&gt;C:\Users\Craig\Documents\My Dropbox\Cells\Configuration\Configuration.csproj&lt;/CSProject&gt;
          &lt;DLL&gt;C:\Users\Craig\Documents\My Dropbox\Cells\Configuration\bin\Debug\Configuration.dll&lt;/DLL&gt;
          &lt;CSFile&gt;C:\Users\Craig\Documents\My Dropbox\Cells\Configuration\SpecFlowFeature1.feature.cs&lt;/CSFile&gt;
      &lt;/PropertyGroup&gt;
  
      &lt;Target Name="Build" DependsOnTargets="$(BuildDependsOn)"&gt;
          &lt;Message Text="Build Started" Importance="high" /&gt;
          &lt;Message Text="Build Ended" Importance="high" /&gt;
      &lt;/Target&gt;
  
      &lt;Target Name="BuildSolution"&gt;
          &lt;Message Text="BuildSolution Started" Importance="high" /&gt;
              &lt;MSBuild Projects="$(Solution)" Properties="Configuration=Debug" /&gt;
          &lt;Message Text="BuildSolution Ended" Importance="high" /&gt;
      &lt;/Target&gt;
  
      &lt;Target Name="SpecFlow"&gt;
          &lt;Message Text="SpecFlow Started" Importance="high" /&gt;
              &lt;Exec Command='SpecFlow generateall "$(CSProject)"' /&gt;
          &lt;Message Text="SpecFlow Ended" Importance="high" /&gt;
      &lt;/Target&gt;
  
      &lt;Target Name="BuildProject"&gt;
          &lt;Message Text="BuildProject Started" Importance="high" /&gt;
              &lt;MSBuild Projects="$(CSProject)" Properties="Configuration=Debug" /&gt;
          &lt;Message Text="BuildProject Ended" Importance="high" /&gt;
      &lt;/Target&gt;
  
      &lt;Target Name="NUnit"&gt;
          &lt;Message Text="NUnit Started" Importance="high" /&gt;
              &lt;Exec Command='NUnit /run "$(DLL)"' /&gt;
          &lt;Message Text="NUnit Ended" Importance="high" /&gt;
      &lt;/Target&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>The SpecFlow Task looks in the .csproj file and creates a SpecFlowFeature1.feature.cs.
  I need to include this file when building the .csproj so that NUnit can use it.</p>
  
  <p>I know I could modify (either directly or on a copy) the .csproj file to include the generated file but I'd prefer to avoid this.</p>
  
  <p><strong>My question is:</strong> Is there a way to use the MSBuild Task to build the project file and tell it to include an additional file to include in the build?</p>
  
  <p>Thank you.</p>