【问题标题】:How to build .NET SDK from source如何从源代码构建 .NET SDK
【发布时间】:2020-12-12 12:35:52
【问题描述】:

如何从源代码编译 .NET SDK? 当我运行 build.sh 时,我收到一条正在下载包的消息(我不明白为什么,因为目标是编译)。 下载时出现 404 错误,然后:

    dotnet_install: Error: Could not find/download: `.NET Core Runtime` with version = 1.0.5
dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support

【问题讨论】:

标签: .net sdk


【解决方案1】:

当我运行 build.sh 时,我收到一条正在下载包的消息(我不明白为什么,因为目标是编译)

这很正常。您正在尝试编译 SDK,它本身是用 C# 编写的。您需要一个 C# 编译器(例如 .NET SDK 中包含的那个)来编译 SDK 本身。

这与需要 C/C++ 编译器来构建的 C/C++ 编译器(例如 gcc)没有太大区别。

我猜最大的不同是需要的编译器是自动下载的,而不是失败并要求用户手动安装编译器。

dotnet_install: Error: Could not find/download: `.NET Core Runtime` with version = 1.0.5
dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support

这绝对是 SDK 构建系统中的一个错误。我看到你在这里报告了它:https://github.com/dotnet/sdk/issues/14966。这需要 SDK 开发人员解决。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2010-11-17
    • 2021-10-07
    • 2012-01-21
    • 2012-06-13
    • 2012-08-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多