title: C# csproj file "Choose" element for assembly HintPaths
body: <p>Is it possible to use the Choose/When/Otherwise elements on a reference hintpath?</p>
  
  <p>Something like this:</p>
  
  <pre><code>&lt;ItemGroup&gt;
    &lt;Reference Include="SharedLib..."&gt;
  &lt;SpecificVersion&gt;False&lt;/SpecificVersion&gt;
  &lt;Choose&gt;
    &lt;When Condition="Exists('..\..\SharedLib\bin\Debug')"&gt;
          &lt;HintPath&gt;..\..\SharedLib\bin\Debug\SharedLib.dll&lt;/HintPath&gt;
    &lt;/When&gt;
    &lt;Otherwise&gt;
           &lt;HintPath&gt;.\SharedLib.dll&lt;/HintPath&gt;
    &lt;/Otherwise&gt;
  &lt;/Choose&gt;
    &lt;/Reference&gt;
  &lt;/ItemGroup&gt;
  </code></pre>
  
  <p>But I get errors like ...required attribute "Include" is empty or missing from element "ItemGroup"</p>
  
  <p>Other attempts/version have yielded similar errors such as ...The "Choose" item metadata name is reserved and cannot be used.</p>
  
  <p>This makes me think I canNOT use the "Choose" element INSIDE of an ItemGroup element.</p>
  
  <p>I welcome clarification. See attached samples of the errors.
  <a href="http://i.stack.imgur.com/eRcSC.png" rel="nofollow">Visual Studio csproj Errors when loading project</a></p>