title: Incompatible .NET Standard assemblies that should have been compatible?
body: <p>I have a .NET Standard 2.0 DLL project.</p>
  <p><a href="https://i.stack.imgur.com/ZLvfY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZLvfY.png" alt="Project target framework" /></a></p>
  <p>It has no other references, apart from <code>NETStandard.Library 2.0.1</code> and all is fine.</p>
  <p>It is referenced by a WPF application and everything seems to work fine.</p>
  <p>Once I add a nuget package for <code>System.Collections.Immutable 1.5.0</code> to the DLL project, a yellow exclamation mark appears on the <code>Dependencies</code> root of the Solution Explorer. (Hm... I now see that the exclamation remains even after I remove this package, but I guess this is a VS bug since everything seemed to work just fine before adding this library)</p>
  <p><a href="https://i.stack.imgur.com/HBISE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HBISE.png" alt="exclamation without explanation..." /></a></p>
  <p>Having both packages, everything builds fine, but when I try to use the <code>ImmutableDictionary</code>, I get this:</p>
  <blockquote>
  <p>System.IO.FileNotFoundException: 'Could not load file or assembly 'System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.'</p>
  </blockquote>
  <p>Looking at the nuget packages, I understand that those two should work together, since (from my understanding) the 'System.Collections.Immutable` library says it supports .NET standard 2.0.</p>
  <p><a href="https://i.stack.imgur.com/kSxVq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kSxVq.png" alt="packages" /></a></p>
  <p>I am very new to the .NET Standard world.</p>
  <p>Looking at the public key token of the <code>System.Collections.Immutable.dll</code> in my main app's <code>bin</code> folder I see that it was indeed <code>b03f5f7f11d50a3a</code> as expected. However the version is different.</p>
  <p><a href="https://i.stack.imgur.com/I5JI9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/I5JI9.png" alt="Hm..." /></a></p>
  <p>Normally, in the old .NET I would try to add an assembly redirection in the app's config file. But doing this here does not seem to make any difference. Adding this into my WPF app that references the DLL:</p>
  <pre><code>  &lt;runtime&gt;
      &lt;assemblyBinding xmlns=&quot;urn:schemas-microsoft-com:asm.v1&quot;&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name=&quot;System.Collections.Immutable&quot; publicKeyToken=&quot;b03f5f7f11d50a3a&quot; culture=&quot;neutral&quot; /&gt;
          &lt;bindingRedirect oldVersion=&quot;0.0.0.0-4.0.11.0&quot; newVersion=&quot;4.0.11.0&quot; /&gt;
        &lt;/dependentAssembly&gt;
      &lt;/assemblyBinding&gt;
    &lt;/runtime&gt;
  </code></pre>
  <p>... changes the exception to this:</p>
  <blockquote>
  <p>System.IO.FileNotFoundException: 'Could not load file or assembly 'System.Collections.Immutable, Version=4.0.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.'</p>
  <p>Inner Exception</p>
  <p>FileNotFoundException: Could not load file or assembly 'System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.</p>
  </blockquote>
  <p>What is going on here?
  Can't I use those two nuget packages together?</p>
  <p><strong>UPDATE:</strong></p>
  <p>I now notice that the DLL version that I got was from <code>System.Collections.Concurrent.dll</code>, while I am interested at <code>System.Collections.Immutable.dll</code> which is nowhere to be found on my bin folders...
  I haven't even found where the nuget packages are stored in my solution.</p>
  <p><strong>UPDATE 2:</strong></p>
  <p>It turns out that I get the exact same behavior when I create a new solution with similar setup (Full framework console app referencing .NET Standard 2 DLL).</p>
  <p>Following @Lasse Vågsæther Karlsen's advice, I have downloaded the nuget package from here <a href="https://www.nuget.org/packages/System.Collections.Immutable" rel="nofollow noreferrer">https://www.nuget.org/packages/System.Collections.Immutable</a>, extracted the correct DLL out of it, and placed it in my bin folder. Then the console app worked.</p>
  <p>I am using the 15.7.1 version of Visual Studio. I am not sure what are the changes are of this being fixed in the latest 15.7.2 version...</p>
  <p>You can try my verifiable example by downloading it from here:
  <a href="https://mega.nz/#!YZMwGABD!eHHxvNdO59l2m5ZlHMG1vvqCd-GHv3EVckR-9htDojs" rel="nofollow noreferrer">https://mega.nz/#!YZMwGABD!eHHxvNdO59l2m5ZlHMG1vvqCd-GHv3EVckR-9htDojs</a></p>