I installed Service Fabric by using the Install the Service Fabric runtime, SDK, and tools for Visual Studio 2015 Update 2 link from Prepare your development environment.
Trying to publish a Service Fabric Application fails with:
2>Connect-ServiceFabricCluster : Argument 'Connect-ServiceFabricCluster' is not recognized as a cmdlet: Unable to load
2>DLL 'FabricCommon.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Same error described in Troubleshoot your local development cluster setup, but it does not matter what PowerShell version I use, 64 or 32.
The Service Fabric SDK version I got is
I am running Windows 10 10586 with Visual Studio 2015 Update 3.
FabricCommon.dll is located at
c:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code\FabricCommon.dll
What am I missing?
I will focus on this error first:
DLL 'FabricCommon.dll': The specified module could not be found
You can fix this by re-installing the service fabric SDK. This happens to me before during installation and I thought it was fixed but you never know.
Also make sure you are using the same version of the SDK and nuget package that you referenced in your Service Fabric application.
A workaround for this issue (which does not include reinstall of the Service Fabric SDK) is to add the following to your path environment variable and restart the application which is throwing error (Visual Studio or PowerShell so that it can access the new environment variable):
C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code
You do not need to restart your computer, just restart the application after you have update the path environment variable. The dll fabricCommon.dll lives in this folder.
This workaround is inspired by (but is not identical to) the solution to a somewhat related issue presented here: https://social.msdn.microsoft.com/Forums/azure/en-US/6c8cc261-6c84-4097-be03-e8073cbc9397/unable-to-load-dll-fabricruntimedll?forum=AzureServiceFabric&prof=required
I have experienced the same problem on my Win10 box, and even adding the relevant powershell module that contained necessary cmdlets didn't work. The solution that worked for me was: Control Panel -> "Programs and Features", uninstall Service Fabric SDK, then click "Turn Windows features on or off" link and uninstall PowerShell. Next, reboot Windows, back to Control Panel -> "Programs and Features" -> "Turn Windows features on or off", install PowerShell, after which download/install Service Fabric SDK. Again, restart the PC, start the Service Fabric Cluster Manager (if it doesn't auto-start), right-click its icon on the task-bar and try creating 1-node or 5-node cluster.
User contributions licensed under CC BY-SA 3.0