Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebKit.NET with C# Project Runtime Exception

I have downloaded WebKit.NET 0.5-bin-cairo to work with an existing C# Project. I've included WebKitBrowser.dll and WebKit.Interop.dll as a reference to the module that requires it, as well as playing them directly in the debug/bin folder as directly by this tutorial.

I do not get any errors until I run the project and get an exception on this line in InitializeComponent() of the designer class.

this.webKitBrowser1 = new WebKit.WebKitBrowser();

The exception:

An unhandled exception of type 'System.ComponentModel.Win32Exception' occurred in WebKitBrowser.dll

Additional information: Failed to initialize activation context

I am building all the modules as 86x debug and my computer is 64 bit.

Any suggestions are appreciated as I've been playing around with this for multiple days.

like image 453
RyPope Avatar asked Oct 30 '14 00:10

RyPope


1 Answers

I had encountered same issue. Three things were missing in my scenario.

  1. manifest files: must be placed as all dlls are dynamically linked
  2. VC++ must be installed on machine: In my case I used vc++2005 redistributable sp1.
  3. Not only dlls/pdb/manifest you need to copy all the folders to root directory of executable

There is no correct packaging available yet for all files/folders of webkit.NET And obviously project architecture should be x86 for all projects referencing webkit dlls

like image 127
Chaturvedi Dewashish Avatar answered Sep 24 '22 01:09

Chaturvedi Dewashish