I have a simple WPF application which works fine in debug but when i do a clickonce release its crashing when trying to load the CEFSharp web browser
I have a login page where the user then clicks open browser once clicked i get the following error
An unhandled exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll
Additional information: The invocation of the constructor on type 'MyProject.Views.CefSharpWebBrowserUserControl' that matches the specified binding constraints threw an exception.
> <TabItem Header="Web Page" Name="CefWebPage">
> <Grid Background="#FFE5E5E5" Margin="0">
> <Grid.ColumnDefinitions>
> <ColumnDefinition Width="871*"/>
> </Grid.ColumnDefinitions>
> <views:CefSharpWebBrowserUserControl x:Name="CefSharpWebBrowserUserControl"></views:CefSharpWebBrowserUserControl>
> </Grid>
> </TabItem>
Exception: Cannot create an instance of "CefSharpWebBrowserUserControl".
TargetInvocationException: Exceptionhas been thrown by the target of an invocation.
FileNotFoundException: Could not load file or assembly 'CefSharp.Core, Version=45.0.0.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138' or one of its dependencies. The system cannot find the file specified.
code behind
public partial class CefSharpWebBrowserUserControl : UserControl
{
public CefSharpWebBrowserUserControl()
{
InitializeComponent();
var settings = new CefSettings();
settings.PackLoadingDisabled = true;
WebBrowser = new ChromiumWebBrowser();
WebBrowser.Address = "www.google.com";
BrowserGrid.Children.Add(WebBrowser);
}
public ChromiumWebBrowser WebBrowser { get; set; }
}
}