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

4

16

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?

Interpreter answered 22/3, 2019 at 14:51 Comment(2)
Really would like to know this too! This is getting annoying. I started getting this recently and noticed this last Friday you posted it the same day. Is this caused by an azure update?Yuji
@Yuji I wouldn't exclude that. I recently setup my device again and had this happen since then, so I guess I also got the latest versionsInterpreter
H
13

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

Hocuspocus answered 25/10, 2020 at 0:58 Comment(1)
You just saved my colleagues and me so many hours, thanks a lot! This seems to work!Interpreter
G
6

I experienced this issue starting recently, and was able to resolve it by reverting Azure Data Lake and Stream Analytics Tools to version 2.3.3000.2 -- the update to 2.3.7000.2 on 3/25/19 seems to have introduced the issue.

Glamour answered 28/3, 2019 at 16:37 Comment(6)
Since I ended up back here... it's not fixed in 2.3.8000.0.Glamour
I have to agree, I am still facing it. Although it looked stable for a while after doing what you suggestedInterpreter
Updating to Tools version 2.3.9000.0 helps for meSausage
I have experienced the issue even with 2.3.9000.0 when trying to F5 a Cloud Service project in emulator. Uninstall solve the issue for me.Beaton
@Beaton Oh, I see, but the next stepos works for me: 1. Close MSVS (I use MSVS 2015) 2. Close emulators 3. Open IIS Manager and delete a site for a web role 4. Start MSVS again, open solution, start debugging I use Win 10 and have installed MSVS 2019, may be it related…Sausage
@ViacheslavIvanov - this worked in my case (MSVS 2019, no IIS so just did steps 1,2,4)Kiruna
O
3

For me, it was just because I didn't start VS2019 as Administrator. Closed the solution and started it with Admin privilege then error went away.

Obscurantism answered 16/1, 2020 at 20:39 Comment(0)
M
2

Only Visual Studio Repairing resolved the problem for me.

I had the same eror, but it shows me the error when I tried to start debugging 2 and more applications at the same time.

To perform the repairing open Visual Studio Installer and find Repair option there.

Updated: when I installed Resharper back - I started to get the error, after I uninstalled - everything started to work.

Meninges answered 25/6, 2019 at 13:19 Comment(1)
Thanks, suspending ReSharper solves problem for me.Sausage

© 2022 - 2024 — McMap. All rights reserved.