This is the official Heroku buildpack for .NET and ASP.NET Core applications.
See the Getting Started on Heroku with .NET tutorial.
A solution file (e.g. MySolution.sln or MySolution.slnx) or .NET project file (e.g. *.csproj, *.vbproj or *.fsproj) must be present in the root (top-level) directory of your app's source code. If the root directory contains both solution and project files, the solution file will be preferred for the build and publish process.
The buildpack support C#, Visual Basic and F# projects using the .NET and ASP.NET Core frameworks (version 8.0 and up).
It's suggested that you use the latest version of the release buildpack. You can set it using the heroku-cli.
heroku buildpacks:set heroku/dotnetYour builds will always used the latest published release of the buildpack.
If you need to use the git url, you can use the latest tag to make sure you always have the latest release. The main branch will always have the latest buildpack updates, but it does not correspond with a numbered release.
heroku buildpacks:set https://github.com/heroku/heroku-buildpack-dotnet#latest -a my-appEven though it's suggested to use the latest release, you may want to lock dependencies - including buildpacks - to a specific version.
First, find the version you want from
the list of buildpack versions.
Then, specify that version with buildpacks:set:
heroku buildpacks:set https://github.com/heroku/heroku-buildpack-dotnet#v1 -a my-app
For more information about using the .NET buildpack on Heroku, see these Dev Center articles:
