Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Method not found: Microsoft.WindowsAzure.ServiceModel.Service.set_IsSLBPartialGS(Microsoft.WindowsAzure.ServiceModel.Expression)

Since a while I am facing the following error when trying to launch any kind of application with the Azure Emulator:

Microsoft Azure Tools: Method not found: 'Void Microsoft.WindowsAzure.ServiceModel.Service.set_IsSLBPartialGS(Microsoft.WindowsAzure.ServiceModel.Expression)'.

A restart of my machine usually solves this for a while, but I tend to run into this problem daily, and if I see this warning once, there's no way to get around it without a reboot.

Sadly, I can also not find a lot of documentation, if any.

I am using the Azure Tools V2.9.

Does anyone have a solution, or at least a hint as to what this could be?

like image 989
Sossenbinder Avatar asked Mar 22 '19 14:03

Sossenbinder


1 Answers

Problem:

The Azure SDK v2.9 is shipped with a mismatched version of assemblies. One of the assemblies is missing a setter for the property called IsSLBPartialGS.

Fix:

Copy the 2 assemblies Microsoft.WindowsAzure.ServiceModel.dll and Microsoft.WindowsAzure.ServiceModel.Comon.dll from: "C:\Program Files\Microsoft SDKs\Azure\Emulator"

to: "C:\Program Files\Microsoft SDKs\Azure\Emulator\devfabric"

Note that you'll need admin rights for this operation. I recommend making a backup before overwriting any assemblies.

How the I found the fix:

I wrote my own decompiler and symbol inspector to in order to compare assemblies and their contents. After comparing multiple folders, I found that the Microsoft.Windows.Azure.ServiceModel.dll in the Emulator folder has the AssemblyFileVersion: 1.0.6696.103 (rd_sm.180206-1102)

while the one in the DevFabric folder is version: 1.0.6696.47 (rd_sm.160421-1505)

Note that both AssemblyVersion's are the same (as shown in .NetReflector to be 1.0.0.0), however the AssemblyFileVersions are different. Looking further between the differences in the decompiled code from my program, I found that the assembly in the DevFabric (which is a slightly older version) is missing some key classes/methods/properties including the following: See picture of code difference

like image 91
Fady H. Wahba Avatar answered Oct 19 '22 22:10

Fady H. Wahba