Skip to content

.NET 8 installation fails #763

Closed
Closed
@doublecompile

Description

@doublecompile

Describe the bug
.NET 8.0 fails to install on a simple Linux CodeBuild project.

To Reproduce
Steps to reproduce the behavior:

Use the following standard buildspec.yml

version: 0.2
phases:
  install:
    runtime-versions:
      dotnet: "8.0"

Expected behavior
Latest version of .NET 8 installs.

Logs

[Container] 2025/03/14 14:08:52.147224 Selecting 'dotnet' runtime version '8.0' based on manual selections...
[Container] 2025/03/14 14:08:52.147880 Running command echo "Installing custom .Net version 8.0 ..."
Installing custom .Net version 8.0 ...
[Container] 2025/03/14 14:08:52.155641 Running command /usr/local/bin/dotnet-install.sh -v 8.0 && rm -rf /tmp/*
dotnet-install: Attempting to download using primary link https://builds.dotnet.microsoft.com/dotnet/Sdk/8.0/dotnet-sdk-8.0-linux-x64.tar.gz
curl: (22) The requested URL returned error: 404
dotnet-install: The resource at primary link 'https://builds.dotnet.microsoft.com/dotnet/Sdk/8.0/dotnet-sdk-8.0-linux-x64.tar.gz' is not available.
dotnet-install: Attempting to download using primary link https://ci.dot.net/public/Sdk/8.0/dotnet-sdk-8.0-linux-x64.tar.gz
curl: (22) The requested URL returned error: 404
dotnet-install: The resource at primary link 'https://ci.dot.net/public/Sdk/8.0/dotnet-sdk-8.0-linux-x64.tar.gz' is not available.
dotnet_install: Error: Could not find `.NET Core SDK` with version = 8.0
dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support
[Container] 2025/03/14 14:08:58.278143 Command did not exit successfully /usr/local/bin/dotnet-install.sh -v 8.0 && rm -rf /tmp/* exit status 1
[Container] 2025/03/14 14:08:58.279003 Phase complete: DOWNLOAD_SOURCE State: FAILED
[Container] 2025/03/14 14:08:58.279017 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while installing runtimes.

Platform (please complete the following information):

  • OS: Linux x86

I've temporarily changed this to the following, which seems to work.

phases:
  install:
    commands:
      curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 8.0

The logs for this output:

[Container] 2025/03/14 14:27:55.511010 Running command curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 8.0
dotnet-install: Attempting to download using aka.ms link https://builds.dotnet.microsoft.com/dotnet/Sdk/8.0.407/dotnet-sdk-8.0.407-linux-x64.tar.gz
dotnet-install: Remote file https://builds.dotnet.microsoft.com/dotnet/Sdk/8.0.407/dotnet-sdk-8.0.407-linux-x64.tar.gz size is 212950827 bytes.
dotnet-install: Extracting archive from https://builds.dotnet.microsoft.com/dotnet/Sdk/8.0.407/dotnet-sdk-8.0.407-linux-x64.tar.gz
dotnet-install: Downloaded file size is 212950827 bytes.
dotnet-install: The remote and local file sizes are equal.
dotnet-install: Installed version is 8.0.407
dotnet-install: Adding to current process PATH: `/root/.dotnet`. Note: This change will be visible only when sourcing script.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
dotnet-install: Installation finished successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions