dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.75k stars 1.07k forks source link

NETSDK1082: Microsoft.WindowsDesktop.App.WindowsForms missing runtime pack for 'win10-arm' and 'win10-arm-aot' #30725

Open ulfemsoy opened 1 year ago

ulfemsoy commented 1 year ago

Describe the bug

Gets compiler error: NETSDK1082 There was no runtime pack for Microsoft.WindowsDesktop.App.WindowsForms available for the specified RuntimeIdentifier 'win10-arm'.

Same happens for RuntimeIdentifier 'win10-arm-aot'

To Reproduce

The issue happens when net6.0-windows10.0.18362.0 is specified in the project file.

The target framework is needed to enable Windows 10 specific functionality in Microsoft.WindowsAppSDK.

stevennyman commented 1 year ago

I am also experiencing this issue on a minimal vb.net WinForms project. The project has Microsoft.WindowsAppSDK installed, targets .NET 7.0, target OS version 10.0.22621.0, supported OS version 10.0.19041.0.

namelessmasses commented 1 year ago

+1

.net6-10.0.22621.0

namelessmasses commented 1 year ago

Describe the bug

Gets compiler error: NETSDK1082 There was no runtime pack for Microsoft.WindowsDesktop.App.WindowsForms available for the specified RuntimeIdentifier 'win10-arm'.

Same happens for RuntimeIdentifier 'win10-arm-aot'

To Reproduce

The issue happens when net6.0-windows10.0.18362.0 is specified in the project file.

The target framework is needed to enable Windows 10 specific functionality in Microsoft.WindowsAppSDK.

I just added the following to my project file and it seems to have alleviated the symptom.

<PropertyGroup>
    <TargetFramework>net7.0-windows10.0.22621.0</TargetFramework>
      <RuntimeIdentifiers>win10-x86;win10-x64</RuntimeIdentifiers>
  </PropertyGroup>

I found the <RuntimeIdentifiers> in a WinUI 3 project I'm working on in the same solution.

I have no idea if this is the right thing to do but since no one else seems to have any way to move forward right now I'm sharing what helped me remove the symptom.

Hopefully someone will confirm this as a solution or provide something better.

rsmart8452 commented 1 year ago

I ran across this issue trying to convert an old WPF app to WinUI 3. But following the instructions in the tutorial, it looks like only x64 is supported, and adding these settings to my project solved this issue.

`

win10-x64 x64

`

nikolayvpavlov commented 1 year ago

I ran intot he same issue. How hard can it be to automate this settings instead of having devs lookup arcane configurations with no documentation?