0

我昨天从 .Net 5 更新到 .Net 6,现在我的项目不能从 .Net 开始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

有人有想法吗?

4

1 回答 1

0

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

于 2021-11-16T10:18:44.647 回答