diff --git a/CefSharp/DependencyChecker.cs b/CefSharp/DependencyChecker.cs
index 25e8c09d89..79475ac79b 100644
--- a/CefSharp/DependencyChecker.cs
+++ b/CefSharp/DependencyChecker.cs
@@ -5,7 +5,13 @@
using System;
using System.Collections.Generic;
using System.IO;
+#if NETCOREAPP
+using System.Linq;
+#endif
using System.Reflection;
+#if NETCOREAPP
+using System.Runtime.InteropServices;
+#endif
using System.Text;
namespace CefSharp
@@ -21,6 +27,11 @@ public static class DependencyChecker
///
public const string LocalesPackFile = @"locales\en-US.pak";
+ ///
+ /// File name of the Direct3D Compiler DLL.
+ ///
+ private const string D3DCompilerDll = "d3dcompiler_47.dll";
+
///
/// List of Cef Dependencies
///
@@ -60,7 +71,8 @@ public static class DependencyChecker
// Note: Without these components HTML5 accelerated content like 2D canvas, 3D CSS and WebGL will not function.
"libEGL.dll",
"libGLESv2.dll",
- "d3dcompiler_47.dll",
+ // The D3D Compiler isn't included in the win-arm64 redist; we remove it in the static constructor.
+ D3DCompilerDll,
//Crashpad support
"chrome_elf.dll"
};
@@ -99,6 +111,17 @@ public static class DependencyChecker
#endif
};
+#if NETCOREAPP
+ static DependencyChecker()
+ {
+ // win-arm64 doesn't ship with a copy of the D3D Compiler, it's included with the OS.
+ if (RuntimeInformation.ProcessArchitecture is Architecture.Arm64)
+ {
+ CefOptionalDependencies = CefOptionalDependencies.Where(x => x != D3DCompilerDll).ToArray();
+ }
+ }
+#endif
+
///
/// CheckDependencies iterates through the list of Cef and CefSharp dependencines
/// relative to the path provided and returns a list of missing ones