title: Using Azure storage on Mac with ASP.NET vNext
body: <p>Trying to read data from Azure TableStorage in MVC 6 application on Mac.
  It works on PC, but when on Mac it used to give this error:</p>
  
  <pre><code>TypeLoadException: Could not load type 'Microsoft.WindowsAzure.Storage.Core.Executor.RESTCommand`1[Microsoft.WindowsAzure.Storage.Table.TableResult]' from assembly 'Microsoft.WindowsAzure.Storage, Version=4.3.2.0, Culture=neutral, PublicKeyToken=null'.
  Microsoft.WindowsAzure.Storage.Table.TableOperation.ExecuteAsync (Microsoft.WindowsAzure.Storage.Table.CloudTableClient client, System.String tableName, Microsoft.WindowsAzure.Storage.Table.TableRequestOptions requestOptions, Microsoft.WindowsAzure.Storage.OperationContext operationContext, CancellationToken cancellationToken) [0x00000] in &lt;filename unknown&gt;, line 0Stack Query Cookies Headers Environment
  TypeLoadException: Could not load type 'Microsoft.WindowsAzure.Storage.Core.Executor.RESTCommand`1[Microsoft.WindowsAzure.Storage.Table.TableResult]' from assembly 'Microsoft.WindowsAzure.Storage, Version=4.3.2.0, Culture=neutral, PublicKeyToken=null'.
  Microsoft.WindowsAzure.Storage.Table.TableOperation.ExecuteAsync (Microsoft.WindowsAzure.Storage.Table.CloudTableClient client, System.String tableName, Microsoft.WindowsAzure.Storage.Table.TableRequestOptions requestOptions, Microsoft.WindowsAzure.Storage.OperationContext operationContext, CancellationToken cancellationToken) [0x00000] in &lt;filename unknown&gt;
  Microsoft.WindowsAzure.Storage.Table.CloudTableClient.ExecuteAsync (System.String tableName, Microsoft.WindowsAzure.Storage.Table.TableOperation operation, Microsoft.WindowsAzure.Storage.Table.TableRequestOptions requestOptions, Microsoft.WindowsAzure.Storage.OperationContext operationContext, CancellationToken cancellationToken) [0x00000] in &lt;filename unknown&gt;
  Microsoft.WindowsAzure.Storage.Table.CloudTable+&lt;&gt;c__DisplayClass4+&lt;&lt;ExistsAsync&gt;b__5&gt;d__0.MoveNext () [0x00000] in &lt;filename unknown&gt;
  --- End of stack trace from previous location where exception was thrown ---
  System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in &lt;filename unknown&gt;
  System.Runtime.CompilerServices.TaskAwaiter`1[System.Boolean].GetResult () [0x00000] in &lt;filename unknown&gt; 
  </code></pre>
  
  <p>After following this <a href="https://github.com/Azure/azure-storage-net/issues/100" rel="nofollow">discussion</a> and installing <code>System.Net.Http</code> package using <code>kpm</code> I started to get a new error:</p>
  
  <pre><code>An unhandled exception occurred while processing the request.NullReferenceException: Object reference not set to an instance of an object
  Microsoft.WindowsAzure.Storage.Shared.Protocol.HttpClientFactory.BuildHttpClient[TableResult] (Microsoft.WindowsAzure.Storage.Core.Executor.RESTCommand`1 cmd, System.Net.Http.HttpMessageHandler handler, Boolean useVersionHeader, Microsoft.WindowsAzure.Storage.OperationContext operationContext) [0x00000] in &lt;filename unknown&gt;, line 0 
  </code></pre>
  
  <p><strong>Note:
  I had the <code>System.Net.Http</code> package installed in <code>"aspnetcore50": { "dependencies": { ... } }</code>, but it seems like it had to be installed in the common <code>dependencies</code></strong></p>
  
  <p>Any idea why that might happen and how to fix it?</p>