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

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

Ubuntu 22.04 updates broke dot net core 7.0

问题

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

  1. tail /var/log/PHCAdmin.err.log:
  1. .NET位置:/usr/lib/dotnet/
  2. 未找到任何框架。
  3. 了解有关框架解析的信息:
  4. https://aka.ms/dotnet/app-launch-failed
  5. 要安装缺失的框架,请下载: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.

  1. tail /var/log/PHCAdmin.err.log:
  1. .NET location: /usr/lib/dotnet/
  2. No frameworks were found.
  3. Learn about framework resolution:
  4. https://aka.ms/dotnet/app-launch-failed
  5. 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

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

  1. > sudo apt remove 'dotnet*' 'aspnet*' 'netstandard*'
  2. >
  3. > sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
  4. >
  5. > 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:

确定