Eternet.ServiceFabric.WebApi.Template
1.0.3
Prefix Reserved
dotnet new install Eternet.ServiceFabric.WebApi.Template@1.0.3
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 APIsrc/MyService.Contracts/— Shared contractstests/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 10target framework with Central Package Managementxunit.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
/healthand/aliveendpoints for cloud deploy validation - Service Fabric application with
Local.1Nodeprofiles andStartupServices.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.configrestore for the Service Fabric SDK/MSBuild package dotnet publishdriven packaging- Service Fabric image store copy/register/upgrade flow
- Version collision handling
- Post-deploy
/healthand/alivevalidation - 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.