title: Conditional references in .NET project, possible to get rid of warning?
body: <p>I have two references to a SQLite assembly, one for 32-bit and one for 64-bit, which looks like this (this is a test project to try to get rid of the warning, don't get hung up on the paths):</p>
  
  <pre><code>&lt;Reference Condition=" '$(Platform)' == 'x64' " Include="System.Data.SQLite, Version=1.0.61.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=AMD64"&gt;
    &lt;SpecificVersion&gt;True&lt;/SpecificVersion&gt;
    &lt;HintPath&gt;..\..\LVK Libraries\SQLite3\version_1.0.65.0\64-bit\System.Data.SQLite.DLL&lt;/HintPath&gt;
  &lt;/Reference&gt;
  &lt;Reference Condition=" '$(Platform)' == 'x86' " Include="System.Data.SQLite, Version=1.0.65.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86"&gt;
    &lt;SpecificVersion&gt;True&lt;/SpecificVersion&gt;
    &lt;HintPath&gt;..\..\LVK Libraries\SQLite3\version_1.0.65.0\32-bit\System.Data.SQLite.DLL&lt;/HintPath&gt;
  &lt;/Reference&gt;
  </code></pre>
  
  <p>This produces the following warning:</p>
  
  <pre><code>Warning 1 The referenced component 'System.Data.SQLite' could not be found.     
  </code></pre>
  
  <p>Is it possible for me to get rid of this warning?</p>
  
  <p>One way I've looked at it to just configure my project to be 32-bit when I develop, and let the build machine fix the reference when building for 64-bit, but this seems a bit awkward and probably prone to errors.</p>
  
  <p>Any other options?</p>
  
  <p>The reason I want to get rid of it is that the warning is apparently being picked up by TeamCity and periodically flagged as something I need to look into, so I'd like to get completely rid of it.</p>
  
  <hr>
  
  <p><strong>Edit</strong>: Per the answer, I tried this:</p>
  
  <pre><code>&lt;PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "&gt;
      ...
      &lt;SqlitePath&gt;..\..\LVK Libraries\SQLite3\version_1.0.65.0\32-bit&lt;/SqlitePath&gt;
  &lt;/PropertyGroup&gt;
  &lt;PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "&gt;
      ...
      &lt;SqlitePath&gt;..\..\LVK Libraries\SQLite3\version_1.0.65.0\32-bit&lt;/SqlitePath&gt;
  &lt;/PropertyGroup&gt;
  &lt;PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "&gt;
      ...
      &lt;SqlitePath&gt;..\..\LVK Libraries\SQLite3\version_1.0.65.0\64-bit&lt;/SqlitePath&gt;
  &lt;/PropertyGroup&gt;
  &lt;PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "&gt;
      ...
      &lt;SqlitePath&gt;..\..\LVK Libraries\SQLite3\version_1.0.65.0\64-bit&lt;/SqlitePath&gt;
  &lt;/PropertyGroup&gt;
  </code></pre>
  
  <p>and then in my reference:</p>
  
  <pre><code>&lt;Reference Include="System.Data.SQLite"&gt;
      &lt;SpecificVersion&gt;False&lt;/SpecificVersion&gt;
      &lt;HintPath&gt;$(SqlitePath)\System.Data.SQLite.DLL&lt;/HintPath&gt;
  &lt;/Reference&gt;
  </code></pre>
  
  <p>This got rid of the warning, but is it correct?</p>