【问题标题】:dotnet run not working after update to dotnet 6更新到 dotnet 6 后,dotnet run 无法正常工作
【发布时间】:2021-11-10 16:11:44
【问题描述】:

我昨天从 .Net 5 更新到 .Net 6,现在我的项目无法以 dotnet run 开始。然后我得到错误:

Building...
warn: Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer[5]
      The ASP.NET Core developer certificate is in an invalid state. To fix this issue, run the following commands 'dotnet dev-certs https --clean' and 'dotnet dev-certs https' to remove all existing ASP.NET Core development certificates and create a new untrusted developer certificate. On macOS or Windows, use 'dotnet dev-certs https --trust' to trust the new certificate.
fail: Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer[4]
      The ASP.NET Core developer certificate is in an invalid state. To fix this issue, run the following commands 'dotnet dev-certs https --clean' and 'dotnet dev-certs https' to remove all existing ASP.NET Core development certificates and create a new untrusted developer certificate. On macOS or Windows, use 'dotnet dev-certs https --trust' to trust the new certificate.

我已经尝试了删除/清理并再次创建的所有步骤,但这并没有帮助。服务器启动,但无法从浏览器连接。

我使用 Mac OS 11

有人有想法吗?

【问题讨论】:

    标签: c# .net asp.net-core asp.net-core-6.0


    【解决方案1】:

    在项目文件的<PropertyGroup> 元素下添加<UseAppHost>false</UseAppHost>。 要了解有关此(希望是)临时问题的更多信息,请查看here

    【讨论】:

      猜你喜欢
      • 2021-11-07
      • 2022-11-02
      • 1970-01-01
      • 2018-11-05
      • 2021-06-02
      • 2018-02-27
      • 2013-05-28
      • 2021-11-25
      • 2019-08-10
      相关资源
      最近更新 更多