Skip to content

dotnet-install script tries download x64 sdk when specifying channel to 10 #654

Closed

Description

@DosangGu

As described in title, the script tries to download x64 sdk even though the architecture options is specified

➜  ~ ./dotnet-install.sh -c 10.0 --architecture arm64
dotnet-install: Attempting to download using aka.ms link https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/dotnet-sdk-10.0.100-osx-x64.tar.gz

➜  ~ ./dotnet-install.sh -c 10.0
dotnet-install: Attempting to download using aka.ms link https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/dotnet-sdk-10.0.100-osx-x64.tar.gz

Activity

  1. ellahathaway commented on Nov 12, 2025

    @ellahathaway
    Member

    [Triage] The script is likely reading the machine architecture and not honoring the --architecture flag. We should investigate whether or not this is the case. It's also possible that the aka.ms links are pointing to the incorrect artifacts.

    @DosangGu - what's the architecture of the machine you're running on?

  2. DosangGu commented on Nov 12, 2025

    @DosangGu
    Author

    It's arm64. I ran the script with mac mini (m2 chip).

  3. ellahathaway commented on Nov 19, 2025

    @ellahathaway
    Member

    I'm unable to repro with Apple M1 (ARM) Mini

    >  uname -m
    arm64
    
    > curl -sSL https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh | bash /dev/stdin -c 10.0 --architecture arm64
    dotnet-install: Attempting to download using aka.ms link https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/dotnet-sdk-10.0.100-osx-arm64.tar.gz
    dotnet-install: Extracting archive from https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/dotnet-sdk-10.0.100-osx-arm64.tar.gz
      
    > curl -sSL https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh | bash /dev/stdin -c 10.0
    dotnet-install: Attempting to download using aka.ms link https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/dotnet-sdk-10.0.100-osx-arm64.tar.gz
    dotnet-install: Extracting archive from https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/dotnet-sdk-10.0.100-osx-arm64.tar.gz
    

    @DosangGu - Can you please provide some more details: What is the output when you run uname -m? Additionally, what is the output when your run the scripts with the --verbose flag?

  4. DosangGu commented on Nov 19, 2025

    @DosangGu
    Author

    It seems my downloaded script is outdated. Using your example script installed arm64 sdk.

    But I'll provide the log which I tried with old script. Seems the old script parsed architecture as arm64 but it tries download x64 sdk.

    ➜  ~ uname -m
    arm64
    ➜  ~ ~/dotnet-install.sh -c 10.0 --verbose
    dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
    dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
    dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
    dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.
     
    dotnet-install: Calling: machine_has curl
    dotnet-install: Calling: calculate_vars
    dotnet-install: Calling: get_normalized_architecture_from_architecture <auto>
    dotnet-install: Calling: get_machine_architecture
    dotnet-install: Normalized architecture: 'arm64'.
    dotnet-install: Calling: get_normalized_os
    dotnet-install: Calling: get_current_os_name
    dotnet-install: Normalized OS: 'osx'.
    dotnet-install: Calling: get_normalized_quality
    dotnet-install: Normalized quality: ''.
    dotnet-install: Calling: get_normalized_channel 10.0
    dotnet-install: Normalized channel: '10.0'.
    dotnet-install: Calling: get_normalized_product
    dotnet-install: Normalized product: 'dotnet-sdk'.
    dotnet-install: Calling: resolve_installation_path <auto>
    dotnet-install: Calling: get_user_install_path
    dotnet-install: resolve_installation_path: user_install_path=/Users/someotherplace/.dotnet
    dotnet-install: InstallRoot: '/Users/someotherplace/.dotnet'.
    dotnet-install: Calling: get_normalized_architecture_for_specific_sdk_version Latest 10.0 arm64
    dotnet-install: Calling: get_current_os_name
    dotnet-install: Changing user architecture from 'arm64' to 'x64' because .NET SDKs prior to version 6.0 do not support arm64.
    dotnet-install: Calling: get_download_link_from_aka_ms
    dotnet-install: Retrieving primary payload URL from aka.ms for channel: '10.0', quality: '', product: 'dotnet-sdk', os: 'osx', architecture: 'x64'.
    dotnet-install: Constructed aka.ms link: '[https://aka.ms/dotnet/10.0/dotnet-sdk-osx-x64.tar.gz'.](https://aka.ms/dotnet/10.0/dotnet-sdk-osx-x64.tar.gz%27.)
    dotnet-install: Calling: get_http_header https://aka.ms/dotnet/10.0/dotnet-sdk-osx-x64.tar.gz true
    dotnet-install: Calling: machine_has curl
    dotnet-install: Calling: get_http_header_curl https://aka.ms/dotnet/10.0/dotnet-sdk-osx-x64.tar.gz true
    dotnet-install: Received response: HTTP/1.1 301 Moved Permanently
    Server: Kestrel
    Location: https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/dotnet-sdk-10.0.100-osx-x64.tar.gz
    Request-Context: appId=cid-v1:d94c0f68-64bf-4036-8409-a0e761bb7ee1
    X-Response-Cache-Status: True
    Content-Length: 0
    Expires: Wed, 19 Nov 2025 23:25:54 GMT
    Cache-Control: max-age=0, no-cache, no-store
    Pragma: no-cache
    Date: Wed, 19 Nov 2025 23:25:54 GMT
    Connection: keep-alive
    Strict-Transport-Security: max-age=31536000 ; includeSubDomains
     
    HTTP/1.1 200 OK
    Content-Type: application/octet-stream
    Content-MD5: jo9HF0BJURJ1SICBybhHJw==
    Last-Modified: Tue, 11 Nov 2025 11:44:48 GMT
    ETag: 0x8DE2117B7956624
    x-ms-request-id: e088e40a-601e-0029-7695-595b14000000
    x-ms-version: 2009-09-19
    x-ms-lease-status: unlocked
    x-ms-blob-type: BlockBlob
    Cache-Control: public, max-age=854492
    Date: Wed, 19 Nov 2025 23:25:55 GMT
    Connection: keep-alive
    Content-Length: 237608768
    Akamai-GRN: 0.ca15d617.1763594755.207b3dc
     
    dotnet-install: The redirect location retrieved: '[https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/dotnet-sdk-10.0.100-osx-x64.tar.gz'.](https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/dotnet-sdk-10.0.100-osx-x64.tar.gz%27.)
    dotnet-install: Retrieved primary payload URL from aka.ms link: '[https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/dotnet-sdk-10.0.100-osx-x64.tar.gz'.](https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/dotnet-sdk-10.0.100-osx-x64.tar.gz%27.)
    dotnet-install: Downloading using legacy url will not be attempted.
    dotnet-install: Version: '10.0.100'.
    dotnet-install: Calling: get_specific_product_version  10.0.100 https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/dotnet-sdk-10.0.100-osx-x64.tar.gz
    dotnet-install: Calling: get_specific_product_version_url  10.0.100 true https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/dotnet-sdk-10.0.100-osx-x64.tar.gz
    dotnet-install: Constructed productVersion link: https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/sdk-productVersion.txt
    dotnet-install: Calling: get_specific_product_version_url  10.0.100 false https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/dotnet-sdk-10.0.100-osx-x64.tar.gz
    dotnet-install: Constructed productVersion link: https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/productVersion.txt
    dotnet-install: Checking for the existence of https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/sdk-productVersion.txt
    dotnet-install: Calling: machine_has curl
    dotnet-install: Calling: is_dotnet_package_installed /Users/someotherplace/.dotnet sdk 10.0.100
    dotnet-install: Calling: combine_paths /Users/someotherplace/.dotnet sdk
    dotnet-install: combine_paths: root_path=/Users/someotherplace/.dotnet
    dotnet-install: combine_paths: child_path=sdk
    dotnet-install: Calling: combine_paths /Users/someotherplace/.dotnet/sdk 10.0.100
    dotnet-install: combine_paths: root_path=/Users/someotherplace/.dotnet/sdk
    dotnet-install: combine_paths: child_path=10.0.100
    dotnet-install: is_dotnet_package_installed: dotnet_package_path=/Users/someotherplace/.dotnet/sdk/10.0.100
    dotnet-install: Generated 1 links.
    dotnet-install: Link 0: aka.ms, 10.0.100, https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/dotnet-sdk-10.0.100-osx-x64.tar.gz
    dotnet-install: Calling: install_dotnet
    dotnet-install: Zip path: /var/folders/37/1xb3nfwd4pg0zth1cy38_p900000gn/T//dotnet.SbnOV3AK8
    dotnet-install: Attempting to download using aka.ms link https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/dotnet-sdk-10.0.100-osx-x64.tar.gz
    dotnet-install: Calling: download https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/dotnet-sdk-10.0.100-osx-x64.tar.gz /var/folders/37/1xb3nfwd4pg0zth1cy38_p900000gn/T//dotnet.SbnOV3AK8
    dotnet-install: Calling: machine_has curl
    dotnet-install: Calling: downloadcurl https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/dotnet-sdk-10.0.100-osx-x64.tar.gz /var/folders/37/1xb3nfwd4pg0zth1cy38_p900000gn/T//dotnet.SbnOV3AK8
    dotnet-install: Calling: machine_has curl
    dotnet-install: Remote file https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/dotnet-sdk-10.0.100-osx-x64.tar.gz size is 237608768 bytes.
    dotnet-install: Extracting zip from https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/dotnet-sdk-10.0.100-osx-x64.tar.gz
    dotnet-install: Calling: extract_dotnet_package /var/folders/37/1xb3nfwd4pg0zth1cy38_p900000gn/T//dotnet.SbnOV3AK8 /Users/someotherplace/.dotnet 237608768
    dotnet-install: Calling: copy_files_or_dirs_from_list /var/folders/37/1xb3nfwd4pg0zth1cy38_p900000gn/T//dotnet.qu4QmdPqd /Users/someotherplace/.dotnet false
    dotnet-install: Calling: get_current_os_name
    dotnet-install: Calling: copy_files_or_dirs_from_list /var/folders/37/1xb3nfwd4pg0zth1cy38_p900000gn/T//dotnet.qu4QmdPqd /Users/someotherplace/.dotnet true
    dotnet-install: Calling: get_current_os_name
    dotnet-install: Calling: validate_remote_local_file_sizes /var/folders/37/1xb3nfwd4pg0zth1cy38_p900000gn/T//dotnet.SbnOV3AK8 237608768
    dotnet-install: Downloaded file size is 237608768 bytes.
    dotnet-install: The remote and local file sizes are equal.
    dotnet-install: Temporary zip file /var/folders/37/1xb3nfwd4pg0zth1cy38_p900000gn/T//dotnet.SbnOV3AK8 was removed
    dotnet-install: Checking installation: version = 10.0.100
    dotnet-install: Calling: is_dotnet_package_installed /Users/someotherplace/.dotnet sdk 10.0.100
    dotnet-install: Calling: combine_paths /Users/someotherplace/.dotnet sdk
    dotnet-install: combine_paths: root_path=/Users/someotherplace/.dotnet
    dotnet-install: combine_paths: child_path=sdk
    dotnet-install: Calling: combine_paths /Users/someotherplace/.dotnet/sdk 10.0.100
    dotnet-install: combine_paths: root_path=/Users/someotherplace/.dotnet/sdk
    dotnet-install: combine_paths: child_path=10.0.100
    dotnet-install: is_dotnet_package_installed: dotnet_package_path=/Users/someotherplace/.dotnet/sdk/10.0.100
    dotnet-install: Installed version is 10.0.100
    dotnet-install: Calling: combine_paths /Users/someotherplace/.dotnet
    dotnet-install: combine_paths: root_path=/Users/someotherplace/.dotnet
    dotnet-install: combine_paths: child_path=
    dotnet-install: Calling: get_absolute_path /Users/someotherplace/.dotnet/
    dotnet-install: Adding to current process PATH: `/Users/someotherplace/.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.
  5. ellahathaway commented on Nov 20, 2025

    @ellahathaway
    Member

    Looks like this was fixed in #526. As you said, using a newer version of the script will resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions