.NET

Detected from a project or solution file. Published framework-dependent.

See Buildpacksfor how detection and version policy work.

Detects

A *.csproj, *.fsproj, or *.sln at the base directory, or global.json.

Versions

Default is .NET 10. Published lines as of September 2026: 8, 9, 10. You get the latest patch of the requested line. The build uses the SDK. The run image uses the matching ASP.NET Core runtime.

Pin, in this order:

  • sdk.version in global.json
  • The first TargetFramework / TargetFrameworks netN.0 in a root project file

Install and build

dotnet publish -c Release of one project. If the base directory has more than one .csproj / .fsproj, set env DOTNET_PROJECT to the file to publish. Zero project files at the root is the same: set DOTNET_PROJECT to the path.

Launch sets DOTNET_ROOT and DOTNET_CLI_TELEMETRY_OPTOUT=1.

Start command

ASPNETCORE_URLS=http://0.0.0.0:$PORT dotnet <app>.dll. Override with a Procfile. Listen on PORT.