Connect-ServiceFabricCluster : Argument 'Connect-ServiceFabricCluster' is not recognized as a cmdlet: Unable to load DLL 'FabricCommon.dll' - azure-service-fabric

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 2.1.163.
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

All I had to do is restart Visual Studio and it worked. This happens time to time.

Please Run Windows PowerShell as Administrator and then try.

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.

I was facing same issue on vs2017 and window server 2016. I reinstalled service fabric sdk and issue fixed.

I had similar issue after creating a cluster on windows server 2016.
In my scenario all I had to do was log out/in again and issue was fixed.
You could try restarting VM too - only if it still fails would I try re-installing the SDK.

Related

Server Manager not available/accessible after removing .Net feature in widows server 2019

I have removed .Net Framework feature from "Server Manager -> Remove Roles and features Wizard".
(This image is from a different server)
Later I noticed that this activity has affected many windows features (Server manager, IIS Manager, Turn on off windows features etc..).
After removed .Net Framework feature I was not able to find the Server Manager application.
I tried answer in this link and able to restore ServerManager.exe but once I try to load the server manager it's giving below error,
I may be able to resolve this if I can re enable .Net frame work feature. But not sure how to do that without using server manager(since I cannot open sever manager).
Appreciate any solutions or suggestions regarding this.
Finally able to re enable .Net feature and access server manager by following below steps,
Open command prompt
Run the command: dism /online /enable-feature /featurename:NetFx4ServerFeatures /ALL and press return.
Type PowerShell and press enter.
Run the command: Install-WindowsFeature PowerShellRoot,PowerShell,PowerShell-ISE.
Restart the server.
Credit belongs to this blogger:
https://glennopedia.com/2020/02/14/why-you-shouldnt-remove-net-in-windows-server/
This kind of errors are caused due to lack of .NET framework on your machine or if you installed old version of framework. You need to install an appropriate .NET Framework on your computer.
Updating .NET framework on your computer will solve your problem maximum.
Install it from the Microsoft website.
Run as Administrator , the server manager will open.
Now you can try to add.

Service Fabric SDK installation

I am facing a problem while installing MS Service Fabric SDK 2.7.198 using Web Installer 5.0 for Visual Studio 2017 v15.2, previously I had installed other versions of SF on different or on same system and it was installed without any problem. But this time I am unable to install it and installation is failed and message says Service Fabric Runtime version 5.7.198.9494 need to be install. I have installed it using Visual Studio installer. Please suggest where I am doing wrong.
Uninstall and re install the visual studio with azure service fabric tools resolved the problem.
I have install only runtime this way. Hope this will help you to install runtime only.

Setup a cluster on a remote machine without visual studio installed

I have a dedicated machine with Windows Server 2012.
When I debug service fabric in local environment, I only need to click Run in Visual Studio and the cluster creation and all the setups a performed automatically. I don't have to call any scripts or configure the cluster.
Is there a way to have such easy creation of a cluster on a remote machine without any manual config editing and without VS installed on the remote machine?
I have read how to install a cluster on-premises, but I don't want to configure anything. Guess if Visual Studio can figure out the right configuration, there could be a way to simplify the process for a developer.
Assuming that you're looking to set up a one-box configuration on the remote machine, you can do that as follows:
On the remote machine, set up a dev environment using the runtime and SDK only (no VS tools).
In an Admin PowerShell, run c:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup\DevClusterSetup.ps1.
This will set up a local cluster using the same configuration used by Visual Studio. In fact, all Visual Studio does is trigger this setup script.
Figured out that there are predefined templates for cluster's manifest. They are located inside Service Fabric SDK, \Microsoft SDKs\Service Fabric\ClusterSetup\NonSecure. Visual Studio use them to create a new cluster for development.
Not sure if we are able to obtain these configs without VS installed, but at least we can copy them from another development machine.

Upgrade ClickOnce Application using Windows Installer. Is this possible?

Few machines have 'MyApp.exe' installed using ClickOnce. And I have created a new MSI Windows Installer for 'MyApp.exe' using MS Visual Studio 2013 Setup and Deployment. I have a requirement that when my new MSI Installer runs it has to automatically remove/uninstall all previous 'MyApp.exe' (installed using ClickOnce) and install the new exe. Installer has to do it as part of its installation process.
Is this even possible? ClickOnce doesn't make any registry entries, so how can I get the Upgrade codes/Product codes which I can feed to Windows Installed 'Upgrade Paths' to upgrade it. ClickOnce is per user installation, but Windows Installer is not.
Is it even possible for Windows Installer to uninstall ClickOnce installed application ?
Any help is greatly appreciated. Thanks
ClickOnce is a per-user deployment experience and MSI is usually a per-machine experience. Per machine can't clean up other people's profiles. The only way I know is to do an active setup trick to run a program for each user who logs on and then execute a script to do cleanup. Either that or put first-run code in the applicaton itself to do the same.

Error - Eclipse client trying to reconnect to TFS - "LocationWebService"

When eclipse tries to reconnect to TFS (username.visualstudio.com) the 'authentication window' is replaced by a window that seems to describe available services and the authentication process stops here.
The content of this window is as follows:
LocationWebService
The following operations are supported. For a formal definition, please review the Service Description.
ConfigureAccessMapping
Connect
QueryServices
RemoveAccessMapping
RemoveServiceDefinitions
SaveServiceDefinitions
SetDefaultAccessMapping
With VS2010 I can still connect to TFS without problems.
Also, both with eclipse and VS2010 I can connect to codeplex (tfs).
Clearing cookies and/or cache from IE or Chrome doesn't help.
Everything is fresh installed, so I assume it's up to date.
How can I resolve this issue with Eclipse - TFS - username.visualstudio.com?
I had to reinstall the 2013 version (https://www.microsoft.com/en-us/download/details.aspx?id=40785) and everything started working. It's either a bug in an older version or mismatch with the server version being connected to.
I have this issue too. It only happens when I try to connect myuser.visualstudio.com, with my domain TFS it can authenticate without any problem.
I see that you are running Windows 7, in my case the eclipse TFS stop working with Windows 8.