George Kosmidis

Microsoft MVP | Speaks of Azure, AI & .NET | Founder of Munich .NET
Building tomorrow @
slalom
slalom

Publishing ASP.NET Core: An error occurred while starting the application

by George Kosmidis / Published 6 years and 6 months ago, modified 4 years and 4 months ago
Publishing ASP.NET Core: An error occurred while starting the application

Have you seen this error?
An error occurred while starting the application. .NET Core <version> | Microsoft.AspNetCore.Hosting <version> | Microsoft Windows <version> | Need help?


There is a newer version of this blog post!
Visit /an-error-occurred-while-starting-the-application-process-failure-and-many-more/

It looks like this in your browser:

An error occurred while starting the application.
An error occurred while starting the application.

Besides that one hint, that the error is while starting, it’s not very descriptive, right?

Althouth there many things that could go wrong and the proper way is to actually troubleshoot the error, I end up googling about this for over an hour! In my search I found numerous articles but it turned out that for me the solution was simple!

I forgot to configure the release output path for swagger :/

Probably you already know how to do this, but in case you don’t remember…:
Right click your project, then click Properties, then click theBuild tab and at the Output section check the XML documentation file:

An error occurred while starting the application - Configuration
An error occurred while starting the application - Configuration

And if configuring swagger wasn’t the solution, you can either check one of the links below, or just troubleshoot your app.

There is a newer version of this blog post!
Visit /an-error-occurred-while-starting-the-application-process-failure-and-many-more/
This page is open source. Noticed a typo? Or something unclear?
Edit Page Create Issue Discuss
Microsoft MVP - George Kosmidis
Azure Architecture Icons - SVGs, PNGs and draw.io libraries