Visual Studio assembly reference details in Properties pane doesn’t match what gets used for the build

Having lost a day to this, I post in the hope someone else gets their projects fixed sooner. Caveat: No idea which step fixed the issue.


  • Large solution (~40 projects) containing multiple Azure services, all targeting Azure SDK 1.7
  • Another team member upgrades to Azure SDK 1.8
  • Now can’t deploy a working build to Azure as once up, site 500s with Could not load file or assembly ‘Microsoft.WindowsAzure.ServiceRuntime’ or one of its dependencies
    • Everything still works just peachy locally, though
  • Right-click… Properties on a Microsoft.WindowsAzure.ServiceRuntime reference in any project, find that the version mentioned is when we’re expecting
    • Even though the .csproj file specifically says the reference is and with a hint-path pointing the right way
    • Where is VS2012 pulling this from?
  • Run build with diagnostic-level logging to find assembly being used in build process even though it’s not part of the .csproj file

Solution for me

  • Close Visual Studio
  • Find C:\Users\USERNAME\AppData\Local\Microsoft\VisualStudio\11.0\Designer\ShadowCache folder, delete all contents
  • Uninstall all Azure SDKs lower than 1.8, and any other associated libraries etc using Add/Remove Programs
  • Remove registry value at key HKLM\SOFTWARE\Classes\Installer\Assemblies\Global\Microsoft.WindowsAzure.ServiceRuntime,version=”″…
  • Use gacutil /u to uninstall the 1.7 assembly from the GAC
  • Restart machine
  • Delete entire source tree from local disk and pull down again from source control
  • Clean solution
  • Rebuild all

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.