Heroku .NET Support Reference
Last updated December 03, 2024
Table of Contents
Heroku supports .NET applications, including C#, Visual Basic, and F# projects using the .NET and ASP.NET Core frameworks version 8.0 and later. This document contains version support info.
To learn more about how Heroku recognizes and builds .NET applications, see .NET Behavior in Heroku.
To learn how to deploy a sample .NET app, check out the Getting Started with .NET on Heroku (Classic) or Getting Started with .NET on Heroku (Fir) tutorials.
.NET Versions
Heroku supports official .NET SDK releases. The published build artifact also includes the .NET and ASP.NET Core runtimes in the SDK release used to build an application.
Supported .NET Versions
The .NET buildpack supports C#, Visual Basic, and F# projects using the .NET and ASP.NET Core frameworks (version 8.0 and higher).
You can find a complete list of supported .NET SDK versions and platforms in the SDK inventory file.
Default .NET SDK Version Configuration
By default, the .NET buildpack installs the latest available and compatible .NET SDK version based on the TargetFramework
property in each project file. The buildpack supports Target Framework Moniker (TFM) values in the format net{major_version}.0
, for example, net6.0
, net7.0
, net8.0
.
If a solution references projects targeting different framework versions, the buildpack prioritizes the most recent version when determining which SDK to install.
Advanced .NET SDK Version Configuration
To specify a different .NET SDK version, add a global.json
file to the root directory. The buildpack supports configuring both the version
and rollForward
policy to control SDK installation. For example:
{
"sdk": {
"version": "8.0.106",
"rollForward": "disable"
}
}
Use the rollForward: disable
option only when necessary, and regularly update the version
to maintain security.
For general usage, we recommend setting rollForward
to latestFeature
.
.NET Version Policy
Heroku’s .NET support follows the official .NET support policy. We recommend using the latest patch release of a supported .NET version and upgrading before any version reaches end of support.
Behavior
See .NET Behavior in Heroku to learn more about how Heroku handles .NET applications.
Customer Support
You can submit issues via one of the Heroku Support channels.