How to set up a Service Fabric development environment

, 2 minutes to read

Set­t­ing up a de­vel­op­ment ma­chine for Azure Ser­vice Fab­ric ap­pli­ca­tions al­lows de­vel­op­ers to test and de­bug mi­croser­vices lo­cally. Lo­cal clus­ter use the same run­time that will run in Azure.

Operating System

If you don’t have a li­cense of Win­dows 10, you can in­stall a free Win­dows 10 In­sider Pre­view.

Down­load Win­dows 10 In­sider Pre­view


There is a Com­mu­nity edi­tion of Vi­sual Stu­dio which is free and ideal for start­ing with Win­dows de­vel­op­ment. You can use it along­side with Vi­sual Stu­dio Team Ser­vices which of­fers source con­trol and work items man­age­ment.

Down­load Vi­sual Stu­dio Com­mu­nity edi­tion

Get started with Vi­sual Stu­dio Team Ser­vices

SDK & Tools

Ser­vice Fab­ric Lo­cal Clus­ter is use­ful for de­vel­op­ment. Ser­vice Fab­ric Tools are part of the Azure De­vel­op­ment and Man­age­ment work­load in Vi­sual Stu­dio 2017. Tools for Vi­sual Stu­dio 2015 needs to be in­stalled sep­arately.

In­stall the SDK for Vi­sual Stu­dio 2017

In­stall the SDK and tools for Vi­sual Stu­dio 2015

Ser­vice Fab­ric uses Pow­er­Shell scripts for cre­at­ing a lo­cal de­vel­op­ment clus­ter and for de­ploy­ing ap­pli­ca­tions from Vi­sual Stu­dio. Win­dows blocks these scripts from run­n­ing. To en­able them, open Pow­er­Shell as an ad­min­is­tra­tor and en­ter the fol­low­ing com­mand:

Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Scope CurrentUser

Local cluster

To set up a lo­cal clus­ter, sim­ple ex­e­cute this com­mand in Pow­er­Shell as an ad­min­is­tra­tor:

& "$ENV:ProgramFiles\Microsoft SDKs\Service Fabric\ClusterSetup\DevClusterSetup.ps1"