Azure Service Fabric is a great choice for developing applications using Microservices Architecture. It provides a great framework for Service Discovery, Fault Tolerance and plenty of programming interfaces to make it easy for developers to develop microservices.

Here are the list of steps you need to take to set up your dev environment :

  • Install the latest version of Visual Studio. At the time of writing this article, VS2017 V15.2(26430.14) is the latest version.
  • Install Service Fabric SDK
  • Enable Powershell execution policy. Service Fabric uses Azure Powershell for creating local cluster and for deploying application to the clusters using Visual Studio.

Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Scope CurrentUser

Once you install the SDK, you’ll have all the necessary bits on your PC to start working on Service Fabric applications locally. All you need to do is start the local cluster. You’ll have two options. You can have it with one node or five nodes. If you’d like to change it later, you can always reset your local cluster and create with a different set of nodes.

You’ll see a little icon in your icon tray (Second row first column below).

1-d1OuLFJTObjUaiq5x8aK4Q

You can right-click on the icon and click on ‘Start Local Cluster’ and then ‘Setup Local Cluster’. You can set it up with either 1 Node or a 5 Node cluster. Like I mentioned above, you’ll also have an option to reset local cluster, if you ever feel the need to start-over and reconfigure the cluster to a different node setup.

1-OnavexyOdUpMvufNUlmKyA

Now, if you click on the cluster manager icon in the tray, it’ll bring up the fabulous service fabric explorer in the browser.

1-vBl8WtfFfiL7IcbIdtUbMQ

  • Set Visual Studio to always run in Administrator mode. Service Fabric requires you to have admin privileges to be able to deploy the application to the local cluster. If you don’t set VS to run automatically in admin mode, you’ll have to manually start it in admin mode. It’s better to have this set up right away. If not, you’ll have to close VS and restart it in admin mode. It gets annoying after a certain point.

Here are the steps to do it :

  • Right click on the VS short cut and click on ‘Properties’
  • Click on the Shortcut tab and then click ‘Advanced’
  • Check the ‘Run as Administrator’ box and then click OK
  • Click OK and follow the steps to close the window.

You're good to go!


Preetham Reddy, Cloud Solutions Architect at Tech Fabric
Tech Fabric specializes in building web, mobile and cloud based application using Microsoft Stack (C#, .NET Core, Xamarin, Azure, SQL Service etc.,). If you need help with taking your on-premise application to cloud or convert your monolithic applications to microservices based, we’d be glad to help you out.You can reach out to our sales team at [email protected]