diff --git a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj index bc5625513..878a7bb9c 100644 --- a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj +++ b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj @@ -13,6 +13,10 @@ Debug x64 + + Debug + arm64 + Release Win32 @@ -21,6 +25,10 @@ Release x64 + + Release + arm64 + {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C} @@ -43,6 +51,12 @@ true Unicode + + DynamicLibrary + true + true + Unicode + DynamicLibrary false @@ -55,6 +69,12 @@ true Unicode + + DynamicLibrary + false + true + Unicode + @@ -64,12 +84,18 @@ + + + + + + true @@ -87,6 +113,14 @@ obj\$(Platform)\$(Configuration)\ $(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath) + + true + ..\CefSharp.snk + true + bin\$(Platform)\$(Configuration)\ + obj\$(Platform)\$(Configuration)\ + $(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath) + false ..\CefSharp.snk @@ -101,6 +135,13 @@ obj\$(Platform)\$(Configuration)\ $(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath) + + false + ..\CefSharp.snk + bin\$(Platform)\$(Configuration)\ + obj\$(Platform)\$(Configuration)\ + $(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath) + Level3 @@ -138,6 +179,24 @@ /ignore:4099 %(AdditionalOptions) + + + Level3 + $(SolutionDir)packages\$(CefSdkVer)\CEF;%(AdditionalIncludeDirectories);$(ProjectDir) + Disabled + WIN32;_DEBUG;EXPORT;%(PreprocessorDefinitions) + Use + true + stdcpp20 + CompileAsCpp + + + true + libcef.lib;libcef_dll_wrapper.lib;User32.lib + $(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration);$(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration)\VS$(VisualStudioProductVersion); + /ignore:4099 %(AdditionalOptions) + + Level3 @@ -171,6 +230,22 @@ $(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration);$(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration)\VS$(VisualStudioProductVersion) + + + Level3 + $(SolutionDir)packages\$(CefSdkVer)\CEF;%(AdditionalIncludeDirectories);$(ProjectDir) + WIN32;NDEBUG;EXPORT;%(PreprocessorDefinitions) + Use + true + stdcpp20 + CompileAsCpp + + + true + libcef.lib;libcef_dll_wrapper.lib + $(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration);$(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration)\VS$(VisualStudioProductVersion) + + @@ -245,8 +320,10 @@ Create Create + Create Create Create + Create diff --git a/CefSharp.BrowserSubprocess/CefSharp.BrowserSubprocess.csproj b/CefSharp.BrowserSubprocess/CefSharp.BrowserSubprocess.csproj index 3641cb9b3..61645d58d 100644 --- a/CefSharp.BrowserSubprocess/CefSharp.BrowserSubprocess.csproj +++ b/CefSharp.BrowserSubprocess/CefSharp.BrowserSubprocess.csproj @@ -2,14 +2,15 @@ net462 WinExe - x86;x64 + x86;x64;arm64 + arm64 false false true ..\CefSharp.snk app.manifest CefSharp.BrowserSubprocess.Program - win-x86;win-x64 + win-x86;win-x64;win-arm64 @@ -41,6 +42,6 @@ - + \ No newline at end of file diff --git a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj index 851974b32..dea90c0b6 100644 --- a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj +++ b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj @@ -13,6 +13,10 @@ Debug x64 + + Debug + arm64 + Release Win32 @@ -21,6 +25,10 @@ Release x64 + + Release + arm64 + {7B495581-2271-4F41-9476-ACB86E8C864F} @@ -42,6 +50,12 @@ true true + + DynamicLibrary + Unicode + true + true + DynamicLibrary Unicode @@ -52,6 +66,11 @@ Unicode true + + DynamicLibrary + Unicode + true + @@ -61,12 +80,18 @@ + + + + + + <_ProjectFileVersion>11.0.51106.1 @@ -95,6 +120,18 @@ obj\$(Platform)\$(Configuration)\ $(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath) + + false + false + ..\CefSharp.snk + AllRules.ruleset + + + CefSharp.Core.Runtime + bin\$(Platform)\$(Configuration)\ + obj\$(Platform)\$(Configuration)\ + $(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath) + bin\$(Platform)\$(Configuration)\ false @@ -117,6 +154,17 @@ obj\$(Platform)\$(Configuration)\ $(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath) + + false + AllRules.ruleset + + + CefSharp.Core.Runtime + ..\CefSharp.snk + bin\$(Platform)\$(Configuration)\ + obj\$(Platform)\$(Configuration)\ + $(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath) + Disabled @@ -179,6 +227,35 @@ $(LinkKeyFile) + + + Disabled + $(SolutionDir)packages\$(CefSdkVer)\CEF;%(AdditionalIncludeDirectories);$(ProjectDir) + _DEBUG;_WIN32_WINNT=0x0600;WINVER=0x0600;WIN32;_WINDOWS;WIN32_LEAN_AND_MEAN;USING_CEF_SHARED;_CRT_SECURE_NO_WARNINGS;EXPORT;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + Use + true + Level3 + ProgramDatabase + Stdafx.h + true + stdcpp20 + CompileAsCpp + + + false + + + opengl32.lib;glu32.lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) + $(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration);$(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration)\VS$(VisualStudioProductVersion) + false + true + true + false + false + $(LinkKeyFile) + + $(SolutionDir)packages\$(CefSdkVer)\CEF;%(AdditionalIncludeDirectories);$(ProjectDir) @@ -222,6 +299,26 @@ $(LinkKeyFile) + + + $(SolutionDir)packages\$(CefSdkVer)\CEF;%(AdditionalIncludeDirectories);$(ProjectDir) + _NDEBUG;_WIN32_WINNT=0x0600;WINVER=0x0600;WIN32;_WINDOWS;WIN32_LEAN_AND_MEAN;USING_CEF_SHARED;_CRT_SECURE_NO_WARNINGS;EXPORT;%(PreprocessorDefinitions) + MultiThreadedDLL + Use + Level3 + ProgramDatabase + true + true + stdcpp20 + CompileAsCpp + + + opengl32.lib;glu32.lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) + $(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration);$(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration)\VS$(VisualStudioProductVersion) + true + $(LinkKeyFile) + + true @@ -264,8 +361,10 @@ Create Create + Create Create Create + Create diff --git a/CefSharp.Native.props b/CefSharp.Native.props index 7f59ab51c..0d13a38d2 100644 --- a/CefSharp.Native.props +++ b/CefSharp.Native.props @@ -12,6 +12,17 @@ Include locales in the Example projects --> + + + + locales\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + Included + false + true + + + diff --git a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj index 84433b9df..4ab6c1aa6 100644 --- a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj +++ b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj @@ -2,12 +2,14 @@ net472 Exe - x86;x64 + x86;x64;arm64 + arm64 MinimumRecommendedRules.ruleset app.manifest false false - win-x86;win-x64 + win-x86;win-x64;win-arm64 + win-arm64 diff --git a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.netcore.csproj b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.netcore.csproj index ef78a3aae..934efda81 100644 --- a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.netcore.csproj +++ b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.netcore.csproj @@ -26,7 +26,7 @@ https://github.com/dotnet/docs/issues/12237 --> Major - win-x86;win-x64 + win-x86;win-x64;win-arm64 win-x86 win-x64 win-arm64 diff --git a/CefSharp.Test/CefSharp.Test.csproj b/CefSharp.Test/CefSharp.Test.csproj index cf4c49d38..95d1e17e9 100644 --- a/CefSharp.Test/CefSharp.Test.csproj +++ b/CefSharp.Test/CefSharp.Test.csproj @@ -2,8 +2,9 @@ net472 Library - x86;x64 - win-x86;win-x64 + x86;x64;arm64 + arm64 + win-x86;win-x64;win-arm64 false true true @@ -19,6 +20,10 @@ win-x64 + + + win-arm64 + diff --git a/CefSharp.Test/CefSharp.Test.netcore.csproj b/CefSharp.Test/CefSharp.Test.netcore.csproj index ef452b3b8..ffeacac26 100644 --- a/CefSharp.Test/CefSharp.Test.netcore.csproj +++ b/CefSharp.Test/CefSharp.Test.netcore.csproj @@ -20,7 +20,7 @@ x86;x64;arm64 arm64 - win-x86;win-x64 + win-x86;win-x64;win-arm64 win-x86 win-x64 win-arm64 diff --git a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj index c642230d4..6bd21ef79 100644 --- a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj +++ b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj @@ -2,14 +2,16 @@ net472 WinExe - x86;x64 + x86;x64;arm64 + arm64 false true MinimumRecommendedRules.ruleset app.manifest CefSharp.WinForms.Example.Program false - win-x86;win-x64 + win-x86;win-x64;win-arm64 + win-arm64 diff --git a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.netcore.csproj b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.netcore.csproj index d6c040fbc..e80d19dca 100644 --- a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.netcore.csproj +++ b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.netcore.csproj @@ -26,7 +26,7 @@ https://github.com/dotnet/docs/issues/12237 --> Major - win-x86;win-x64 + win-x86;win-x64;win-arm64 win-x86 win-x64 win-arm64 diff --git a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj index d1585cd4f..ca48c5390 100644 --- a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj +++ b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj @@ -2,14 +2,16 @@ net472 WinExe - x86;x64 + x86;x64;arm64 + arm64 false true AllRules.ruleset app.manifest CefSharp.Wpf.Example.Program false - win-x86;win-x64 + win-x86;win-x64;win-arm64 + win-arm64 diff --git a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.netcore.csproj b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.netcore.csproj index aaebe87c2..020794b77 100644 --- a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.netcore.csproj +++ b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.netcore.csproj @@ -27,7 +27,7 @@ https://github.com/dotnet/docs/issues/12237 --> Major - win-x86;win-x64 + win-x86;win-x64;win-arm64 win-x86 win-x64 win-arm64 diff --git a/CefSharp.Wpf.HwndHost.Example/CefSharp.Wpf.HwndHost.Example.csproj b/CefSharp.Wpf.HwndHost.Example/CefSharp.Wpf.HwndHost.Example.csproj index 1ec2de457..5a78a1ad8 100644 --- a/CefSharp.Wpf.HwndHost.Example/CefSharp.Wpf.HwndHost.Example.csproj +++ b/CefSharp.Wpf.HwndHost.Example/CefSharp.Wpf.HwndHost.Example.csproj @@ -2,7 +2,7 @@ net472 WinExe - x86;x64 + x86;x64;arm64 false true AllRules.ruleset diff --git a/CefSharp.Wpf.HwndHost.Example/CefSharp.Wpf.HwndHost.Example.netcore.csproj b/CefSharp.Wpf.HwndHost.Example/CefSharp.Wpf.HwndHost.Example.netcore.csproj index 42ec8c5d1..d901616ee 100644 --- a/CefSharp.Wpf.HwndHost.Example/CefSharp.Wpf.HwndHost.Example.netcore.csproj +++ b/CefSharp.Wpf.HwndHost.Example/CefSharp.Wpf.HwndHost.Example.netcore.csproj @@ -28,7 +28,7 @@ https://github.com/dotnet/docs/issues/12237 --> Major - win-x86;win-x64 + win-x86;win-x64;win-arm64 win-x86 win-x64 win-arm64 diff --git a/CefSharp/ArchitectureHelper.cs b/CefSharp/ArchitectureHelper.cs new file mode 100644 index 000000000..abe18e6f7 --- /dev/null +++ b/CefSharp/ArchitectureHelper.cs @@ -0,0 +1,47 @@ +using System; +using System.Runtime.InteropServices; + +namespace CefSharp +{ + internal static class ArchitectureHelper + { + internal const string Arm64 = "arm64"; + internal const string X64 = "x64"; + internal const string X86 = "x86"; + + internal static string ProcessArchitecture + { + get { return processArchitecture.Value; } + } + + internal static bool IsArm64Process + { + get { return string.Equals(ProcessArchitecture, Arm64, StringComparison.OrdinalIgnoreCase); } + } + + private static readonly Lazy processArchitecture = new Lazy(ResolveProcessArchitecture); + + private static string ResolveProcessArchitecture() + { + return MapArchitecture(RuntimeInformation.ProcessArchitecture.ToString()); + } + + private static string MapArchitecture(string architecture) + { + switch (architecture) + { + case "Arm64": + case "arm64": + return Arm64; + case "X64": + case "x64": + return X64; + case "X86": + case "x86": + return X86; + default: + return Environment.Is64BitProcess ? X64 : X86; + } + } + } +} \ No newline at end of file diff --git a/CefSharp/CefRuntime.cs b/CefSharp/CefRuntime.cs index 52301b9e3..e63703d45 100644 --- a/CefSharp/CefRuntime.cs +++ b/CefSharp/CefRuntime.cs @@ -18,10 +18,10 @@ public static class CefRuntime /// /// When using AnyCPU the architecture specific version of CefSharp.Core.Runtime.dll - /// needs to be loaded (x64/x86). + /// needs to be loaded (x64/x86/arm64). /// This method subscribes to the event /// for and loads the CefSharp.Core.Runtime.dll - /// based on . + /// based on the current process architecture. /// This method MUST be called before you call Cef.Initialize, create your first ChromiumWebBrowser instance, basically /// before anything CefSharp related happens. This method is part of CefSharp.dll which is an AnyCPU library and /// doesn't have any references to the CefSharp.Core.Runtime.dll so it's safe to use. @@ -47,9 +47,7 @@ public static void SubscribeAnyCpuAssemblyResolver(string basePath = null) if (args.Name.StartsWith("CefSharp.Core.Runtime")) { string assemblyName = args.Name.Split(new[] { ',' }, 2)[0] + ".dll"; - string archSpecificPath = Path.Combine(basePath, - Environment.Is64BitProcess ? "x64" : "x86", - assemblyName); + string archSpecificPath = GetArchSpecificPath(basePath, assemblyName); return File.Exists(archSpecificPath) ? System.Reflection.Assembly.LoadFile(archSpecificPath) @@ -75,9 +73,9 @@ public static void UnsubscribeAnyCpuAssemblyResolver() /// /// When using AnyCPU the architecture specific version of CefSharp.Core.Runtime.dll - /// needs to be loaded (x64/x86). + /// needs to be loaded (x64/x86/arm64). /// This method calls to immediately load CefSharp.Core.Runtime.dll - /// based on . + /// based on the current process architecture. /// This method MUST be called before you call Cef.Initialize, create your first ChromiumWebBrowser instance, basically /// before anything CefSharp related happens. This method is part of CefSharp.dll which is an AnyCPU library and /// doesn't have any references to the CefSharp.Core.Runtime.dll so it's safe to use. @@ -95,10 +93,8 @@ public static void LoadCefSharpCoreRuntimeAnyCpu(string basePath = null) basePath = AppDomain.CurrentDomain.SetupInformation.ApplicationBase; } - var env = Environment.Is64BitProcess ? "x64" : "x86"; - string archSpecificPath = Path.Combine(basePath, - env, - assemblyName); + var processArchitecture = ArchitectureHelper.ProcessArchitecture; + string archSpecificPath = GetArchSpecificPath(basePath, assemblyName); if (File.Exists(archSpecificPath)) { @@ -106,8 +102,15 @@ public static void LoadCefSharpCoreRuntimeAnyCpu(string basePath = null) } else { - throw new FileNotFoundException("Unable to load for arch " + env, archSpecificPath); + throw new FileNotFoundException("Unable to load for arch " + processArchitecture, archSpecificPath); } } + + private static string GetArchSpecificPath(string basePath, string assemblyName) + { + return Path.Combine(basePath, + ArchitectureHelper.ProcessArchitecture, + assemblyName); + } } } diff --git a/CefSharp/CefSharp.csproj b/CefSharp/CefSharp.csproj index e9103e651..0778d7a2d 100644 --- a/CefSharp/CefSharp.csproj +++ b/CefSharp/CefSharp.csproj @@ -22,6 +22,7 @@ + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/CefSharp/DependencyChecker.cs b/CefSharp/DependencyChecker.cs index 41ea796cc..b3effea73 100644 --- a/CefSharp/DependencyChecker.cs +++ b/CefSharp/DependencyChecker.cs @@ -76,7 +76,7 @@ public static class DependencyChecker /// /// List of CefSharp Arch Specific Dependencies /// Those that are arch specific, - /// distributed as x86, x64 and ARM64 (coming soon for .Net 5.0 only) + /// distributed as x86, x64 and ARM64. /// public static string[] CefSharpArchSpecificDependencies = { @@ -135,7 +135,7 @@ public static List CheckDependencies(bool checkOptional, bool packLoadin if (checkOptional) { - missingDependencies.AddRange(CheckDependencyList(nativeLibPath, CefOptionalDependencies)); + missingDependencies.AddRange(CheckDependencyList(nativeLibPath, GetOptionalDependencies())); } #if NETCOREAPP @@ -172,6 +172,19 @@ public static List CheckDependencies(bool checkOptional, bool packLoadin return missingDependencies; } + private static IEnumerable GetOptionalDependencies() + { + foreach (var dependency in CefOptionalDependencies) + { + if (ArchitectureHelper.IsArm64Process && string.Equals(dependency, "d3dcompiler_47.dll", StringComparison.OrdinalIgnoreCase)) + { + continue; + } + + yield return dependency; + } + } + /// /// Loop through dependencies and add to the returned missing dependency list if not found. /// diff --git a/CefSharp3.sln b/CefSharp3.sln index 14092052a..6566aa380 100644 --- a/CefSharp3.sln +++ b/CefSharp3.sln @@ -89,8 +89,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CefSharp.Wpf.HwndHost.Examp EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|arm64 = Debug|arm64 Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 + Release|arm64 = Release|arm64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection @@ -98,115 +100,171 @@ Global {A4394E7B-1155-43A6-989E-8AB72DDDC9E4}.Debug|Win32.ActiveCfg = Debug|Any CPU {A4394E7B-1155-43A6-989E-8AB72DDDC9E4}.Debug|Win32.Build.0 = Debug|Any CPU {A4394E7B-1155-43A6-989E-8AB72DDDC9E4}.Debug|x64.ActiveCfg = Debug|Any CPU + {A4394E7B-1155-43A6-989E-8AB72DDDC9E4}.Debug|arm64.ActiveCfg = Debug|Any CPU {A4394E7B-1155-43A6-989E-8AB72DDDC9E4}.Debug|x64.Build.0 = Debug|Any CPU + {A4394E7B-1155-43A6-989E-8AB72DDDC9E4}.Debug|arm64.Build.0 = Debug|Any CPU {A4394E7B-1155-43A6-989E-8AB72DDDC9E4}.Release|Win32.ActiveCfg = Release|Any CPU {A4394E7B-1155-43A6-989E-8AB72DDDC9E4}.Release|Win32.Build.0 = Release|Any CPU {A4394E7B-1155-43A6-989E-8AB72DDDC9E4}.Release|x64.ActiveCfg = Release|Any CPU + {A4394E7B-1155-43A6-989E-8AB72DDDC9E4}.Release|arm64.ActiveCfg = Release|Any CPU {A4394E7B-1155-43A6-989E-8AB72DDDC9E4}.Release|x64.Build.0 = Release|Any CPU + {A4394E7B-1155-43A6-989E-8AB72DDDC9E4}.Release|arm64.Build.0 = Release|Any CPU {4828DAEC-EF99-4553-B674-4374F77C6D66}.Debug|Win32.ActiveCfg = Debug|x86 {4828DAEC-EF99-4553-B674-4374F77C6D66}.Debug|Win32.Build.0 = Debug|x86 {4828DAEC-EF99-4553-B674-4374F77C6D66}.Debug|x64.ActiveCfg = Debug|x64 + {4828DAEC-EF99-4553-B674-4374F77C6D66}.Debug|arm64.ActiveCfg = Debug|arm64 {4828DAEC-EF99-4553-B674-4374F77C6D66}.Debug|x64.Build.0 = Debug|x64 + {4828DAEC-EF99-4553-B674-4374F77C6D66}.Debug|arm64.Build.0 = Debug|arm64 {4828DAEC-EF99-4553-B674-4374F77C6D66}.Release|Win32.ActiveCfg = Release|x86 {4828DAEC-EF99-4553-B674-4374F77C6D66}.Release|Win32.Build.0 = Release|x86 {4828DAEC-EF99-4553-B674-4374F77C6D66}.Release|x64.ActiveCfg = Release|x64 + {4828DAEC-EF99-4553-B674-4374F77C6D66}.Release|arm64.ActiveCfg = Release|arm64 {4828DAEC-EF99-4553-B674-4374F77C6D66}.Release|x64.Build.0 = Release|x64 + {4828DAEC-EF99-4553-B674-4374F77C6D66}.Release|arm64.Build.0 = Release|arm64 {E6CB3790-F267-4AC7-892C-2620737682CA}.Debug|Win32.ActiveCfg = Debug|Any CPU {E6CB3790-F267-4AC7-892C-2620737682CA}.Debug|Win32.Build.0 = Debug|Any CPU {E6CB3790-F267-4AC7-892C-2620737682CA}.Debug|x64.ActiveCfg = Debug|Any CPU + {E6CB3790-F267-4AC7-892C-2620737682CA}.Debug|arm64.ActiveCfg = Debug|Any CPU {E6CB3790-F267-4AC7-892C-2620737682CA}.Debug|x64.Build.0 = Debug|Any CPU + {E6CB3790-F267-4AC7-892C-2620737682CA}.Debug|arm64.Build.0 = Debug|Any CPU {E6CB3790-F267-4AC7-892C-2620737682CA}.Release|Win32.ActiveCfg = Release|Any CPU {E6CB3790-F267-4AC7-892C-2620737682CA}.Release|Win32.Build.0 = Release|Any CPU {E6CB3790-F267-4AC7-892C-2620737682CA}.Release|x64.ActiveCfg = Release|Any CPU + {E6CB3790-F267-4AC7-892C-2620737682CA}.Release|arm64.ActiveCfg = Release|Any CPU {E6CB3790-F267-4AC7-892C-2620737682CA}.Release|x64.Build.0 = Release|Any CPU + {E6CB3790-F267-4AC7-892C-2620737682CA}.Release|arm64.Build.0 = Release|Any CPU {23EE5140-2C2C-4B53-A954-10B08DCA6BD6}.Debug|Win32.ActiveCfg = Debug|x86 {23EE5140-2C2C-4B53-A954-10B08DCA6BD6}.Debug|Win32.Build.0 = Debug|x86 {23EE5140-2C2C-4B53-A954-10B08DCA6BD6}.Debug|x64.ActiveCfg = Debug|x64 + {23EE5140-2C2C-4B53-A954-10B08DCA6BD6}.Debug|arm64.ActiveCfg = Debug|arm64 {23EE5140-2C2C-4B53-A954-10B08DCA6BD6}.Debug|x64.Build.0 = Debug|x64 + {23EE5140-2C2C-4B53-A954-10B08DCA6BD6}.Debug|arm64.Build.0 = Debug|arm64 {23EE5140-2C2C-4B53-A954-10B08DCA6BD6}.Release|Win32.ActiveCfg = Release|x86 {23EE5140-2C2C-4B53-A954-10B08DCA6BD6}.Release|Win32.Build.0 = Release|x86 {23EE5140-2C2C-4B53-A954-10B08DCA6BD6}.Release|x64.ActiveCfg = Release|x64 + {23EE5140-2C2C-4B53-A954-10B08DCA6BD6}.Release|arm64.ActiveCfg = Release|arm64 {23EE5140-2C2C-4B53-A954-10B08DCA6BD6}.Release|x64.Build.0 = Release|x64 + {23EE5140-2C2C-4B53-A954-10B08DCA6BD6}.Release|arm64.Build.0 = Release|arm64 {882505AD-246D-402A-8414-347EFB8E2C8D}.Debug|Win32.ActiveCfg = Debug|Any CPU {882505AD-246D-402A-8414-347EFB8E2C8D}.Debug|Win32.Build.0 = Debug|Any CPU {882505AD-246D-402A-8414-347EFB8E2C8D}.Debug|x64.ActiveCfg = Debug|Any CPU + {882505AD-246D-402A-8414-347EFB8E2C8D}.Debug|arm64.ActiveCfg = Debug|Any CPU {882505AD-246D-402A-8414-347EFB8E2C8D}.Debug|x64.Build.0 = Debug|Any CPU + {882505AD-246D-402A-8414-347EFB8E2C8D}.Debug|arm64.Build.0 = Debug|Any CPU {882505AD-246D-402A-8414-347EFB8E2C8D}.Release|Win32.ActiveCfg = Release|Any CPU {882505AD-246D-402A-8414-347EFB8E2C8D}.Release|Win32.Build.0 = Release|Any CPU {882505AD-246D-402A-8414-347EFB8E2C8D}.Release|x64.ActiveCfg = Release|Any CPU + {882505AD-246D-402A-8414-347EFB8E2C8D}.Release|arm64.ActiveCfg = Release|Any CPU {882505AD-246D-402A-8414-347EFB8E2C8D}.Release|x64.Build.0 = Release|Any CPU + {882505AD-246D-402A-8414-347EFB8E2C8D}.Release|arm64.Build.0 = Release|Any CPU {C043FFF7-5F71-4FFC-989A-E09E18548589}.Debug|Win32.ActiveCfg = Debug|x86 {C043FFF7-5F71-4FFC-989A-E09E18548589}.Debug|Win32.Build.0 = Debug|x86 {C043FFF7-5F71-4FFC-989A-E09E18548589}.Debug|x64.ActiveCfg = Debug|x64 + {C043FFF7-5F71-4FFC-989A-E09E18548589}.Debug|arm64.ActiveCfg = Debug|arm64 {C043FFF7-5F71-4FFC-989A-E09E18548589}.Debug|x64.Build.0 = Debug|x64 + {C043FFF7-5F71-4FFC-989A-E09E18548589}.Debug|arm64.Build.0 = Debug|arm64 {C043FFF7-5F71-4FFC-989A-E09E18548589}.Release|Win32.ActiveCfg = Release|x86 {C043FFF7-5F71-4FFC-989A-E09E18548589}.Release|Win32.Build.0 = Release|x86 {C043FFF7-5F71-4FFC-989A-E09E18548589}.Release|x64.ActiveCfg = Release|x64 + {C043FFF7-5F71-4FFC-989A-E09E18548589}.Release|arm64.ActiveCfg = Release|arm64 {C043FFF7-5F71-4FFC-989A-E09E18548589}.Release|x64.Build.0 = Release|x64 + {C043FFF7-5F71-4FFC-989A-E09E18548589}.Release|arm64.Build.0 = Release|arm64 {7B495581-2271-4F41-9476-ACB86E8C864F}.Debug|Win32.ActiveCfg = Debug|Win32 {7B495581-2271-4F41-9476-ACB86E8C864F}.Debug|Win32.Build.0 = Debug|Win32 {7B495581-2271-4F41-9476-ACB86E8C864F}.Debug|x64.ActiveCfg = Debug|x64 + {7B495581-2271-4F41-9476-ACB86E8C864F}.Debug|arm64.ActiveCfg = Debug|arm64 {7B495581-2271-4F41-9476-ACB86E8C864F}.Debug|x64.Build.0 = Debug|x64 + {7B495581-2271-4F41-9476-ACB86E8C864F}.Debug|arm64.Build.0 = Debug|arm64 {7B495581-2271-4F41-9476-ACB86E8C864F}.Release|Win32.ActiveCfg = Release|Win32 {7B495581-2271-4F41-9476-ACB86E8C864F}.Release|Win32.Build.0 = Release|Win32 {7B495581-2271-4F41-9476-ACB86E8C864F}.Release|x64.ActiveCfg = Release|x64 + {7B495581-2271-4F41-9476-ACB86E8C864F}.Release|arm64.ActiveCfg = Release|arm64 {7B495581-2271-4F41-9476-ACB86E8C864F}.Release|x64.Build.0 = Release|x64 + {7B495581-2271-4F41-9476-ACB86E8C864F}.Release|arm64.Build.0 = Release|arm64 {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Debug|Win32.ActiveCfg = Debug|Any CPU {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Debug|Win32.Build.0 = Debug|Any CPU {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Debug|x64.ActiveCfg = Debug|Any CPU + {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Debug|arm64.ActiveCfg = Debug|Any CPU {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Debug|x64.Build.0 = Debug|Any CPU + {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Debug|arm64.Build.0 = Debug|Any CPU {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Release|Win32.ActiveCfg = Release|Any CPU {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Release|Win32.Build.0 = Release|Any CPU {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Release|x64.ActiveCfg = Release|Any CPU + {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Release|arm64.ActiveCfg = Release|Any CPU {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Release|x64.Build.0 = Release|Any CPU + {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Release|arm64.Build.0 = Release|Any CPU {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Debug|Win32.ActiveCfg = Debug|Win32 {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Debug|Win32.Build.0 = Debug|Win32 {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Debug|x64.ActiveCfg = Debug|x64 + {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Debug|arm64.ActiveCfg = Debug|arm64 {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Debug|x64.Build.0 = Debug|x64 + {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Debug|arm64.Build.0 = Debug|arm64 {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Release|Win32.ActiveCfg = Release|Win32 {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Release|Win32.Build.0 = Release|Win32 {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Release|x64.ActiveCfg = Release|x64 + {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Release|arm64.ActiveCfg = Release|arm64 {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Release|x64.Build.0 = Release|x64 + {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Release|arm64.Build.0 = Release|arm64 {483B158D-F57D-49D9-9046-31E6A73F8A53}.Debug|Win32.ActiveCfg = Debug|Any CPU {483B158D-F57D-49D9-9046-31E6A73F8A53}.Debug|Win32.Build.0 = Debug|Any CPU {483B158D-F57D-49D9-9046-31E6A73F8A53}.Debug|x64.ActiveCfg = Debug|Any CPU + {483B158D-F57D-49D9-9046-31E6A73F8A53}.Debug|arm64.ActiveCfg = Debug|Any CPU {483B158D-F57D-49D9-9046-31E6A73F8A53}.Debug|x64.Build.0 = Debug|Any CPU + {483B158D-F57D-49D9-9046-31E6A73F8A53}.Debug|arm64.Build.0 = Debug|Any CPU {483B158D-F57D-49D9-9046-31E6A73F8A53}.Release|Win32.ActiveCfg = Release|Any CPU {483B158D-F57D-49D9-9046-31E6A73F8A53}.Release|Win32.Build.0 = Release|Any CPU {483B158D-F57D-49D9-9046-31E6A73F8A53}.Release|x64.ActiveCfg = Release|Any CPU + {483B158D-F57D-49D9-9046-31E6A73F8A53}.Release|arm64.ActiveCfg = Release|Any CPU {483B158D-F57D-49D9-9046-31E6A73F8A53}.Release|x64.Build.0 = Release|Any CPU + {483B158D-F57D-49D9-9046-31E6A73F8A53}.Release|arm64.Build.0 = Release|Any CPU {A4DEB90C-A529-4A93-ACE3-226A39EFCB00}.Debug|Win32.ActiveCfg = Debug|x86 {A4DEB90C-A529-4A93-ACE3-226A39EFCB00}.Debug|Win32.Build.0 = Debug|x86 {A4DEB90C-A529-4A93-ACE3-226A39EFCB00}.Debug|x64.ActiveCfg = Debug|x64 + {A4DEB90C-A529-4A93-ACE3-226A39EFCB00}.Debug|arm64.ActiveCfg = Debug|arm64 {A4DEB90C-A529-4A93-ACE3-226A39EFCB00}.Debug|x64.Build.0 = Debug|x64 + {A4DEB90C-A529-4A93-ACE3-226A39EFCB00}.Debug|arm64.Build.0 = Debug|arm64 {A4DEB90C-A529-4A93-ACE3-226A39EFCB00}.Release|Win32.ActiveCfg = Release|x86 {A4DEB90C-A529-4A93-ACE3-226A39EFCB00}.Release|Win32.Build.0 = Release|x86 {A4DEB90C-A529-4A93-ACE3-226A39EFCB00}.Release|x64.ActiveCfg = Release|x64 + {A4DEB90C-A529-4A93-ACE3-226A39EFCB00}.Release|arm64.ActiveCfg = Release|arm64 {A4DEB90C-A529-4A93-ACE3-226A39EFCB00}.Release|x64.Build.0 = Release|x64 + {A4DEB90C-A529-4A93-ACE3-226A39EFCB00}.Release|arm64.Build.0 = Release|arm64 {7A4D5447-183B-4A11-8E63-9848991B46FF}.Debug|Win32.ActiveCfg = Debug|x86 {7A4D5447-183B-4A11-8E63-9848991B46FF}.Debug|Win32.Build.0 = Debug|x86 {7A4D5447-183B-4A11-8E63-9848991B46FF}.Debug|x64.ActiveCfg = Debug|x64 + {7A4D5447-183B-4A11-8E63-9848991B46FF}.Debug|arm64.ActiveCfg = Debug|arm64 {7A4D5447-183B-4A11-8E63-9848991B46FF}.Debug|x64.Build.0 = Debug|x64 + {7A4D5447-183B-4A11-8E63-9848991B46FF}.Debug|arm64.Build.0 = Debug|arm64 {7A4D5447-183B-4A11-8E63-9848991B46FF}.Release|Win32.ActiveCfg = Release|x86 {7A4D5447-183B-4A11-8E63-9848991B46FF}.Release|Win32.Build.0 = Release|x86 {7A4D5447-183B-4A11-8E63-9848991B46FF}.Release|x64.ActiveCfg = Release|x64 + {7A4D5447-183B-4A11-8E63-9848991B46FF}.Release|arm64.ActiveCfg = Release|arm64 {7A4D5447-183B-4A11-8E63-9848991B46FF}.Release|x64.Build.0 = Release|x64 + {7A4D5447-183B-4A11-8E63-9848991B46FF}.Release|arm64.Build.0 = Release|arm64 {B760B002-D277-4525-9F63-67ED2065034A}.Debug|Win32.ActiveCfg = Debug|Any CPU {B760B002-D277-4525-9F63-67ED2065034A}.Debug|Win32.Build.0 = Debug|Any CPU {B760B002-D277-4525-9F63-67ED2065034A}.Debug|x64.ActiveCfg = Debug|Any CPU + {B760B002-D277-4525-9F63-67ED2065034A}.Debug|arm64.ActiveCfg = Debug|Any CPU {B760B002-D277-4525-9F63-67ED2065034A}.Debug|x64.Build.0 = Debug|Any CPU + {B760B002-D277-4525-9F63-67ED2065034A}.Debug|arm64.Build.0 = Debug|Any CPU {B760B002-D277-4525-9F63-67ED2065034A}.Release|Win32.ActiveCfg = Release|Any CPU {B760B002-D277-4525-9F63-67ED2065034A}.Release|Win32.Build.0 = Release|Any CPU {B760B002-D277-4525-9F63-67ED2065034A}.Release|x64.ActiveCfg = Release|Any CPU + {B760B002-D277-4525-9F63-67ED2065034A}.Release|arm64.ActiveCfg = Release|Any CPU {B760B002-D277-4525-9F63-67ED2065034A}.Release|x64.Build.0 = Release|Any CPU + {B760B002-D277-4525-9F63-67ED2065034A}.Release|arm64.Build.0 = Release|Any CPU {B019C1F9-3015-4B7B-B4A4-B07DF4220CD3}.Debug|Win32.ActiveCfg = Debug|x86 {B019C1F9-3015-4B7B-B4A4-B07DF4220CD3}.Debug|Win32.Build.0 = Debug|x86 {B019C1F9-3015-4B7B-B4A4-B07DF4220CD3}.Debug|x64.ActiveCfg = Debug|x64 + {B019C1F9-3015-4B7B-B4A4-B07DF4220CD3}.Debug|arm64.ActiveCfg = Debug|arm64 {B019C1F9-3015-4B7B-B4A4-B07DF4220CD3}.Debug|x64.Build.0 = Debug|x64 + {B019C1F9-3015-4B7B-B4A4-B07DF4220CD3}.Debug|arm64.Build.0 = Debug|arm64 {B019C1F9-3015-4B7B-B4A4-B07DF4220CD3}.Release|Win32.ActiveCfg = Release|x86 + {B019C1F9-3015-4B7B-B4A4-B07DF4220CD3}.Release|arm64.ActiveCfg = Release|arm64 {B019C1F9-3015-4B7B-B4A4-B07DF4220CD3}.Release|Win32.Build.0 = Release|x86 {B019C1F9-3015-4B7B-B4A4-B07DF4220CD3}.Release|x64.ActiveCfg = Release|x64 {B019C1F9-3015-4B7B-B4A4-B07DF4220CD3}.Release|x64.Build.0 = Release|x64 + {B019C1F9-3015-4B7B-B4A4-B07DF4220CD3}.Release|arm64.Build.0 = Release|arm64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/NuGet/CefSharp.Common.nuspec b/NuGet/CefSharp.Common.nuspec index 5fdcf8ee3..c50891bf2 100644 --- a/NuGet/CefSharp.Common.nuspec +++ b/NuGet/CefSharp.Common.nuspec @@ -16,6 +16,7 @@ + @@ -38,6 +39,10 @@ + + + + @@ -49,6 +54,11 @@ + + + + + diff --git a/NuGet/CefSharp.Common.props b/NuGet/CefSharp.Common.props index 60d131fbb..f9b3b2f87 100644 --- a/NuGet/CefSharp.Common.props +++ b/NuGet/CefSharp.Common.props @@ -4,6 +4,7 @@ + @@ -13,5 +14,6 @@ + diff --git a/NuGet/CefSharp.Common.targets b/NuGet/CefSharp.Common.targets index 203ba2142..883c593fc 100644 --- a/NuGet/CefSharp.Common.targets +++ b/NuGet/CefSharp.Common.targets @@ -186,6 +186,22 @@ + + + + $(CefSharpTargetDir)%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + Included + false + + + $(CefSharpTargetDir)%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + Included + false + + + @@ -267,6 +283,24 @@ + + + + $(CefSharpTargetDir)%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + Included + false + true + + + $(CefSharpTargetDir)%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + Included + false + true + + + @@ -388,6 +422,7 @@ + @@ -411,6 +446,17 @@ + + + + + + + + + + + @@ -423,6 +469,7 @@ $(TargetDir)$(CefSharpTargetDir) $(TargetDir)$(CefSharpTargetDir) + $(TargetDir)$(CefSharpTargetDir) $(CefRedist32TargetDir)x86\ $(CefRedist64TargetDir)x64\ @@ -430,6 +477,7 @@ <_CefSharpCommonManagedDll Include="$(MSBuildThisFileDirectory)..\lib\net462\CefSharp.dll" /> <_CefSharpCommonBinaries32 Include="$(MSBuildThisFileDirectory)..\CefSharp\x86\*.*" /> <_CefSharpCommonBinaries64 Include="$(MSBuildThisFileDirectory)..\CefSharp\x64\*.*" /> + <_CefSharpCommonBinariesArm64 Include="$(MSBuildThisFileDirectory)..\CefSharp\arm64\*.*" /> diff --git a/build.ps1 b/build.ps1 index d7351e688..d9b33b8ac 100644 --- a/build.ps1 +++ b/build.ps1 @@ -116,38 +116,83 @@ function BuildSolution "/verbosity:normal" ) - $StartInfo = New-Object System.Diagnostics.ProcessStartInfo - $StartInfo.FileName = "msbuild.exe" - $StartInfo.Arguments = $Arguments + &msbuild.exe @Arguments - $StartInfo.EnvironmentVariables.Clear() + if($LASTEXITCODE -ne 0) + { + Die "Build failed" + } + + Write-Diagnostic "Compile succeeded targeting $Toolchain using configuration $Configuration for platform $Platform" +} + +function Get-HostArchitecture +{ + $processorArchitecture = $env:PROCESSOR_ARCHITECTURE - Get-ChildItem -Path env:* | ForEach-Object { - $StartInfo.EnvironmentVariables.Add($_.Name, $_.Value) + if ([string]::IsNullOrWhiteSpace($processorArchitecture)) + { + Die "Unable to determine host processor architecture." } - $StartInfo.UseShellExecute = $false - $StartInfo.CreateNoWindow = $false - $StartInfo.RedirectStandardError = $true - $StartInfo.RedirectStandardOutput = $true + switch ($processorArchitecture.ToLowerInvariant()) + { + 'amd64' + { + return 'x64' + } + 'arm64' + { + return 'arm64' + } + 'x86' + { + return 'x86' + } + default + { + Die "Unsupported host processor architecture '$processorArchitecture'." + } + } +} - $Process = New-Object System.Diagnostics.Process - $Process.StartInfo = $startInfo - $Process.Start() - - $stdout = $Process.StandardOutput.ReadToEnd() - $stderr = $Process.StandardError.ReadToEnd() - - $Process.WaitForExit() +function Get-VCVarsAllArch +{ + param( + [Parameter(Position = 0, ValueFromPipeline = $true)] + [ValidateSet('x86', 'x64', 'arm64')] + [string] $TargetArchitecture + ) - if($Process.ExitCode -ne 0) + $hostArchitecture = Get-HostArchitecture + + if ($hostArchitecture -eq $TargetArchitecture) { - Write-Host "stdout: $stdout" - Write-Host "stderr: $stderr" - Die "Build failed" + return $TargetArchitecture } - Write-Diagnostic "Compile succeeded targeting $Toolchain using configuration $Configuration for platform $Platform" + return "$hostArchitecture`_$TargetArchitecture" +} + +function Ensure-BuildEnvironment +{ + param( + [Parameter(Position = 0, ValueFromPipeline = $true)] + [string] $VCVarsAll, + + [Parameter(Position = 1, ValueFromPipeline = $true)] + [ValidateSet('x86', 'x64', 'arm64')] + [string] $TargetArchitecture + ) + + $vcVarsAllArch = Get-VCVarsAllArch $TargetArchitecture + + if ($env:CEFSHARP_BUILD_BOOTSTRAP_ARCH -ne $vcVarsAllArch) + { + Write-Diagnostic "Bootstrapping Visual Studio environment for host-target $vcVarsAllArch" + Invoke-BatchFile $VCVarsAll $vcVarsAllArch + $env:CEFSHARP_BUILD_BOOTSTRAP_ARCH = $vcVarsAllArch + } } function VSX @@ -216,24 +261,9 @@ function VSX Die "Unable to find $VCVarsAll" } - # Only configure build environment once - if($null -eq $env:CEFSHARP_BUILD_IS_BOOTSTRAPPED) - { - $VCVarsAllArch = $ARCHES[0] - if ($VCVarsAllArch -eq "arm64") - { - #TODO: Add support for compiling from an arm64 host - # Detect host and determine if we are native or cross compile - # currently only cross compiling arm64 from x64 host - $VCVarsAllArch = 'x64_arm64' - } - - Invoke-BatchFile $VCVarsAll $VCVarsAllArch - $env:CEFSHARP_BUILD_IS_BOOTSTRAPPED = $true - } - foreach ($arch in $ARCHES) { + Ensure-BuildEnvironment $VCVarsAll $arch BuildSolution "$Toolchain" 'Release' $arch $VisualStudioVersion } @@ -492,12 +522,16 @@ if($IsNetCoreBuild) } else { - $ARCHES.Remove("arm64") $CefSln = Join-Path $WorkingDir 'CefSharp3.sln' $NugetPackagePath = "nuget"; $NupkgFiles = @('CefSharp.Common.nuspec', 'CefSharp.WinForms.nuspec', 'CefSharp.Wpf.nuspec', 'CefSharp.OffScreen.nuspec') $VCXProjPackageConfigFiles = @('CefSharp.Core.Runtime\packages.CefSharp.Core.Runtime.config', 'CefSharp.BrowserSubprocess.Core\packages.CefSharp.BrowserSubprocess.Core.config'); - $SupportedArches.AddRange(@("x86", "x64")); + $SupportedArches.AddRange(@("x86", "x64", "arm64")); +} + +if(-not $IsNetCoreBuild -and $ARCHES.Contains("arm64") -and $Target -eq "vs2019") +{ + Die "NetFramework arm64 builds require VS2022/v143. Use -Target vs2022 when -BuildArches includes arm64." } # Extract the current CEF Redist version from the CefSharp.Core.Runtime\packages.CefSharp.Core.Runtime.config file