【问题标题】:.NET Core Runtime.NET Core 运行时
【发布时间】:2018-11-28 13:54:20
【问题描述】:

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

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

当我运行 dotnet publish --self-contained -r win32-x64 -c Release 时,我收到一条错误消息:

Microsoft.NETCore.App.targets(19,5):错误:项目正在定位 运行时“win32-x64”,但没有解析任何运行时特定的包 对于“Microsoft.NETCore.App”包。此运行时可能不是 .NET Core 支持。

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

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

我还想以 64 位而不是 32 位运行我的应用程序。

【问题讨论】:

标签: .net azure .net-core .net-core-2.0 runtime-identifier


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-01-01
    • 2019-02-16
    • 2020-07-02
    • 1970-01-01
    • 1970-01-01
    • 2017-08-16
    相关资源
    最近更新 更多