小编Bik*_*ngh的帖子

VSTO 插件中的 CefSharp

我正在尝试在 VSTO Excel 插件中使用 CefSharp WindowForm 控件。CefSharp.WinForms 版本是 75.1.142,我正在 Excel 2013(64 位)到 VS 2017 上制作插件。

我收到 FileNotFoundException: '无法加载文件或程序集 'CefSharp, Version=75.1.142.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138' 或其依赖项之一。该系统找不到指定的文件。' 在下面的代码执行中。

    public void InitBrowser()
    {
        var cefSettings = new CefSettings();
        cefSettings.MultiThreadedMessageLoop = true;
        // I'm setting current directory to D:\\CEF\\cefsharp\\ExcelWinform\\ExcelWinformAddIn\\bin\\x64\\Debug\\ where all the CefSharp dlls and dependencies are present.
        cefSettings.BrowserSubprocessPath = "D:\\CEF\\cefsharp\\ExcelWinform\\ExcelWinformAddIn\\bin\\x64\\Debug\\CefSharp.BrowserSubprocess.exe";

        if (!Cef.Initialize(cefSettings, performDependencyCheck: true, browserProcessHandler: null))
        {
            throw new Exception("Unable to Initialize Cef");
        }

        browser = new ChromiumWebBrowser("http://www.google.com");
        {
            Dock = DockStyle.Fill;
        }
        BrowserSettings browserSettings …
Run Code Online (Sandbox Code Playgroud)

c# excel-addins cefsharp

2
推荐指数
1
解决办法
852
查看次数

标签 统计

c# ×1

cefsharp ×1

excel-addins ×1