title: Changing csproj OutputType based on project configuration
body: <p>I need to build a C# project as either WinExe or Library depending on the project's configuration.</p>
  
  <p>I've tried both of these methods with no luck:</p>
  
  <p>1) In the general PropertyGroup:</p>
  
  <p><code>&lt;OutputType Condition=" '$(Configuration)' == 'Release' "&gt;WinExe&lt;/OutputType&gt;
   &lt;OutputType Condition=" '$(Configuration)' == 'Debug' "&gt;Library&lt;/OutputType&gt;</code></p>
  
  <p>2) In a conditional PropertyGroup:</p>
  
  <p><code>&lt;PropertyGroup Condition=" '$(Configuration)' == 'Release' "&gt;
      &lt;OutputType&gt;WinExe&lt;/OutputType&gt;
  &lt;/PropertyGroup&gt;</code></p>
  
  <p><code>&lt;PropertyGroup Condition=" '$(Configuration)' == 'Debug' "&gt;
      &lt;OutputType&gt;Library&lt;/OutputType&gt;
  &lt;/PropertyGroup&gt;</code></p>
  
  <p>Neither of these methods work and the OutputType is always WinExe.  The odd thing is that if I change all instances of WinExe to Library, then it's always Library.  This is making me think that it is reading them successfully, but either in a strange order or that WinExe takes precedence over Library.</p>
  
  <p>Any ideas?</p>