Prepare your development environment on Windows
To build and run Azure Service Fabric applications on your Windows development machine, install the Service Fabric runtime, SDK, and tools. You also need to enable execution of the Windows PowerShell scripts included in the SDK.
Prerequisites
Ensure you're using a supported Windows version.
Download and install the runtime and SDK
Note
WebPI used previously for SDK/Tools installation was deprecated on July 1 2022
The runtime can be installed independently. However, the SDK requires the runtime, so for a development environment, you must install both the runtime and SDK. The following links are download for the latest versions of both the runtime and SDK:
Package | Version |
---|---|
Install Service Fabric Runtime for Windows | 10.1.2493.9590 |
Install Service Fabric SDK | 7.1.2493 |
You can find direct links to the installers for previous releases on Service Fabric Releases.
For supported versions, see Service Fabric versions.
Install the runtime
The runtime installer must be run from a command line shell, and you must use the /accepteula
flag. We recommend that you run your command line shell with elevated privileges to retain the log printouts. The following example is in PowerShell:
.\MicrosoftServiceFabric.<version>.exe /accepteula
Install the SDK
Once the runtime is installed, you can install the SDK successfully. You can run the installer from the command line shell or your file explorer.
Note
Single machine clusters (OneBox) are not supported for Application or Cluster upgrades; delete the OneBox cluster and recreate it if you need to perform a Cluster upgrade, or have any issues performing an Application upgrade.
To use Visual Studio 2017 or 2019
The Service Fabric Tools are part of the Azure Development workload in Visual Studio 2019 and 2017. Enable this workload as part of your Visual Studio installation. In addition, you need to install the Microsoft Azure Service Fabric SDK and runtime as described above Download and install the runtime and SDK.
Enable PowerShell script execution
Service Fabric uses Windows PowerShell scripts for creating a local development cluster and for deploying applications from Visual Studio. By default, Windows blocks these scripts from running. To enable them, you must modify your PowerShell execution policy. Open PowerShell as an administrator and enter the following command:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Scope CurrentUser
Install Docker (optional)
Service Fabric is a container orchestrator for deploying microservices across a cluster of machines. To run Windows container applications on your local development cluster, you must first install Docker for Windows. Get Docker CE for Windows (stable). After you install and start Docker, right-click on the tray icon and select Switch to Windows containers. This step is required to run Docker images based on Windows.
Next steps
Now that you finished setting up your development environment, start building and running apps.
- Learn how to create, deploy, and manage applications
- Learn about the programming models: Reliable Services and Reliable Actors
- Check out the Service Fabric code samples on GitHub
- Visualize your cluster by using Service Fabric Explorer
- Prepare a Linux development environment on Windows
- Learn about Service Fabric support options