
Deploy, Manage, and Scale .NET Applications
The Smart Choice for Modern .NET Applications
Built for .NET
Seamlessly deploy projects of all sizes, from simple to complex multi-process solutions with minimal configuration. Stay ahead of the curve with same-day support for the latest .NET SDK releases, ensuring your apps are secure.
Deliver more with add-ons
Extend and grow your .NET apps with Heroku’s ecosystem of add-ons. Use databases like MSSQL Server, Postgres, Redis, and APM tools like New Relic. Heroku’s expansive ecosystem of add-ons supports the growth and scalability of your .NET applications.
Stay in the Flow
Heroku Flow provides a smooth path to production with Heroku CI (using your preferred .NET testing framework), GitHub-integrated Review Apps for each PR, and release-phase task automation (like Entity Framework migrations) before production. Our comprehensive support for .NET lets you ship fast and with confidence.
Get started now with .NET on Heroku
Deploying .NET apps with Heroku
dotnet new web
initializes the .NET web project- Initialize the local Git repository
- Update
Program.cs
to respond to requests with “Hello Heroku!” - Create and deploy the app to Heroku
- We’re live!
curl https://arcane-gorge-62773-74994da6bfe0.herokuapp.com
Heroku gives you simple, easy ways to…
Deploy
Heroku analyzes your code, handling dependencies, compilation, and optimizations which ensures the application is ready to run in a dyno—a lightweight, isolated Linux container. This makes it easier for developers to focus on writing code, rather than deployment and environment configuration.
Manage
Manage your .NET applications through the Heroku Dashboard or CLI. Built-in monitoring gives you insights into memory, CPU usage, and request throughput, helping you optimize performance effortlessly. Avoid the hidden costs and distractions of managing servers or IaaS plumbing by letting Heroku manage it for you.
Scale
Easily scale app resources with a single click or command as your app gains traction. Heroku’s auto-scaling feature enables your apps to scale at the pace of your business, supporting apps of all sizes, from small-scale projects to high-traffic production services, handling over 65 billion requests per day.
.NET on Heroku
“.NET elegantly emphasizes simplicity, maintainability, and performance – qualities that naturally align with Heroku’s mission to help developers focus on building great apps without unnecessary complexity.“

Popular Add-ons
Add-ons are fully-managed services, integrated for use with Heroku, which provide services for logging, caching, monitoring, persistence and more.
View All Add-ons

MSSQL Server
Data Stores
Heroku Postgres
Data StoresHeroku Key-Value Store
Data Stores
New Relic APM
MonitoringHeroku .NET Support FAQ
How does Heroku manage .NET dependencies?
Heroku manages .NET dependencies using the standard NuGet package manager. When you deploy your application, the official .NET buildpack automatically detects your solution (.sln
) and project (.csproj
, .vbproj
, or .fsproj
) files. It then runs the dotnet publish
command, which automatically restores all NuGet dependencies and then compiles your code, ensuring everything is correctly installed before the application is packaged for deployment.
What is the fastest way to deploy a sample .NET application to Heroku?
The fastest way to get started is by following the official Getting Started on Heroku with .NET guide in the Heroku Dev Center. This tutorial provides a sample application and walks you through cloning the repository, provisioning a Heroku app, and deploying your code with a simple git push heroku main
command.
Which .NET versions are supported on Heroku?
Heroku’s .NET support follows the official .NET support policy and provides support for the latest Long-Term Support (LTS) and Standard-Term Support (STS) versions of .NET. Heroku stays current with the official .NET release cycle, ensuring you can always build with modern and secure runtimes.
What are the most popular .NET frameworks to deploy on Heroku?
Heroku’s platform is ideal for modern, cross-platform .NET development. It fully supports popular frameworks like ASP.NET Core for building robust web APIs and MVC applications, and Blazor for creating interactive web UIs. For developers in the F# ecosystem, frameworks like Giraffe are also excellent choices for deployment on Heroku.
Does Heroku support C#, F#, and Visual Basic for .NET development?
Yes, all three languages are supported on Heroku as part of our first-class support for the modern, cross-platform .NET ecosystem. While C# is the most common language we see, F# is an excellent choice for functional programming (especially with frameworks like Giraffe and Saturn), and Visual Basic is also fully supported.
Can I deploy an older, Windows-only .NET Framework application to Heroku?
No, applications built with the older, Windows-only .NET Framework cannot be deployed to Heroku. This is because Heroku’s platform runs on a Linux-based infrastructure, while the legacy .NET Framework is dependent on the Windows operating system.
Heroku’s .NET support is designed to seamlessly integrate modern, cross-platform .NET (versions 8.0 and higher) applications with everything Heroku has to offer. Applications and APIs built with frameworks like ASP.NET Core are fully supported because they are designed to run anywhere, including Linux and Heroku.
How should I manage secrets and app settings in a .NET application on Heroku?
The best practice for managing secrets, API keys, and other environment-specific settings is to use Heroku config vars. Config vars are environment variables that are securely stored with your application and are exposed to your code at runtime.
Modern .NET applications integrate seamlessly with this system; the standard IConfiguration
interface that reads your local appsettings.json
file will also read Heroku’s config vars in production. This allows you to keep sensitive credentials out of your source code, which is a critical security best practice.
Can I deploy .NET console apps and Worker Services, not just web applications?
Yes, Heroku fully supports deploying .NET console apps and Worker Services, not just web applications. Heroku’s build system automatically detects and configures all executable project types in your solution, providing smart defaults to get you running quickly. This streamlined process allows you to deploy diverse .NET applications with ease. For more advanced control, you can use a Procfile to specify custom processes. This flexibility, combined with features like instant scaling and automated testing, helps you focus on your code and innovate faster. Heroku makes it simple to deploy, manage, and scale your .NET apps.
Do I need to compile my .NET application before pushing it to Heroku?
No. Heroku’s platform simplifies the deployment process by handling compilation for you. You should push your .NET source code directly to Heroku, and the buildpack will automatically run the dotnet publish
command during deployment to compile your code and create a runnable application. This source-based workflow ensures a consistent build environment and allows you to keep your Git repository clean by not committing compiled artifacts like DLLs.
Ready to Get Started?
Stay focused on building great data-driven applications and let Heroku tackle the rest.