-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Windows ARM64 to CefSharp.NETCore packages #3359
Conversation
✅ Build CefSharp 88.1.2-CI3872 completed (commit bdc9e57f33 by @kpreisser) |
✅ Build CefSharp 88.1.2-CI3873 completed (commit 7d6897f57c by @kpreisser) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Upgrade to
88.1.2+gac8e5f0+chromium-88.0.4324.27 / Chromium 88.0.4324.27
Thanks for keeping this as it's own commit, I've cherry picked and have just pushed an update to 88.1.3
. Hopefully it should be easy enough to rebase this on master
.
- Note: For .NET Core projects that now specify
<Platforms>x86;x64;arm64</Platforms>
, it seems we explicitly need to set<PlatformTarget>
toarm64
whenPlatform
isarm64
. Without this, thePlatformTarget
seems to beAnyCPU
and e.g. theCefSharp.BrowserSubprocess.exe
would be anx64
EXE.
Seems like a bug, were you able to find an open issue?
Additionally, the current
Windows ARM64
installer for .NET 5.0 doesn't include the Desktop Runtime (WinForms/WPF).
I was under the impression the WinForms ARM64
implementation was complete for .Net 5.0
, how does one install WinForms
on ARM64
?
I'd like to remove the dependency on cef.redist.arm64
as it's only used in development. Switching the Net Core
projects to using the chromiumembeddedframework.runtime
package and specifying a RuntimeIdentifier
should be feasible now as the packages are now on the verge of an official release.
I'll install the ARM64
cross compiler and build this locally when I get a chance.
Overall looks very promising, thanks for your efforts 👍
CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.vcxproj
Outdated
Show resolved
Hide resolved
Thanks a lot for your feedback!
I will look at rebasing it at current master when I have some time.
I didn't find one in dotnet/sdk. I created a new issue here: dotnet/sdk#15434
OK, I will look at switching the projects to the Thank you! |
I can do that tomorrow. |
The current .NET 5.0 installers for Windows ARM64 don't include the Windows Desktop components (WinForms+WPF) because WPF isn't yet ready for ARM64. See the 5.0-preview-8 blog post:
Sorry, I previously thought that publishing a WinForms app using RID |
Note: .NET 5.0 or higher is required to build a WinForms/WPF application for win-arm64. Fixes cefsharp#2944
✅ Build CefSharp 88.1.3-CI3876 completed (commit 90860a4eb9 by @kpreisser) |
❌ Build CefSharp 88.1.3-CI3877 failed (commit cd21f96b25 by @kpreisser) |
…netcore projects from cef.redist to chromiumembeddedframework.runtime. Note: These projects are excluded for build when platform is 'arm64', as otherwise the build fails as WinForms and WPF are not yet available for ARM64 in .NET 5.0.
I rebased the PR on I have also updated the However, I had to exclude these projects for build in the solution file for platform Thank you! |
❌ Build CefSharp 88.1.3-CI3878 failed (commit c09603c02e by @kpreisser) |
✅ Build CefSharp 88.1.3-CI3879 completed (commit 4a32c20410 by @kpreisser) |
Thanks for the clarification. Makes sense they want to ship them together.
Great, thanks 👍
The build script should take care of updating this. https://github.com/cefsharp/CefSharp/blob/master/build.netcore.ps1#L293
Excellent, thank you.
As it's not clear when the final release will happen I might try and merge this and comment out the minimum to keep things ticking along. We should also look at updating our |
The |
After installing the |
- Remove copying of CefRedist files in CefSharp.AfterBuild.targets which is no longer needed. - Update .vsconfig to include the VC ARM64 build tools.
I updated the Thank you! |
✅ Build CefSharp 88.1.3-CI3881 completed (commit dd89a62095 by @kpreisser) |
❌ Build CefSharp 88.1.6-CI3887 failed (commit a8b4cd803a by @kpreisser) |
I think the build failure is unrelated to the changes in this PR. |
Publishing WPF apps for |
…4 and resolve conflicts.
❌ Build CefSharp 88.2.10-CI3897 failed (commit f3f61696f3 by @kpreisser) |
… and resolve conflicts.
✅ Build CefSharp 88.2.10-CI3901 completed (commit b84d4eecf3 by @kpreisser) |
Conflicts: NuGet/PackageReference/CefSharp.Common.NETCore.targets
✅ Build CefSharp 89.0.50-CI3928 completed (commit 31faa243fd by @kpreisser) |
✅ Build CefSharp 89.0.60-CI3948 completed (commit a61f73e35d by @kpreisser) |
✅ Build CefSharp 90.1.10-CI3978 completed (commit 7fc4bf07e9 by @kpreisser) |
I checked that the @amaitland Is there anything still left to be done before this can be merged? Thanks! |
Thanks for the hard work on this 👍 I was hoping to find a way to runup a virtual machine to test this, wasn't clear that was possible currently on an I'll merge into |
Great, thanks a lot! 👍 FYI, there is an unofficial/unsupported way to install a Windows 10 ARM64 build on a Raspberry Pi 3/4 (that has an ARM64 processor), which is what I was using to test the builds. You can search for "Windows on Raspberry" to find the tool that can be used for deploying the Windows image (I'd recommend to use a Raspberry Pi 4, which is much faster than a Pi 3). As for VMs, it seems be possible to use QEMU on Windows to emulate an ARM64 processor on x64 hardware, but I haven't tried that yet (and according to the comments it seems to be very slow). |
Fixes #2944
Relates to #3284
Summary:
win-arm64
to theCefSharp.NETCore
packages, so that they can be used to publish apps forwin-arm64
on .NET 5.0 and higher.Changes:
arm64
to the platform-specific .NET Core projects (CefSharp.Core.Runtime.netcore
,CefSharp.BrowserSubprocess.Core.netcore
,CefSharp.BrowserSubprocess.netcore
,CefSharp.Test.netcore
,CefSharp.WinForms.Example.netcore
,CefSharp.WPF.Example.netcore
,CefSharp.OffScreen.Example.netcore
).<Platforms>x86;x64;arm64</Platforms>
, it seems we explicitly need to set<PlatformTarget>
toarm64
whenPlatform
isarm64
. Without this, thePlatformTarget
seems to beAnyCPU
and e.g. theCefSharp.BrowserSubprocess.exe
would be anx64
EXE. See: PlatformTarget is not set when Platform is "arm64" (MSBuild) dotnet/sdk#15434CefSharp.BrowseSubprocess.netcore
, addednet5.0
as target framework, so that we can use thenet5.0
EXE forwin-arm64
(as .NET 5.0 officially supports creating Windows ARM64 apps).Initializer.ModuleInitializer
to useRuntimeInformation.ProcessArchitecture
for building the platform-specific folder path.CefSharp.*.Example.netcore
andCefSharp.Test.netcore
projects fromcef.redist.*
tochromiumembeddedframework.runtime
.win-arm64
artifacts to the NuGet packages.build.netcore.ps1
to also build for platformarm64
.How Has This Been Tested?
6.0.100-preview.2.21155.3
(x64), switchedCefSharp.MinimalExample.[WinForms|Wpf|OffScreen].netcore
tonet6.0-windows
, switched to self-hosting the subprocess, referenced the built NuGet packages, and published the projects forwin-arm64
.6.0.100-preview.2.21155.3
(arm64) on the target machine and run the non-published version ofCefSharp.MinimalExample.Winforms
using the defaultCefSharp.BrowserSubprocess.exe
.Screenshots:
You can see in
Architecture
column of the task manager that the application is running natively asARM64
.(Windows 10 on ARM also supports running
x86
apps (andx64
in insider builds) using emulation, but they would run significantly slower than native ARM64 apps.)CefSharp.MinimalExample.WinForms.netcore:
I changed the form title to output
RuntimeInformation.FrameworkDescription
andRuntimeInformation.ProcessArchitecture
:Self-hosting subprocess:
Default subprocess:
CefSharp.MinimalExample.Wpf.netcore:
CefSharp.MinimalExample.OffScreen.netcore:
Types of changes
Checklist: