0

It does start on my main that I made it on. I tested on Win7, my main is Wi10 and my friend also tested it on Win10. First, I got this error: Error that I'd recieved and then I read that it can be fixed by setting "Copy local" true in all of the CefSharp reference properties. After that my program just stops working instantly and now it just doesn't start it only shows the crashing if I start it as admin. It still works on my main tho. And the code is nothing too extreme I just included the browser and disabled the right click.

 public ChromiumWebBrowser browser;
    public void InitBrowser()
    {
        Cef.Initialize(new CefSettings());
        browser = new ChromiumWebBrowser("http://google.com/");
        this.Controls.Add(browser);
        browser.Dock = DockStyle.Fill;
        browser.MenuHandler = new CustomMenuHandler();

    }
    public class CustomMenuHandler : CefSharp.IContextMenuHandler
    {
        public void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model)
        {
            model.Clear();
        }

        public bool OnContextMenuCommand(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, CefMenuCommand commandId, CefEventFlags eventFlags)
        {

            return false;
        }

        public void OnContextMenuDismissed(IWebBrowser browserControl, IBrowser browser, IFrame frame)
        {

        }

        public bool RunContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model, IRunContextMenuCallback callback)
        {
            return false;
        }
    }
STATESZ
  • 1
  • 3
  • "it only shows the crashing" This evidence is the most crucial part of your question and you skimmed right over it. – spender Mar 23 '18 at 13:32
  • 2
    Did you add CefSharp to the GAC like the error told you? –  Mar 23 '18 at 13:33
  • If I add it on my main, will it affect the installed verison by the users? – STATESZ Mar 23 '18 at 13:35
  • CefSharp doesn't contain a dialogue telling you to use the GAC? What's generating that error? – amaitland Mar 23 '18 at 15:23
  • I made a new project file and as soon as I added cefsharp it showed that error on a second PC. But that PC has Visual C++ and .NET framework and everything. – STATESZ Mar 23 '18 at 17:14
  • What version of VC++ do you have installed? x86 or x64? What architecture is your app targeting? https://github.com/cefsharp/CefSharp/blob/cefsharp/63/NuGet/Readme.txt#L28 – amaitland Mar 23 '18 at 22:22

0 Answers0