.NET Core app works locally but not on heroku

Viewed 18

I'm new to .NET and C# and from a youtube tutorial I created a simple Telegram bot that sends back what the user sends. Bot is a .NET 6 Console Application and working in my computer.

Then I uploaded my Program.cs and .csproj file to github and connected it to heroku app. Heroku build and deployment was successful but when i sent message to the bot it's not working and heroku logs is saying it crashed.

I'm new to github and heroku actually. My question is, do i need any file other than program.cs and .csproj file in github repo for my bot to work on heroku? Do I need a procfile? If so what do I write to the procfile?

1 Answers

Heroku does not natively support C#. You will need to place your project in a container for it to run. In this Microsoft link: Tutorial: Containerize a .NET app you will learn how to do this.

Related