AngleSharp / AngleSharp.Js

:angel: Extends AngleSharp with a .NET-based JavaScript engine.

Home Page:https://anglesharp.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reflection Error when getting Jint engine reference

greengiant83 opened this issue · comments

Given the below test code, a ReflectionTypeLoadException is thrown when calling GetOrCreateJint

        var source = "<!DOCTYPE html><html lang='en'><body><script>console.log('Oi!');</script></body></html>";
        var config = Configuration.Default.WithJs();
        var context = BrowsingContext.New(config);
        var document = await context.OpenAsync(req => req.Content(source));
        var jsService = context.GetService<JsScriptingService>();
        var jsEngine = jsService.GetOrCreateJint(document); //<-- Error thrown here: ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.