Eternet.ServiceFabric.WebApi.Template 1.0.3

Prefix Reserved
dotnet new install Eternet.ServiceFabric.WebApi.Template@1.0.3
                    
This package contains a .NET Template Package you can call from the shell/command line.

Eternet.ServiceFabric.WebApi.Template

Template for creating ASP.NET Core Web API services on Azure Service Fabric with Eternet architecture defaults.

Installation

dotnet new install Eternet.ServiceFabric.WebApi.Template

Usage

dotnet new eternet-sf-webapi -n MyService

This generates a solution in MyService/ containing:

  • src/MyService/ — Service Fabric application (sfproj)
  • src/MyService.Api/ — ASP.NET Core Web API
  • src/MyService.Contracts/ — Shared contracts
  • tests/MyService.Api.Tests/ — xUnit v3 tests
  • .github/workflows/test.yml — PR validation workflow (self-hosted)
  • .github/workflows/deploy.yml — Manual SF deployment workflow (self-hosted)
  • scripts/deploy_service_fabric.ps1 — Reusable deploy script

What is included

  • .NET 10 target framework with Central Package Management
  • xunit.v3 + Microsoft Testing Platform v2 test baseline
  • Self-hosted GitHub Actions workflows
  • Hardened Service Fabric deploy script with versioning, health checks, and rollback
  • Automatic restore of legacy Service Fabric MSBuild tooling from packages.config
  • Explicit /health and /alive endpoints for cloud deploy validation
  • Service Fabric application with Local.1Node profiles and StartupServices.xml

Validation

dotnet restore .\src\MyService.Api.sln
dotnet build .\src\MyService.Api\MyService.Api.csproj --no-restore
dotnet test --project .\tests\MyService.Api.Tests\MyService.Api.Tests.csproj --no-restore
nuget.exe restore .\src\MyService.Api.sln
dotnet publish .\src\MyService\MyService.sfproj -c Release --no-restore

Service Fabric package build

dotnet restore .\src\MyService.Api.sln
nuget.exe restore .\src\MyService.Api.sln
dotnet publish .\src\MyService\MyService.sfproj -c Release --no-restore

Deployment

The generated scripts/deploy_service_fabric.ps1 handles the full deployment lifecycle:

  • Legacy packages.config restore for the Service Fabric SDK/MSBuild package
  • dotnet publish driven packaging
  • Service Fabric image store copy/register/upgrade flow
  • Version collision handling
  • Post-deploy /health and /alive validation
  • Optional rollback on health failure

The deploy script defaults to the sibling StartupServices.xml when present, so the first application creation also provisions the stateless service instance. If nuget.exe is not available on PATH, the script downloads a local copy under .tools/ before restoring the Service Fabric build package.

  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.3 135 8/5/2026
1.0.2 131 4/9/2026
1.0.0 255 5/27/2025