Skip to content

Conversation

hoyosjs
Copy link
Member

@hoyosjs hoyosjs commented May 13, 2020

Makes it possible to build/publish ARM64 WinForms apps.

  • If an app tries anything requiring UseWPF it will fail as a build time scenario as there's no available runtime pack.
  • Anything using UsingWindowsForms will correctly compile and run natively as long as all the references are in the assemblies produced by winforms.

cc: @merriemcgaw, @tommcdon

Makes it possible to build/publish arm64 winforms app. WPF/Full Winforms+WPF should still fail as a build time scenario.
@tommcdon
Copy link
Member

FYI @richlander

@dsplaisted
Copy link
Member

Do we have a runtime pack for this yet?

Ideally I'd like to also add a basic test that this works.

@richlander
Copy link
Member

There are at least three pieces we need:

  • Ref pack for Windows Desktop. This is required to build, and should be in-box.
  • Runtime for Windows desktop @ C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App. This is required for fx-dependent apps to run and should be in-box.
  • Runtime pack for Windows desktop. This is required for self-contained publishing and should be referenced as a URL (not in box).

Will we have all of these after this PR merges?

@hoyosjs
Copy link
Member Author

hoyosjs commented May 13, 2020

Do we have a runtime pack for this yet?

https://dnceng.visualstudio.com/public/_packaging?_a=package&feed=dotnet5&package=Microsoft.WindowsDesktop.App.Runtime.win-arm64&protocolType=NuGet&version=5.0.0-preview.6.20261.2

Ideally I'd like to also add a basic test that this works.

Yes, this I have to look how to do. Tom and I confirmed manually it worked but it would be good to actually confirm it works as expected. I'll take a look at the tree tomorrow to see where they are.

Ideally I could test these two:

  • Winforms works on arm64
  • Wpf errors as expected

Should I also open an issue to track the cleanup?

@wli3
Copy link

wli3 commented May 13, 2020

Are you blocked by this change? If not, I think we should checkin until the feature can work.

Yes, you should open an issue to track everything that is required for this feature to function.

@hoyosjs
Copy link
Member Author

hoyosjs commented May 13, 2020

There's some loose ends here:

  • Ref pack for Windows Desktop. This is required to build, and should be in-box.
  • Runtime for Windows desktop @ C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App. This is required for fx-dependent apps to run and should be in-box.
  • Runtime pack for Windows desktop. This is required for self-contained publishing and should be referenced as a URL (not in box).
    Will we have all of these after this PR merges?

All three are done to some extent:

  • The ARM64 zipped SDK has the WD ref pack under DOTNET_ROOT\packs\Microsoft.WindowsDesktop.App.Ref\<VERSION>\ref. @dsplaisted, is there a way to solve or warn about Error out properly when building WPF on ARM64 app until support is added. #7467 is targeting refs in the Wpf profile?
  • The ARM64 zipped SDK has DOTNET_ROOT\shared\Microsoft.WindowsDesktop.App\<VERSION> after this. The assets contained are only the winforms ones. This causes one of the issues above.
  • The runtime pack, albeit with the issues mentioned, is up in the dotnet5 feed. A win-arm64 publish on x64 pulls that package and I can marshal the self contained app and use it on a cobalt device and it runs as an ARM64 app and not under emulation.

@dsplaisted
Copy link
Member

I would like to see a simple test case that we can build a self-contained Windows Forms app for ARM64 before merging this.

I don't think we need to address #7467 before merging this though.