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

前端 未结 4 1972
太阳男子
太阳男子 2020-12-11 21:54

I tried to publish my ASP.NET Core application on Windows Server 2008 R2 but I get this error: \"An error occurred while starting the application.\"

Without any more

4条回答
  •  清歌不尽
    2020-12-11 22:12

    Althouth there many things that could go wrong and the proper way is to actually troubleshoot the error, my case was simpler:

    I forgot to configure the release output path for Swagger

    You can to that by following these steps:

    1. Right click your project
    2. Click Properties
    3. Click on the Build tab
    4. And at the Output section check the XML documentation file checkbox.

    This will autocomplete the path with an XML file, but you can change that to whatever you want.

    I copy-paste the solution from https://mycodepad.wordpress.com/2018/08/23/publishing-asp-net-core-an-error-occurred-while-starting-the-application/

提交回复
热议问题