Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|arm64">
<Configuration>Debug</Configuration>
<Platform>arm64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
Expand All @@ -21,6 +25,10 @@
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|arm64">
<Configuration>Release</Configuration>
<Platform>arm64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}</ProjectGuid>
Expand All @@ -43,6 +51,12 @@
<CLRSupport>true</CLRSupport>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CLRSupport>true</CLRSupport>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
Expand All @@ -55,6 +69,12 @@
<CLRSupport>true</CLRSupport>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CLRSupport>true</CLRSupport>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
Expand All @@ -64,12 +84,18 @@
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
Expand All @@ -87,6 +113,14 @@
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
<SourcePath>$(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath)</SourcePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm64'">
<LinkIncremental>true</LinkIncremental>
<LinkKeyFile>..\CefSharp.snk</LinkKeyFile>
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<OutDir>bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
<SourcePath>$(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath)</SourcePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<LinkKeyFile>..\CefSharp.snk</LinkKeyFile>
Expand All @@ -101,6 +135,13 @@
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
<SourcePath>$(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath)</SourcePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm64'">
<LinkIncremental>false</LinkIncremental>
<LinkKeyFile>..\CefSharp.snk</LinkKeyFile>
<OutDir>bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
<SourcePath>$(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath)</SourcePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
Expand Down Expand Up @@ -138,6 +179,24 @@
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>$(SolutionDir)packages\$(CefSdkVer)\CEF;%(AdditionalIncludeDirectories);$(ProjectDir)</AdditionalIncludeDirectories>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>Use</PrecompiledHeader>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<LanguageStandard>stdcpp20</LanguageStandard>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>libcef.lib;libcef_dll_wrapper.lib;User32.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration);$(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration)\VS$(VisualStudioProductVersion);</AdditionalLibraryDirectories>
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
Expand Down Expand Up @@ -171,6 +230,22 @@
<AdditionalLibraryDirectories>$(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration);$(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration)\VS$(VisualStudioProductVersion)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>$(SolutionDir)packages\$(CefSdkVer)\CEF;%(AdditionalIncludeDirectories);$(ProjectDir)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>Use</PrecompiledHeader>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<LanguageStandard>stdcpp20</LanguageStandard>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>libcef.lib;libcef_dll_wrapper.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration);$(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration)\VS$(VisualStudioProductVersion)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down Expand Up @@ -245,8 +320,10 @@
<ClCompile Include="Stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|arm64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|arm64'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="TypeUtils.cpp" />
<ClCompile Include="Serialization\V8Serialization.cpp" />
Expand Down
9 changes: 5 additions & 4 deletions CefSharp.BrowserSubprocess/CefSharp.BrowserSubprocess.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net462</TargetFramework>
<OutputType>WinExe</OutputType>
<Platforms>x86;x64</Platforms>
<Platforms>x86;x64;arm64</Platforms>
<PlatformTarget Condition="'$(Platform)' == 'arm64'">arm64</PlatformTarget>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\CefSharp.snk</AssemblyOriginatorKeyFile>
<ApplicationManifest>app.manifest</ApplicationManifest>
<StartupObject>CefSharp.BrowserSubprocess.Program</StartupObject>
<RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
Expand Down Expand Up @@ -41,6 +42,6 @@
</PackageReference>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="if $(PlatformName) == x86 (&#xD;&#xA; call &quot;$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars32.bat&quot;&#xD;&#xA; editbin /largeaddressaware /TSAWARE &quot;$(TargetPath)&quot; &#xD;&#xA; sn -R &quot;$(TargetPath)&quot; &quot;$(ProjectDir)..\CefSharp.snk&quot;&#xD;&#xA;) else (&#xD;&#xA; call &quot;$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars64.bat&quot;&#xD;&#xA; editbin /TSAWARE /STACK:8388608 &quot;$(TargetPath)&quot;&#xD;&#xA; sn -R &quot;$(TargetPath)&quot; &quot;$(ProjectDir)..\CefSharp.snk&quot;&#xD;&#xA;)" />
<Exec Command="if $(PlatformName) == x86 (&#xD;&#xA; call &quot;$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars32.bat&quot;&#xD;&#xA; editbin /largeaddressaware /TSAWARE &quot;$(TargetPath)&quot; &#xD;&#xA; sn -R &quot;$(TargetPath)&quot; &quot;$(ProjectDir)..\CefSharp.snk&quot;&#xD;&#xA;) else if $(PlatformName) == x64 (&#xD;&#xA; call &quot;$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars64.bat&quot;&#xD;&#xA; editbin /TSAWARE /STACK:8388608 &quot;$(TargetPath)&quot;&#xD;&#xA; sn -R &quot;$(TargetPath)&quot; &quot;$(ProjectDir)..\CefSharp.snk&quot;&#xD;&#xA;) else if $(PlatformName) == arm64 (&#xD;&#xA; call &quot;$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvarsamd64_arm64.bat&quot;&#xD;&#xA; editbin /TSAWARE /STACK:8388608 &quot;$(TargetPath)&quot;&#xD;&#xA; sn -R &quot;$(TargetPath)&quot; &quot;$(ProjectDir)..\CefSharp.snk&quot;&#xD;&#xA;)" />

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to verify the output with dumpbin

