C#: Using alternate web browser on Win Forms

Hi
I'm tryingg to build a winforms app that uses the built in web browser

On loading a JavaScript hungry HTML5  page I get a number of error boxes similar to the image

JSeror.JPG
Google suggested doing this which didn't work   (Even running the "...\debug\AppName.exe" in admin mode allowed the regestry to be set but failed to load the page correctly

More googling suggested using the nuget package Geckofx60.64


I'm struggling to know how to install this as there are several when searching for Geckofx

I'm also unsure how to run even the simple example given

 [STAThread]
       static void Main(string[] args)
       {
           Xpcom.Initialize("Firefox64");
           var geckoWebBrowser = new GeckoWebBrowser {Dock = DockStyle.Fill};
           Form f = new Form();
           f.Controls.Add(geckoWebBrowser);
           geckoWebBrowser.Navigate("www.google.com");
           Application.Run(f);
       }

Open in new window


Could someone start me of?

in my App I need to have real browser with at least 1 button that is used after the page loads to analyse the page using xpath queries
LVL 1
trevor1940Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shaun VermaakTechnical SpecialistCommented:
I recently used CefSharp after searching for a while for a proper alternative
https://cefsharp.github.io/

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
trevor1940Author Commented:
Hi

Could you give me a clue how to set this up?
Shaun VermaakTechnical SpecialistCommented:
Download the sample project
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

David FavorLinux/LXD/WordPress/Hosting SavantCommented:
The problem is your "built in web browser" has problems processing some or all Javascript.

CefSharp is more of a Windows specific (code will never run anywhere else) solution.

Use http://phantomjs.org/ if you'd like your code to run on any OS.
trevor1940Author Commented:
Downloaded Sample project
set CefSharp.Test as starup file
build caused a whole host of errors

"Severity      Code      Description      Project      File      Line      Suppression State
Error      CS0117      'TaskCreationOptions' does not contain a definition for 'RunContinuationsAsynchronously'      CefSharp.OffScreen.Example      D:\Vb\Test\CefSharp-master\CefSharp.OffScreen.Example\Program.cs      119      Active
"

have no clue what these mean or if i've done it wrong there dosn't seem to be an install guide

I'm unlikely to run this outside windows but will   try http://phantomjs.org/  tomorrow hopefully it will be a tad more straight forward
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Best to open a ticket with CefSharp or post to one of their user forums for assistance with this.
trevor1940Author Commented:
Hi
I managed to get this to work This Tutorial

For anyone else reading this where it said edit *.csproj and App.config files I did it with Visual Studio closed using an external xml / text editor
AT 2B I had to add new CPU and use  x86

Gave up on the download examples
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.