title: Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe'
body: <p>Trying to use SQLTypeProvider with postgres I get the following errorwhen running</p>
  
  <pre><code>dotnet build
  </code></pre>
  
  <blockquote>
    <p>error FS3033: The type provider 'FSharp.Data.Sql.SqlTypeProvider'
    reported an error: Could not load file or assembly
    'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0,
    Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot
    find the file specified.
    [/home/sashan/code/titan/src/Server/Server.fsproj]</p>
  </blockquote>
  
  <p>my data provider is this:</p>
  
  <pre><code>type SQL = SqlDataProvider&lt; 
                    ConnectionString = pg_dev_conn_string,
                    DatabaseVendor = Common.DatabaseProviderTypes.POSTGRESQL,
                    UseOptionTypes = true &gt;
  </code></pre>
  
  <p>If I change it to the following </p>
  
  <pre><code>type SQL = SqlDataProvider&lt; 
                ConnectionString = pg_dev_conn_string,
                DatabaseVendor = Common.DatabaseProviderTypes.POSTGRESQL,
                ResolutionPath = "/home/sashan/code/dotnet/2.1.500/sdk/NuGetFallbackFolder/system.runtime.compilerservices.unsafe/4.5.1/lib/netcoreapp2.0",
                UseOptionTypes = true &gt;
  </code></pre>
  
  <p>The error goes away but I don't understand why. The fix seems really weird. Why should I have to point it to a file outside of my project? Shouldn't the System.Runtime.CompilerServices.Unsafe.dll be somewhere in one of project's subdirectories where the compiler can find it?</p>