title: Could not load file or assembly 'System.Security.Cryptography.Algorithms, Version = 4.1.0.0
body: <p>I'm trying to use System.Security.Cryptography.RNGCryptoServiceProvider class in my .NET Standard 1.4 library and according to <a href="https://stackoverflow.com/questions/38632735/rngcryptoserviceprovider-in-net-core">this</a> topic my code looks like this:</p>
  
  <pre><code>    private byte[] GenerateRandomNumber(int length)
      {
          using (var randomNumberGenerator = RandomNumberGenerator.Create())
          {
              var number = new byte[length];
              randomNumberGenerator.GetBytes(number);
  
              return number;
          }
      }
  </code></pre>
  
  <p>I have also installed from NuGet libraries:</p>
  
  <ul>
  <li>System.Security.Cryptography.Algorithms v=4.3.0</li>
  <li>System.Security.Cryptography.Primitives v=4.3.0</li>
  </ul>
  
  <p>But trying fire it up gives me:</p>
  
  <pre><code>'Could not load file or package' System.Security.Cryptography.Algorithms, Version = 4.1.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a 'or one of its dependencies. The specified file could not be found. '
  </code></pre>
  
  <p>And on <a href="https://www.nuget.org/packages/System.Security.Cryptography.Algorithms/" rel="noreferrer">NuGet page</a> there is no 4.1.0.0 version, only <a href="https://www.nuget.org/packages/System.Security.Cryptography.Algorithms/4.1.0-rc2-24027" rel="noreferrer">4.1.0-rc2-24027</a> and after installing this version I get exact same exception.</p>
  
  <p>What is wrong?</p>
  
  <p><strong>Edit</strong>:
  Switching from .NET Standard 1.4 to 1.6 didn't help</p>
  
  <p><strong>Edit2</strong>:</p>
  
  <p>When I hit F12 on <code>RandomNumberGenerator</code>:</p>
  
  <pre><code>#region Assembly System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
  // C:\Users\x.y\.nuget\packages\system.security.cryptography.algorithms\4.3.0\ref\netstandard1.4\System.Security.Cryptography.Algorithms.dll
  #endregion
  
  namespace System.Security.Cryptography
  {
      public abstract class RandomNumberGenerator : IDisposable
      {
          protected RandomNumberGenerator();
  
          public static RandomNumberGenerator Create();
          public void Dispose();
          public abstract void GetBytes(byte[] data);
          protected virtual void Dispose(bool disposing);
      }
  }
  </code></pre>
  
  <p>So it wants 4.1.0 version (that not exists on NuGet) but path is set for 4.3.0</p>