System.TypeLoadException: Could not load type ‘System.Fabric.Common.CabFileOperations’ from assembly System.Fabric

My azure local cluster was working fine until after I tried installing/adding Microsoft Azure Service Fabric SDK and Tools -2.3.301 (VS2015) through Web Platform Installer.

Whenever I try to debug my microservice solution which would deploy and start the cluster if it is not already running, it prompted the below error (in my VS powershell output and also recorded inside Event Viewer):
System.TypeLoadException: Could not load type ‘System.Fabric.Common.CabFileOperations’ from assembly ‘System.Fabric, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35’.
at System.Fabric.FabricDeployer.Utility.GetCurrentCodeVersion(String packageLocation)
at System.Fabric.FabricDeployer.ConfigureOperation.WriteTargetInformationFile(String clusterManifestLocation, String infrastructureManifestLocation, String fabricDataRoot, String machineName, String packageLocation, FabricPackageType fabricPackageType, String sourcePackageLocation)
at System.Fabric.FabricDeployer.ConfigureOperation.OnExecuteOperation(DeploymentParameters parameters, ClusterManifestType clusterManifest, Infrastructure infrastructure)
at System.Fabric.FabricDeployer.DeploymentOperation.ExecuteOperationPrivate(DeploymentParameters parameters)
at System.Fabric.FabricDeployer.DeploymentOperation.ExecuteOperation(DeploymentParameters parameters)
at System.Fabric.FabricDeployer.ConfigurationDeployer.NewNodeConfigurationInner(String clusterManifestPath, String infrastructureManifestPath, String jsonClusterConfigPath, String fabricDataRoot, String fabricLogRoot, String fabricHostCredentialUser, SecureString fabricHostCredentialPassword, Boolean runFabricHostServiceAsManual, Boolean removeExistingConfiguration, FabricPackageType fabricPackageType, String fabricPackageRoot, String machineName, String bootstrapPackagePath)

And searching high and low, someone faced the same error as me posted in under comments.

I try to look if there is ‘System.Fabric.Common.CabFileOperations’ exist but it didn’t seem to be listed in Microsoft site

Searching more information on the update that I did, lead me to

I manage to start my local cluster by uninstalling “Microsoft Azure Service Fabric” of version 5.3.301 and installing the version of
5.2.207 Runtime:

Hope it helps for those of you who faced the same issue.

Leave a Reply

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