WCF Data Services, WindowsAzure.Storage and Microsoft.Data.OData version nightmare

450 views Asked by At

I am using Visual Studio 2015 (Pre), Framework 4.5.2

I have the folowing project structure

StorageProject

  • nuget package Microsoft.WidowsAzure.Storage is installed
  • This Nuget package has (among others) dependencies on Microsoft.Data.OData, wich is also installed

AnotherProject

  • Has a refernce on StorageProject
  • Does not have any nuget package or other refernces (except default references on the framework)

Here is the list of the packages installed in StorageProject

  • WindowsAzure.Storage 4.3.0
  • Microsoft.WindowsAzure.ConfigurationManager 3.1.0
  • System.Spatial 4.3.0
  • Microsoft.Data.Edm 5.6.4
  • Microsoft.Data.OData 5.6.4
  • Microsoft.Data.Services.Client 5.6.4

These are all dependencies of WindowsAzure.Storage, latest versions.

There is no other version of these packages installed anywhere on the solution.

I will focus on Microsoft.Data.OData, but the same problem occurs with Microsoft.Data.Edm and Microsoft.Data.Services.Client 5.6.4

When building StorageProject, the correct version of these dll (5.6.4) ends up in the bin folder of the project.

But when building AnotherProject, the bin folder contains version 5.6.2 of the dll.

Now I passed all day trying to figure out where these dlls come from.

There is a version 5.0.0.0 in the GAC, wich I cannot uninstall. (gacutil yields it is used by something).

I did a file search on C:\ to find that the only place where this version of the dll is (beside the bin folder of my project) is in C:\Program Files (x86)\Microsoft WCF Data Services\5.6.2. If I delete (move) this folder, my project builds "normally" and everything is fine. In fact, in this case OData is not in the bin folder at all. And as far as I am concerned, that's ok this way.

Now the real question(s) :

  • Why is it the version from Microsoft WCF Data Services that ends up in the bin, instead of the version actually installed in the referenced project?

  • Where does Microsoft WCF Data Services comes from ? I don't remember installing it at all, maybe it comes with a version on Visual Studio? (I have 2012, 2013 and 2015 installed)

  • Can I uninstall it? I don't see it in Windows' control panel.

1

There are 1 answers

1
Veena Udayabhanu - MSFT On

•Why is it the version from Microsoft WCF Data Services that ends up in the bin, instead of the version actually installed in the referenced project?

This could be due to the fact that the storage client does not depend on a specific version of the Data Service Client. Since Specific Version is set to false, the GAC will be searched first during compilation, any version will be considered "acceptable", and no other version will be exported.

•Where does Microsoft WCF Data Services comes from ? I don't remember installing it at all, maybe it comes with a version on Visual Studio? (I have 2012, 2013 and 2015 installed)

It could be installed due to a variety of reasons. The Azure SDK contains this as well. So if you ever installed the Azure SDK, it could have come with that.

•Can I uninstall it? I don't see it in Windows' control panel.

Looks like this is only possible by uninstalling the MSI package that installed the assembly via Add/Remove programs. For that, you would have to again figure out which installation brought this assembly with it and check whether that is needed or not.