Hi,
I have an issue when publishing my VS WinForms CefSharp application. After installing it, when it launches, it does not show the web page that gets loaded on launch. I get a plain white screen.
This code is working fine during debug mode but when i publish then show blank page.
I am using this code to open the web page.
- public Form1()
- {
- InitBrowser();
- InitializeComponent();
- }
- public ChromiumWebBrowser browser;
- public void InitBrowser()
- {
- string curDir = Directory.GetCurrentDirectory();
- string temp = Path.GetTempPath();
- var settings = new CefSettings();
- Cef.Initialize(settings);
-
- browser = new ChromiumWebBrowser(@"E:\Sources\Shahzaib-Source\BMOFlow\BMOFlow\BMOFlow\mainhtml/index.html");
- this.Controls.Add(browser);
- browser.Dock = DockStyle.Fill;
- browser.DownloadHandler = new DownloadHandler();
- }