Docs menu

Runtime versions

Which .NET SDK versions Primcloud supports, how to pin a specific one via TargetFramework or global.json, and how to upgrade.

On this page

Primcloud installs the .NET SDK your project asks for, from global.json or the TargetFramework in your project files.

Supported versions#

The .NET versions you can install are part of the Primcloud Runtime, which supports .NET 8 and newer, following Microsoft's .NET support policy. Each deployment's build log shows the exact SDK it installed.

Version Target framework Support
.NET 8 net8.0 LTS
.NET 9 net9.0 STS
.NET 10 net10.0 LTS

Pinning a version#

The first of these that applies decides:

1. global.json: the most explicit. Drop a global.json at the root of your repo:

global.json
{
  "sdk": {
    "version": "8.0.423",
    "rollForward": "latestFeature"
  }
}

rollForward controls how strictly version is matched. Common values:

  • disable: exactly version; the build fails if it isn't available.
  • latestPatch: take the latest patch within the same major/minor/feature band.
  • latestFeature: take the latest feature band within the same major/minor.
  • latestMajor: install the latest major, ignoring version.

See Microsoft's global.json reference for the full policy set.

2. TargetFramework in your project files, used when there's no global.json. Primcloud installs the newest SDK for that framework:

MyApp.csproj
<PropertyGroup>
  <TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

If projects in a solution target different frameworks, the SDK for the highest one is installed.

3. Neither: you get the newest SDK of the newest supported version.

Upgrading#

Change the version, commit, and push:

  • global.json: edit version (and adjust rollForward if you want to lock more or less strictly), commit, push.
  • TargetFramework: edit the <TargetFramework> value in each project file (net8.0 → net10.0, say), commit, push.

The first build on a new version takes a little longer while it's downloaded.

Review Microsoft's .NET breaking changes before jumping majors. The build won't stop you deploying code that breaks on the new version.

End-of-life versions#

When a .NET version reaches end-of-life on Microsoft's schedule, it's eventually removed from the Primcloud Runtime. Until then, builds on it keep working. Once it's removed, builds that pin it in global.json fail with "version not found", and builds that only set TargetFramework move to the next supported version, which may or may not compile. Upgrade before the end-of-life date to avoid an upgrade under pressure.