@coderabbitai coderabbitai Bot Jun 26, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

For Visual Studio 2022 C++ command-line environments, what vcvars batch file should be used when the host machine is Windows ARM64 and the target architecture is ARM64?

💡 Result:

When the host machine is Windows ARM64 and you are targeting ARM64, the recommended approach is to use the vcvarsall.bat batch file with the arm64 argument [1]. To initialize the environment, execute the following command in your command-line shell: "C:\Program Files\Microsoft Visual Studio\2022[Edition]\VC\Auxiliary\Build\vcvarsall.bat" arm64 Replace [Edition] with your specific Visual Studio 2022 edition (e.g., Community, Professional, or Enterprise). Using the arm64 argument invokes the native ARM64-hosted toolchain, which is the correct environment for building ARM64 binaries on an ARM64 machine [2][1]. While some cross-compilation batch files exist for other scenarios (such as vcvarsamd64_arm64.bat for x64-to-ARM64 builds), they are not appropriate when the host is already ARM64, as using an emulated or cross-hosted environment can lead to issues, such as the inability to correctly utilize certain compiler switches like /arm64EC [3][2]. Alternatively, Visual Studio 2022 provides an "ARM64 Developer Command Prompt" shortcut in the Start menu that automatically runs this configuration for you [3].

Citations:


Use the native ARM64 vcvars bootstrap here. vcvarsamd64_arm64.bat is the x64→ARM64 cross-environment; on ARM64-hosted VS this should use vcvarsall.bat arm64 (or branch on host architecture) so editbin and sn run under the native ARM64 toolchain.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CefSharp.BrowserSubprocess/CefSharp.BrowserSubprocess.csproj` at line 45, The
build step in CefSharp.BrowserSubprocess.csproj uses the x64-to-ARM64 cross
toolchain for the arm64 branch, which is incorrect for native ARM64 Visual
Studio environments. Update the Exec command in the browser subprocess project
so the arm64 path uses the native ARM64 vcvars bootstrap (or branches on host
architecture to choose the right vcvars entrypoint) before running editbin and
sn, keeping the existing x86 and x64 behavior unchanged.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is only going to cross compile so that's the priority, native compilation support can be added in a follow up PR.

show proposed change for future reference.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amaitland, makes sense — if CI is only doing x64-hosted cross-compilation for this PR, I’m happy to treat native ARM64-hosted VS support as follow-up work.

For future reference, here’s the shape of the change I had in mind for Line 45, keeping the existing x86/x64 behavior unchanged and only making the arm64 path host-aware:

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
  <Exec Command="if $(PlatformName) == x86 (&`#xD`;&`#xA`;  call &quot;$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars32.bat&quot;&`#xD`;&`#xA`;  editbin /largeaddressaware /TSAWARE &quot;$(TargetPath)&quot;&`#xD`;&`#xA`;  sn -R &quot;$(TargetPath)&quot; &quot;$(ProjectDir)..\CefSharp.snk&quot;&`#xD`;&`#xA`;) else if $(PlatformName) == x64 (&`#xD`;&`#xA`;  call &quot;$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars64.bat&quot;&`#xD`;&`#xA`;  editbin /TSAWARE /STACK:8388608 &quot;$(TargetPath)&quot;&`#xD`;&`#xA`;  sn -R &quot;$(TargetPath)&quot; &quot;$(ProjectDir)..\CefSharp.snk&quot;&`#xD`;&`#xA`;) else if $(PlatformName) == arm64 (&`#xD`;&`#xA`;  if /I &quot;%PROCESSOR_ARCHITECTURE%&quot; == &quot;ARM64&quot; (&`#xD`;&`#xA`;    call &quot;$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvarsall.bat&quot; arm64&`#xD`;&`#xA`;  ) else (&`#xD`;&`#xA`;    call &quot;$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvarsamd64_arm64.bat&quot;&`#xD`;&`#xA`;  )&`#xD`;&`#xA`;  editbin /TSAWARE /STACK:8388608 &quot;$(TargetPath)&quot;&`#xD`;&`#xA`;  sn -R &quot;$(TargetPath)&quot; &quot;$(ProjectDir)..\CefSharp.snk&quot;&`#xD`;&`#xA`;)" />
</Target>

That would preserve the current CI path while also handling native ARM64-hosted developer environments later.

If you want, I can also open a follow-up issue for that so it doesn’t get lost.

</Target>
</Project>
Loading