Reputation: 13
i created client and calling my actor from the client , client is not able to communicate to the actor
even after using updated service fabric and runtime to latest getting error I'm using vs2022 and service fabric runtime 10.xx, and SDK 7.X
System.InvalidCastException: 'Unable to cast COM object of type 'System.__ComObject' to interface type 'IFabricServiceManagementClient8'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{27309DB9-61A7-AE11-967A-BBFF7D5A5460}' failed due to the following error: No
Upvotes: 1
Views: 932
Reputation: 1
I ran into this exact same error message and I found that it was because the NuGet packages I use in my project were targetting a newer version of ServiceFabric than the one installed on my local machine.
Now I'm not sure which NuGets you're using for your Projects but take a look at the image below.
At the top of you can see the Microsoft.ServiceFabric.Actors (7.1.1541) NuGet package I use in my project.
If you drill down to Microsoft.ServiceFabric.Services.Remoting -> Microsft.ServiceFabric.Services -> Microsft.ServiceFabric (10.1.1541) that's where the error was coming from.
On my local machine I have ServiceFabric 10.0.1949. However, the Microsoft.ServiceFabric nugets were targetting ServiceFabric 10.1.1541.
The fix was to rollback the Microsoft.ServiceFabric.XXXX nugets from 7.1.1541 to 7.0.1949. That way, the transitive 10.0.1949 nuget matched my local version of Service Fabric.
TL/DR: Rollback your project's Microsft.ServiceFabric.xxxx NuGet packages so that the transitive Microsft.ServiceFabric nuget package's version # matches your local Service Fabric version. For me, it was going from 7.1.1541 -> 7.0.1949.
Upvotes: -1