title: Could not load file or assembly 'Microsoft.Azure.Documents.Client - Azure-Table-Api
body: <p>I am trying to use Azure Table Api with dotnet core and I keep getting this exception:</p>
  
  <pre><code>Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Azure.Documents.Client, Version=1.20.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
  
     at Microsoft.Azure.CosmosDB.Table.CloudTableClient..ctor(StorageUri storageUri, StorageCredentials credentials, TableConnectionPolicy connectionPolicy, Nullable`1 desiredConsistencyLevel)
     at Microsoft.Azure.CosmosDB.Table.CloudStorageAccountExtensions.CreateCloudTableClient(CloudStorageAccount account, TableConnectionPolicy connectionPolicy, Nullable`1 consistencyLevel)
     at Testing.Program.Main(String[] args) in /Desktop/Repos/TestingWow/Testing/Program.cs:line 22
  </code></pre>
  
  <p>Apparently this is a <a href="https://stackoverflow.com/questions/14189071/could-not-load-file-or-assembly-microsoft-windowsazure-serviceruntime-version">common exception message</a>. I put my simple code on <a href="https://github.com/amir734jj/Testing" rel="noreferrer">GitHub</a> just in case. I think I tried every existing StackOverFlow hint or solution but no success. I am not sure what is the source of my problem. I am using dotnet core 2.1.104 on Mac. Any help would be greatly appreciated.</p>
  
  <p><code>.csproj</code> file:</p>
  
  <pre><code>&lt;Project Sdk="Microsoft.NET.Sdk"&gt;
    &lt;PropertyGroup&gt;
      &lt;OutputType&gt;Exe&lt;/OutputType&gt;
      &lt;TargetFramework&gt;netcoreapp2.0&lt;/TargetFramework&gt;
    &lt;/PropertyGroup&gt;
    &lt;ItemGroup&gt;
      &lt;PackageReference Include="Microsoft.Azure.Common" Version="2.1.4" /&gt;
      &lt;PackageReference Include="Microsoft.Azure.CosmosDB.Table" Version="1.1.2" /&gt;
      &lt;PackageReference Include="Microsoft.Azure.DocumentDB" Version="1.22.0" /&gt;
      &lt;PackageReference Include="Microsoft.WindowsAzure.ConfigurationManager" Version="3.2.3" /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;Reference Include="Microsoft.Azure.Storage.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&gt;
        &lt;HintPath&gt;..\..\..\..\.nuget\packages\microsoft.azure.storage.common\9.0.0.1-preview\lib\netstandard1.3\Microsoft.Azure.Storage.Common.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
    &lt;/ItemGroup&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>Simple code:</p>
  
  <pre><code>using Microsoft.Azure.CosmosDB.Table;
  using Microsoft.Azure.Storage;
  
  namespace Testing
  {
      class Person : TableEntity
      {
          public string Firstname { get; set; }
      }
  
      class Program
      {
          static void Main(string[] args)
          {
              var connectionString =
                  "DefaultEndpointsProtocol=https;AccountName=accountname;AccountKey=1fgp8C2mImKcQfIFLMfAYBXwOK3LlYsXLyJdktuDEgXgmSCbJlDtd9tBeh2BgfnvGXmgltHFHzNnl7JpCR12Eg==;TableEndpoint=https://hello.table.cosmosdb.azure.com:443/;";
  
              // Retrieve the storage account from the connection string.
              CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString);
  
              // Create the table client.
              CloudTableClient tableClient = storageAccount.CreateCloudTableClient();
  
              // Create the CloudTable object that represents the "people" table.
              CloudTable table = tableClient.GetTableReference("people");
  
              // Create a new customer entity.
              Person customer1 = new Person {Firstname = "Walter@contoso.com"};
  
              // Create the TableOperation object that inserts the customer entity.
              TableOperation insertOperation = TableOperation.Insert(customer1);
  
              // Execute the insert operation.
              table.Execute(insertOperation);
          }
      }
  }
  </code></pre>