Shared NuGet libraries developed by Team Turkos at Umeå kommun. The packages are open source but primarily built for Team Turkos' own services. This repository produces three packages:
| Package | NuGet ID | Description |
|---|---|---|
| Toolkit | Umea.se.Toolkit |
Shared runtime building blocks for ASP.NET Core APIs and Azure Functions. |
| TestToolkit | Umea.se.TestToolkit |
Integration-test harness with pre-wired mocks and test base classes. |
| Templates | Umea.se.Templates |
dotnet new project templates for scaffolding new services. |
All packages target .NET 10 and are published to an Azure Artifacts feed (turkos.umea.se) and, for stable releases, to NuGet.org.
The repository uses Azure DevOps Pipelines with three pipeline definitions:
- Trigger: PR build validation on
main - Purpose: Builds and tests changed packages to gate merges
- Detects which packages changed and only builds those
- Toolkit and TestToolkit are one unit: a change to either folder builds both
- Toolkit and TestToolkit: runs restore, build, and tests
- Templates: runs the validation script that tests all parameter combinations
- Trigger: Merged pull request to
main - Stages: Validate → Get PR info → Run publish pipeline → Finalize (tag commit, tag build, update work items)
- Prevents manual runs from
main— releases happen only via merged pull requests
- Trigger: Called by the release orchestrator, or manually for pre-releases
- Stages: Validate → Check changes → Pack → Publish (per package)
- Toolkit and TestToolkit always release together with the same version, computed once in a shared stage. TestToolkit references Toolkit as a project, so
Umea.se.TestToolkit Xdepends onUmea.se.Toolkit >= X, and TestToolkit is only published after Toolkit is on the feed - Generates a date-based version, runs tests, packs
.nupkg, and pushes to:- Azure Artifacts (
turkos.umea.se) — all releases - NuGet.org — stable releases only
- Azure Artifacts (
Package versions follow a date-based scheme:
| Release Type | Format | Example |
|---|---|---|
| Stable | YYYY.M.D.<commit-count> |
2026.3.9.147 |
| Pre-release | YYYY.M.D.<baseline-count>-dev.<branch-hash>.<delta> |
2026.3.9.147-dev.a1b2c3d4.3 |
- The date component uses Stockholm local time
- The commit count is scoped to the package path for independent versioning. Toolkit and TestToolkit share one count over both folders (
src/ume-nuget-*toolkit), Templates has its own baseline-countis themaincommit count at the branch's last sync point, indicating which stable release the pre-release builds ondeltais the number of commits on the branch ahead ofmainbranch-hashis a truncated SHA-256 of the branch name for uniqueness- Version tags are written as
<package>/<version>(e.g.,toolkit/2026.3.9.147)
The Umea.se.Templates package provides dotnet new templates for scaffolding new services following Team Turkos conventions.
Install the latest stable version:
dotnet new install Umea.se.TemplatesInstall the latest pre-release version:
dotnet new install Umea.se.Templates::*-*Install a specific version:
dotnet new install Umea.se.Templates::2026.5.15.42Update to latest (if already installed):
dotnet new updateAn ASP.NET Core API service with Umea.se.Toolkit integration and xUnit tests. Supports full layered architecture or minimal setup, cloud or on-premises deployment, and optional EF Core database integration.
dotnet new ume-template-api -n MyNewService -o ume-app-mynewserviceAll occurrences of TemplateService in file/folder names, namespaces, and content are replaced with the name you provide.
Options:
| Option | Values | Default | Description |
|---|---|---|---|
--size |
Default, Small |
Default |
Default — Full layered architecture (API, Logic, ServiceAccess, Shared, Tests). Small — Minimal setup with API and Tests only. |
--api-type |
Cloud, OnPrem |
Cloud |
Cloud — Azure cloud with Key Vault, Application Insights, and per-environment config files. OnPrem — On-premises without Azure cloud dependencies. |
--database-name |
any string | (empty) | When set, includes a Database project with EF Core and SQL Server. The value is used for the connection string name and file naming. |
Examples:
# Full cloud API (default)
dotnet new ume-template-api -n OrderService
# Minimal on-premises API
dotnet new ume-template-api -n StatusService --size Small --api-type OnPrem
# Full cloud API with a database
dotnet new ume-template-api -n CustomerService --database-name CustomerDatabasePipeline Snippets:
Cloud templates include a .pipeline-snippets/ folder with ready-to-copy Azure DevOps pipeline stages.
All auto-generated names (stage names, project references) use the service name you provided. Values that can't be auto-generated (resource group, app service name, etc.) are marked with TODO comments. The snippets are excluded from OnPrem templates.
The template source files under src/ume-nuget-templates/templates/ contain dotnet template engine conditionals (#if, #endif) and are not meant to build directly. They are processed by the template engine during dotnet new.
To validate template changes locally, use the validation script which packs the package, installs it, instantiates all parameter combinations, and verifies each one builds and passes tests:
pwsh src/ume-nuget-templates/templates/ume-template-api/validate-package.ps1To manually test a single combination:
# Pack and install locally
dotnet pack src/ume-nuget-templates --configuration Release --output ./artifacts
dotnet new install ./artifacts/Umea.se.Templates.*.nupkg
# Generate and build
dotnet new ume-template-api -n TestService --size Default --api-type Cloud
cd TestService
dotnet build
dotnet testUninstall when done:
dotnet new uninstall Umea.se.TemplatesThis project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for full terms.