This document describes how to release packages for the Teams SDK for .NET. It assumes you have required entitlements in Azure DevOps for triggering releases.
| Pipeline | File | Trigger | Signing | Destination | Approval |
|---|---|---|---|---|---|
| Teams.NET-PR | ci.yaml | PR to main/release/* |
No | Pipeline artifacts only | None |
| Teams.NET-ESRP | publish.yaml | Manual (Internal/Public) |
Public only | Internal feed or nuget.org | Public only |
| BotCore-CD | cd-core.yaml | PR/push to next/* (core/**) |
No | Internal feed (next/core branch) |
Auto |
Note: Public packages are available on nuget.org. Internal feed packages are for Microsoft internal use.
Versions are managed by Nerdbank.GitVersioning via version.json.
{
"version": "0.0.0-preview.{height}"
}All builds currently produce preview versions like 0.0.0-preview.N because the -preview.{height} suffix is baked into version.json.
| Build Height | Package Name |
|---|---|
| N | Microsoft.Teams.Apps.0.0.0-preview.N.nupkg |
| N+1 | Microsoft.Teams.Apps.0.0.0-preview.N+1.nupkg |
Note: Manually running a pipeline on a branch not in
publicReleaseRefSpec(e.g., a feature branch) produces versions with the commit hash appended, like0.0.0-preview.N-g1a2b3c4. This is useful for testing packages before a PR is approved/merged.
To produce a non-preview release (e.g., 2.0.7), you must work from the releases/v2 branch:
- Merge
mainintoreleases/v2:git checkout releases/v2 git merge main
- Edit
version.jsonto remove the preview suffix:{ "version": "2.0.7" } - Commit and push the version change to
releases/v2 - Run the Teams.NET-ESRP (
publish.yaml) pipeline manually from thereleases/v2branch with Public publish type - Approve the push to nuget.org
- After the release, bump the version for the next cycle:
{ "version": "2.0.8-preview.{height}" }
Preview releases can be published directly from the main branch since version.json on main includes the preview suffix.
The publicReleaseRefSpec in version.json controls metadata (e.g., whether a build is considered "public" for telemetry), but it does not affect the version number itself. The version string is determined entirely by the "version" field.
The teams-net-publish environment in Azure DevOps controls who can approve releases. To modify approvers:
- Go to Pipelines > Environments
- Select teams-net-publish
- Click Approvals and checks
- Add/remove approvers as needed
The Teams.NET-ESRP pipeline is triggered manually and requires selecting a Publish Type: Internal or Public. The version of the packages is determined by Nerdbank.GitVersioning from version.json, so the same pipeline can publish both preview and stable releases.
Branch Strategy:
- Preview releases: Publish from
mainbranch (version.json contains preview suffix) - Stable releases: Publish from
releases/v2branch (version.json has no suffix)
Pushes unsigned packages to the internal ADO TeamsSDKPreviews feed (useful for testing before public release).
- Go to Pipelines > Teams.NET-ESRP
- Click Run pipeline
- Select the branch to build from (
mainfor previews,releases/v2for stable) - Choose Internal as the Publish Type
- Pipeline runs: Build > Test > Pack > Push to internal feed
No approval is required. Packages are available immediately in the internal feed.
Signs packages (Authenticode + NuGet) and pushes to nuget.org. The package version (preview or stable) is determined by version.json on the selected branch.
- Go to Pipelines > Teams.NET-ESRP
- Click Run pipeline
- Select the branch to build from:
mainfor preview releasesreleases/v2for stable releases
- Choose Public as the Publish Type
- Pipeline runs: Build > Test > Sign > Pack
- PushToNuGet stage waits for approval
- Approver reviews in ADO and clicks Approve
- Packages are pushed to nuget.org
Once published, packages are available on the teams-sdk nuget.org profile.
For stable releases:
dotnet add package Microsoft.Teams.Apps --version 0.0.0For preview releases:
dotnet add package Microsoft.Teams.Apps --version 0.0.0-preview.NYou can search for available versions using:
# Stable only
dotnet package search Microsoft.Teams.Apps
# Include prereleases
dotnet package search Microsoft.Teams.Apps --prereleaseThe Teams.NET-PR pipeline runs automatically on PRs targeting main or release/* branches (excluding core/** paths). It does not publish packages.
- Open or update a PR targeting
mainorrelease/* - Pipeline runs: Build > Test > Pack
- Unsigned packages are produced as downloadable pipeline artifacts (for local testing)