dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.42k stars 984 forks source link

How about supporting ARM64. #2053

Closed pcfulife2 closed 4 years ago

pcfulife2 commented 5 years ago

Windows 10 supports ARM64 processors. And, Windows 10 on ARM64 can run x86 applications. But, performance is significantly low because of emulation. And, it cannot run native AMD64 applications. So, some developers recompile their applications for better performance.

Win32 API supports ARM processors. (I saw native ARM64 applications which is not an UWP app) But, WinForms does not support ARM64 but only x86/AMD64. If WinForms supports ARM64, many WinForms applications will be able to run efficiently with ARM processors.

OliaG commented 5 years ago

Cc @richlander

richlander commented 5 years ago

We are currently looking into this, for .NET Core (including WPF and Windows Forms). I am hopeful that we will add Windows ARM64 for .NET Core in 2020 but we have not finished planning and feasibility on that yet.

It would be awesome to see more requests on ARM64. If you have specific scenarios that you want to share, that would certainly help make this request a reality.

kpreisser commented 5 years ago

I think with the recent announcement of the ARM-based Surface Pro X, support for producing ARM64 binaries becomes more important, so that WinForms/WPF apps can run at native speed on such devices and can use the full 64-bit address space. Especially start-up performance is much better when running an ARM64 app than a x86 app.

Note that it seems basic WinForms functionality does already work when publishing an app for runtime win-arm64 (using manually built System.Windows.Forms.dll from master branch or from PR #1133): grafik

Even the WebBrowser control (IE) seems to work (whereas I first thought IE would not be available natively as ARM64).

richlander commented 5 years ago

That's awesome! We have had Windows ARM64 builds of .NET Core for a couple/few years, but they were never productized. It isn't surprising that Windows Forms works. WPF will not as we need to do a significant project to make it work.

But yes, once again proving that .NET is quite a flexible platform!

moolwalk commented 4 years ago

I'm developing an application for Windows PE(Preinstallation Environment) for ARM64 PCs. The application code-base is WinForms on .net framework. MSFT Windows On ARM team says that they decided that .netfx won't be ported to WinPE ARM64, so I'm looking at adopting .net core for that application. Non-UI parts are easy to port to .net core 3.0 but UI codes can't be ported because there's no WinForm libraries in the SDK. I'm hoping that manually adopt the WinForm library for ARM64 but there's no prebuilt one. Could I get a WinForm lib for ARM64 or get a simplest steps to build WinForm for ARM64? I have no experience of building WinForm at all so it's no easy fit.

AdamYoblick commented 4 years ago

Hi everyone!

I've completed a proof of concept for building winforms for arm64. This isn't "officially supported" yet, but it seems to work building on both my x64 machine (with the x64 .net core sdk), as well as building on the arm64 machine (with the x86 .net core sdk).

For more information, please see https://github.com/dotnet/winforms/wiki/Building-for-ARM64. If you run into any issues, please reply in this issue and I can try to assist if I can.

We will wait to close out this issue until arm64 is official supported and released. 😄

Thanks!

hmartinez82 commented 4 years ago

@AdamYoblick I'm trying to convince the manager/pm that we should use .Net Core instead of .Net Framework for a project we're about to start from scratch. We don't have to support ARM64 right now, but it will appear in the roadmap pretty soon.

Is it safe to say that WPF for .Net Core on ARM64 will be released in .NET 5 ?

Thank you.

weltkante commented 4 years ago

Is it safe to say that WPF for .Net Core on ARM64 will be released in .NET 5 ?

You are asking in the WinForms repository ;-)

RussKie commented 4 years ago

There is a current expectation that .NET5 will be fully working on ARM64.

hmartinez82 commented 4 years ago

@weltkante you're right 😅. I'll ask in the wpf repo

JensNordenbro commented 4 years ago
  1. ARM64 support for Winforms (and WPF) would help make Surface Pro X great (again)!
  2. ARM64 support would make ARM64-based Windows 10 a first class citizen for many applications developed for a very long timespan
  3. Long term Windows could find its way into lower-end HW-platform with this support (and more)
RussKie commented 4 years ago

FWIW it is being worked on - https://github.com/dotnet/windowsdesktop/pull/757

RussKie commented 4 years ago

@hmartinez82 please move the discussion to windowsdeskop repo.