Skip to content

Update min required Visual C++ runtime from 2019 to 2022 #4640

Closed

Description

@amaitland

When CEF starts shipping with C++20 features in the headers/wrapper then we will need to upgrade to VS2022 to build targeting VC++ 2022. Upstream issue chromiumembedded/cef#3611

According to C++20 Support Comes To C++/CLI we should be able to upgrade to VS2022 to access the new features.

There are some caveats, so it will depend on which features CEF uses.

Activity

  1. self-assigned this
    on Dec 1, 2023
  2. pinned this issue on Dec 1, 2023
  3. amaitland commented on Jun 29, 2025

    @amaitland
    MemberAuthor

    The wrapper no longer builds with VS2019, it's possible that we can get that fixed in CEF. It might just be time to upgrade to VS2022.

  4. amaitland commented on Jun 29, 2025

    @amaitland
    MemberAuthor

    Have asked at https://www.magpcss.org/ceforum/viewtopic.php?f=6&t=20314

    Will see what the CEF maintainer has to say about supporting with VS2019

  5. added this to the 138.0.x milestone on Jul 1, 2025
  6. amaitland commented on Jul 1, 2025

    @amaitland
    MemberAuthor

    Have upgraded to VS2022, builds are passing again. So it looks like we'll need to upgrade.

  7. amaitland commented on Jul 9, 2025

    @amaitland
    MemberAuthor

    VC++ 2022 is now required starting in M138

  8. amaitland commented on Jul 9, 2025

    @amaitland
    MemberAuthor

    For those that have the Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017, 2019, and 2022 installed then no change will be required.

    For those that have an older VC++ 2015/2017/2019 installation there are a two options:

    Local Deployment
    You can bin deploy the VC++ 2022 dlls alongside your application.

    The following should copy the VC++ runtime into the bin/publish folders when run under Visual Studio (won't work from the command line). NOTE: ClickOnce will need different targets to add the files.

    UNTESTED These will need to be tested as they were originally written for VS2019

    For x86/x64:

      <Import Project="$(DevEnvDir)..\..\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.props"/>
      
      <Target Name="IncludeVisualCppInOutFolder" AfterTargets="ResolveReferences">
        <PropertyGroup>
          <_VCRedistLocation>$(DevEnvDir)..\..\VC\Redist\MSVC\$(VCToolsRedistVersion)\$(PlatformTarget)\Microsoft.VC143.CRT</_VCRedistLocation>
        </PropertyGroup>
        <Message Importance="high" Text="_VCRedistLocation = $(_VCRedistLocation)" />
        <ItemGroup>
          <ReferenceCopyLocalPaths Include="$(_VCRedistLocation)\**\*" />
        </ItemGroup>
      </Target>

    For AnyCPU:

    <Import Project="$(DevEnvDir)..\..\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.props"/>
    
    <Target Name="IncludeVisualCppInOutFolder" AfterTargets="ResolveReferences">
        <PropertyGroup>
          <_VCRedistLocation32bit>$(DevEnvDir)..\..\VC\Redist\MSVC\$(VCToolsRedistVersion)\x86\Microsoft.VC143.CRT</_VCRedistLocation32bit>
          <_VCRedistLocation64bit>$(DevEnvDir)..\..\VC\Redist\MSVC\$(VCToolsRedistVersion)\x64\Microsoft.VC143.CRT</_VCRedistLocation64bit>
        </PropertyGroup>
        <Message Importance="high" Text="_VCRedistLocation32bit = $(_VCRedistLocation32bit)" />
        <Message Importance="high" Text="_VCRedistLocation64bit = $(_VCRedistLocation64bit)" />
        <ItemGroup>
          <_VCRedistFiles32bit Include="$(_VCRedistLocation32bit)\**\*"/>
          <_VCRedistFiles64bit Include="$(_VCRedistLocation64bit)\**\*"/>
          <ReferenceCopyLocalPaths Include="@(_VCRedistFiles32bit)" DestinationSubDirectory="x86\" />
          <ReferenceCopyLocalPaths Include="@(_VCRedistFiles64bit)" DestinationSubDirectory="x64\" />
        </ItemGroup>
    </Target>

    Visual C++ Runtime
    Details on deploying/redistributing the Visual C++ 2022 runtime .

    Universal CRT
    For those looking for more detail on the Universal CRT

  9. unpinned this issue on Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions