My Azure web project just started exhibiting an assembly binding error - Microsoft.Data.Edm v5.6.2.0 can't be found.
My project references that version of the assembly from a nuget package.
What I've discovered is this:
- when I build the project, the bin\ folder contains the correct version of the assembly.
- when I deploy the project to the Azure emulator, the assembly in bin\ is overwritten with an older version: v5.6.0.0.
The older version is not referenced by any of the projects in my solution, but it IS referenced by Microsoft.WindowsAzure.Storage v4.2.1.0, which in turn is referenced by my project.
(In fact, the Storage assembly references older versions of three assemblies that my project also references: Microsoft.Data.Edm, Microsoft.Data.OData, and Microsoft.Data.Services.Client - all three newer assemblies are overwritten with older assemblies on deploy.)
This behavior occured out of the blue: I was iterating on some maintenance, hit Ctrl+F5 for the 20th time this afternoon, and suddenly saw the error.
- the newer version is overwritten in the web project's
bin\
folder, but is not overwritten in the[azure project]\csx\Debug\roles\[web project name]\approot\bin
or the[azure project]\obj\Debug\[web project name]\bin
folders - the affected references are set to copy local
- a diff of the project file shows no changes since last commit
- an Azure worker role in the same solution has the same set of references but is unaffected
- neither restarting VS nor rebooting has fixed the problem
Is there a way to beat Visual Studio back in line?