• How do I include the Visual Studio C++ 2012/2013/2015 redistributables with my application?


    CefSharp requires the Microsoft VC++ Runtime.

    CefSharp VersionVC++ Version.Net Version
    65.0.0 and above 2015 4.5.2
    51.0.0 to 63.0.0 2013 4.5.2
    45.0.0 to 49.0.0 2013 4.0.0
    43.0.0 and below 2012 4.0.0

    For Microsoft's official guide see Redistributing Visual C++ Files on MSDN. To download visit Visual Studio C++ 2012/2013/2015 redistributables

    A brief summary of your options for installing/including VC++ with your application are:

    • Install the Microsoft Visual C++ Redistributable Package on every machine on which you wish to run your CefSharp based application. Once installed updates can then be managed via Windows Update.
    • You can either set the Visual Studio C++ redistributables as pre-requisites of the installer (i.e. ClickOnce or WiX Toolset)
    • Copying over to your project the contents of this folder (Only present if you have the matching version of Visual Studio installed on your computer):
    # For VC++ 2012 (x86)
    C:Program Files (x86)Microsoft Visual Studio 11.0VC
    edistx86Microsoft.VC110.CRT
    # For VC++ 2012 (x64)
    C:Program Files (x86)Microsoft Visual Studio 11.0VC
    edistx64Microsoft.VC110.CRT
    
    # For VC++ 2013 (x86)
    C:Program Files (x86)Microsoft Visual Studio 12.0VC
    edistx86Microsoft.VC120.CRT
    # For VC++ 2013 (x64)
    C:Program Files (x86)Microsoft Visual Studio 12.0VC
    edistx64Microsoft.VC120.CRT
    
    # For VC++ 2015 (x86)
    C:Program Files (x86)Microsoft Visual Studio 14.0VC
    edistx86Microsoft.VC140.CRT
    # For VC++ 2015 (x64)
    C:Program Files (x86)Microsoft Visual Studio 14.0VC
    edistx64Microsoft.VC140.CRT
    

    With the 3rd approach you won't need to install the prerequisite Visual C++ 2012/2013/2015 Runtime Files to your client. If you build your own from source what you deploy of course has to match your build environment. For the official Nuget releases see the Releases Branches table for details.

    For VC++ 2013 JetBrains have a Microsoft.VC120.CRT.JetBrains package on Nuget.org, appears to include the relevant files, you would still need to hook up some sort of post build task to copy them to your bin folder.

    For VC++ 2015 you may also need to package the Universal CRT, see the Distributing Software that uses the Universal CRT section of https://blogs.msdn.microsoft.com/vcblog/2015/03/03/introducing-the-universal-crt/ the last dot point titled App-local deployment of the Universal CRT is supported has details. Windows 10 includes the Universal CRT as an operating system component and there is no need to copy those files. UPDATE: See also https://docs.microsoft.com/en-us/cpp/windows/universal-crt-deployment?view=vs-2019

    Note When building from source make sure you compile in Release mode when deploying to machines that don't have Visual Studio installed. Visual C++ uses a different set of run-time libraries for Debug and Release builds. The Debug run-time libraries are only installed with Visual Studio. If you use the official Nuget packages they're already built in Release mode and you can subsequently build your app in debug mode as only the Visual C++ projects need to be compiled in Release mode.

  • 相关阅读:
    C#与JAVA平台RSA算法交互示例
    .NET_RSA加密全接触(重、难点解析)
    .NET和java的RSA互通,仅此而已
    数据库面试常问的一些基本概念
    亿级Web系统搭建——单机到分布式集群
    (译) JSON-RPC 2.0 规范(中文版)
    有趣的 Mysql 存储引擎
    zend opcache的最佳设置
    PHP注释的艺术——phpDoc规范
    说说$POST 、$HTTP_RAW_POST_DATA、php://input三者之间的区别
  • 原文地址:https://www.cnblogs.com/yidanda888/p/11994370.html
Copyright © 2020-2023  润新知