Repository navigation
Update min required Visual C++ runtime from 2019 to 2022 #4640
Description
Activity
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.
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
Have upgraded to VS2022, builds are passing again. So it looks like we'll need to upgrade.
VC++ 2022 is now required starting in M138
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:
- Install the Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017, 2019, and 2022 runtime
- Include the
VC++ 2022dlls with your application (Local Deployment).
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 .
- https://docs.microsoft.com/en-us/cpp/windows/deployment-in-visual-cpp?view=msvc-160#local-deployment
- https://docs.microsoft.com/en-us/cpp/windows/redistributing-visual-cpp-files?view=msvc-160
- https://docs.microsoft.com/en-us/cpp/windows/determining-which-dlls-to-redistribute?view=msvc-160
Universal CRT
For those looking for more detail on the Universal CRT
When CEF starts shipping with
C++20features in theheaders/wrapperthen we will need to upgrade toVS2022to build targetingVC++ 2022. Upstream issue chromiumembedded/cef#3611According to C++20 Support Comes To C++/CLI we should be able to upgrade to
VS2022to access the new features.There are some caveats, so it will depend on which features
CEFuses.