Question

I am developing an app for Windows Azure and just started using azure table storage using version 2.1.0.4 (the newest version is not supported by the storage simualtor yet) of the storage API. When I now try to execute a TableOperation like:

cloudTable.Execute(TableOperation.Insert(entity));

I get the following exception:

The type 'Microsoft.WindowsAzure.Storage.Table.TableOperation' exists in both 'Microsoft.WindowsAzure.Storage.dll' and 'Microsoft.WindowsAzure.Diagnostics.StorageUtility.dll'

How can I get that to work?
Am I using an incompatible version of Diagnostics (it is from the Azure SDK 2.2)?

Was it helpful?

Solution

Disclaimer, I work at Microsoft on the team that delivers the Storage SDK libraries.

The diagnostics library uses a special sub package to avoid any version collisions with the users selected storage sdk dependency. To do this they essentially IL inject the storage library and its dependencies (odatalib) into this utility dll. However these types are marked as internal so you should not be seeing this compiler error as the internal types should be hidden from you. I attempted to repro this by creating a new cloud project using SDK 2.2 and adding a reference to the StorageUtility.dll you mentioned and did not receive a similar compiler error when using storage types. Can you provide more information on your repro, project setup etc.

Thanks

OTHER TIPS

As a workaround I used the external alias feature:
Having problems when two of referenced assemblies both define type A.A1

But I would still like a "nice solution"...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top