title: Adding x86 and x64 libraries to NuGet package
body: <p>I have made a library which depends on CefSharp which requires to build the library for specific platforms. So no AnyCPU support.</p>
  <p>Now I want to pack this into a NuGet. As far as I understand, you have to put these files into the build folder and have a <code>.targets</code> file which picks the correct dll to reference. So I ended up with a NuGet package looking like this:</p>
  <pre><code>lib
      monodroid
          MyLib.dll
      xamarin.ios10
          MyLib.dll
      net45
          MyLib.dll (x86)
  build
      net45
          x86
              MyLib.dll (x86)
          x64
              MyLib.dll (x64)
          MyLib.targets
  </code></pre>
  <p>I put the following inside of the <code>.targets</code> file:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;Project ToolsVersion=&quot;4.0&quot; xmlns=&quot;http://schemas.microsoft.com/developer/msbuild/2003&quot;&gt;
    &lt;Target Name=&quot;PlatformCheck&quot; BeforeTargets=&quot;InjectReference&quot;
      Condition=&quot;(('$(Platform)' != 'x86') AND  ('$(Platform)' != 'x64'))&quot;&gt;
      &lt;Error  Text=&quot;$(MSBuildThisFileName) does not work correctly on '$(Platform)' platform. You need to specify platform (x86 or x64).&quot; /&gt;
    &lt;/Target&gt;
    
    &lt;Target Name=&quot;InjectReference&quot; BeforeTargets=&quot;ResolveAssemblyReferences&quot;&gt;
      &lt;ItemGroup Condition=&quot;'$(Platform)' == 'x86' or '$(Platform)' == 'x64'&quot;&gt;
        &lt;Reference Include=&quot;MyLib&quot;&gt;
          &lt;HintPath&gt;$(MSBuildThisFileDirectory)$(Platform)\MyLib.dll&lt;/HintPath&gt;
        &lt;/Reference&gt;
      &lt;/ItemGroup&gt;
    &lt;/Target&gt;
  &lt;/Project&gt;
  </code></pre>
  <p>So far so good. Now to the problem. When adding this NuGet to a new WPF project, I see the reference to the library appearing in the <code>.csproj</code> file like:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;Reference Include=&quot;MyLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d64412599724c860, processorArchitecture=x86&quot;&gt;
    &lt;HintPath&gt;..\packages\MyLib.0.0.1\lib\net45\MyLib.dll&lt;/HintPath&gt;
    &lt;Private&gt;True&lt;/Private&gt;
  &lt;/Reference&gt;
  </code></pre>
  <p>Although I don't see anything mentioned about the <code>.targets</code> file. Is this still the way to do it with NuGet 3? Did I do something wrong? Currently, this fails at runtime when running x64 because of the reference to the x86 lib.</p>