Ubuntu 22.04 更新破坏了 .NET Core 7.0。

huangapple go评论207阅读模式
英文:

Ubuntu 22.04 updates broke dot net core 7.0

问题

On 3 running Ubuntu servers... I did updates and now Supervisor crashes.

tail /var/log/PHCAdmin.err.log:
.NET位置:/usr/lib/dotnet/

未找到任何框架。

了解有关框架解析的信息:
https://aka.ms/dotnet/app-launch-failed

要安装缺失的框架,请下载:https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=7.0.0&arch=x64&rid=ubuntu.22.04-x64
英文:

On 3 running Ubuntu servers... I did updates and now Supervisor crashes.

tail /var/log/PHCAdmin.err.log:
.NET location: /usr/lib/dotnet/

No frameworks were found.

Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=7.0.0&arch=x64&rid=ubuntu.22.04-x64

答案1

得分: 1

执行以下步骤(干净重新安装):

> sudo apt remove 'dotnet*' 'aspnet*' 'netstandard*'
> 
> sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
> 
> sudo apt install dotnet-sdk-7.0

下次请提供更多关于您问题的信息 Ubuntu 22.04 更新破坏了 .NET Core 7.0。

英文:

Perform the following steps (clean reinstall):

> sudo apt remove 'dotnet*' 'aspnet*' 'netstandard*'
>
> sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
>
> sudo apt install dotnet-sdk-7.0

Next time please provide further information on your question Ubuntu 22.04 更新破坏了 .NET Core 7.0。

答案2

得分: 0

对不起,我即将做的正是我讨厌的事情——不回答问题,而是提供一种解决方法。我需要迅速启动这3台服务器,所以我只是将我的应用程序重新发布为“Self-contained”而不是Publish窗口的“目标框架”选项中的“Framework Dependent”。

我认为实际问题是我在更新后安装了.NET 7.0.5,但我的应用程序目标为7.0.0。

希望这对可能遇到相同问题的人有所帮助。

英文:

So I hate when people don't answer the problem but post a workaround... Sorry, I'm about to do just that. I needed to get the 3 servers up and running quickly so I just republished my app as "Self-contained" instead of "Framework Dependent" in the Publish window's "Target Framework" option.
I think the actual issue is that I have .net 7.0.5 installed after the updates but my application is targeting 7.0.0

Hope this helps someone who may be having the same issue.

huangapple
  • 本文由 发表于 2023年6月8日 04:15:42
  • 转载请务必保留本文链接:https://go.coder-hub.com/76426825.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定