Error creating Azure Table using C# -


following steps in article (https://docs.microsoft.com/en-us/azure/cosmos-db/table-storage-how-to-use-dotnet), created console application , added following code main method:

            string connection = "defaultendpointsprotocol=https;accountname=mystorageaccountname;accountkey=myaccountkey;endpointsuffix=core.windows.net";          cloudstorageaccount account;         if (!cloudstorageaccount.tryparse(connection, out account))         {             throw new exception("unable parse storage account connection string.");         }          cloudtableclient tableclient = account.createcloudtableclient();         cloudtable table = tableclient.gettablereference("mytable");          // line @ error:         table.createifnotexists(); 

however, got following error when executing last line:

could not load file or assembly 'microsoft.data.odata, version=5.6.2.0, culture=neutral, publickeytoken=31bf3856ad364e35' or 1 of dependencies. located assembly's manifest definition not match assembly reference. (exception hresult: 0x80131040)

any ideas why i'm getting error?

note: wrote similar code targets same storage account create queue , worked fine.

it looks it's time delete packages folder solution , clean , rebuild project. make sure microsoft.data.odata nuget package installed.:)


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -