Skip to content

.NET 8 installation fails #763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
doublecompile opened this issue Mar 14, 2025 · 2 comments
Closed

.NET 8 installation fails #763

doublecompile opened this issue Mar 14, 2025 · 2 comments

Comments

@doublecompile
Copy link

doublecompile commented Mar 14, 2025

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.
@doublecompile
Copy link
Author

I also noted this on dotnet/core#9799.

@doublecompile
Copy link
Author

Sigh. False alarm. It turns out the build project was using standard:6.0 instead of standard:7.0. Using the standard:7.0 image with the runtime-versions statement works as expected.

Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant