Skip to content

windows arm64 dotnet SDK fails to publish self-contained #20840

Open
@guide2wsl

Description

@guide2wsl

Describe the bug

The dotnet CLI on a Windows ARM64 machine cannot publish a self-contained application

To Reproduce

On a Windows ARM64 device (e.g. Surface Pro X):

  1. Download https://dotnet.microsoft.com/download/dotnet/thank-you/sdk-6.0.100-preview.7-windows-arm64-binaries
  2. Create a new application:
dotnet new console
  1. Attempt to publish it:
dotnet publish -r win-arm64 --self-contained /p:PublishSingleFile=true
# results in: error NU1100: Unable to resolve 'Microsoft.NETCore.App.Runtime.win-arm64 (= 6.0.0-preview.7.21377.19)' for 'net6.0'.

It's worth noting within WSL2, the Linux ARM64 dotnet 6 SDK Preview does not have this problem i.e. ARM64 Linux can successfully cross compile for the same target runtime, win-arm64, so this bug appears to be specifically for the Windows ARM64 version of the dotnet 6 SDK. More details below:

Exceptions (if any)

Microsoft (R) Build Engine version 17.0.0-preview-21378-03+d592862ed for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
C:\Users\guide2wsl\Documents\Programming\first\first.csproj : error NU1100: Unable to resolve 'Microsoft.NETCore.App.Runtime.win-arm64 (= 6.0.0-preview.7.21377.19)' for 'net6.0'.
C:\Users\guide2wsl\Documents\Programming\first\first.csproj : error NU1100: Unable to resolve 'Microsoft.WindowsDesktop.App.Runtime.win-arm64 (= 6.0.0-preview.7.21378.9)' for 'net6.0'.
C:\Users\guide2wsl\Documents\Programming\first\first.csproj : error NU1100: Unable to resolve 'Microsoft.AspNetCore.App.Runtime.win-arm64 (= 6.0.0-preview.7.21378.6)' for 'net6.0'.
  Failed to restore C:\Users\guide2wsl\Documents\Programming\first\first.csproj (in 167 ms).

Further technical details

Edition Windows 11 Home
Version 21H2
OS build 22000.176

dotnet --info
.NET SDK (reflecting any global.json):
 Version:   6.0.100-preview.7.21379.14
 Commit:    22d70b47bc

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.22000
 OS Platform: Windows
 RID:         win10-arm64
 Base Path:   C:\Users\guide2wsl\Applications\dotnet\sdk\6.0.100-preview.7.21379.14\

Host (useful for support):
  Version: 6.0.0-preview.7.21377.19
  Commit:  91ba01788d

.NET SDKs installed:
  6.0.100-preview.7.21379.14 [C:\Users\guide2wsl\Applications\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.0-preview.7.21378.6 [C:\Users\guide2wsl\Applications\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.0-preview.7.21377.19 [C:\Users\guide2wsl\Applications\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 6.0.0-preview.7.21378.9 [C:\Users\guide2wsl\Applications\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

Please investigate, thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions