gpt4 book ai didi

.NET 核心运行时

转载 作者:行者123 更新时间:2023-12-02 23:46:41 25 4
gpt4 key购买 nike

如果我想创建 .NET Core 2.0 应用程序,例如控制台应用程序或 ASP.NET Core 2.0,我需要在我的开发计算机上安装哪些 .NET 运行时?我使用的是 Windows 10。

我创建了一个 .NET Core 2.0 控制台应用程序作为 WebJob 运行。为了将其压缩并将其上传到 Azure,我遵循了这篇文章:https://learn.microsoft.com/en-us/dotnet/core/deploying/deploy-with-cli#self-contained-deployment-with-third-party-dependencies

当我运行 dotnetpublish --self-contained -r win32-x64 -c Release 时,出现错误:

Microsoft.NETCore.App.targets(19,5): error : Project is targeting runtime 'win32-x64' but did not resolve any runtime-specific packages for the 'Microsoft.NETCore.App' package. This runtime may not be supported by .NET Core.

但是如果我运行 dotnetpublish --self-contained -r win10-x64 -c Release,它就可以正常工作。

只是想确保我正在以正确的方式为 Azure 准备我的应用程序。

此外,我希望将我的应用程序运行为 64 位,而不是 32 位。

最佳答案

win32-x64 不是有效的运行时标识符。请改用 win-x64 或参阅 .NET Core RID Catalog获取有效运行时标识符的列表。

关于.NET 核心运行时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48045776/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com