AngleSharp / AngleSharp.Js

:angel: Extends AngleSharp with a .NET-based JavaScript engine.
https://anglesharp.github.io
MIT License
105 stars 23 forks source link

Could not load type 'AngleSharp.Services.IScriptingProvider' from AngleSharp 0.10.0 #51

Closed mdesousa closed 5 years ago

mdesousa commented 5 years ago

We noticed the error below while trying to use the latest AngleSharp.Scripting.JavaScript package (version 0.5.1) with the latest AngleSharp package (0.10.0). Am I missing a reference? Or should we stick with the prior version of AngleSharp when using AngleSharp.Scripting.JavaScript? Thanks.

System.TypeLoadException: Could not load type 'AngleSharp.Services.IScriptingProvider' from assembly 'AngleSharp, Version=0.10.0.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea'.
Stack Trace:
    at AngleSharp.JsConfigurationExtensions.WithJavaScript(IConfiguration configuration)
FlorianRappl commented 5 years ago

Unfortunately, AngleSharp.Scripting is / will be deprecated and does not work with AngleSharp v0.10.

There will be a replacement up soon called AngleSharp.Js.

Currently, it is unclear if this repository will be just renamed or kept as-is for historic purposes (with a deprecation warning).

Recommendation: Stay at AngleSharp pre-v0.10 for the moment and wait until AngleSharp.Js is released. Sorry for inconvenience!

HTH!

mdesousa commented 5 years ago

Ok thanks! FYI the AngleSharp.Scripting.JavaScript dependency for AngleSharp currently says >=0.9.9... don't know if it's possible to update to =0.9.9.

FlorianRappl commented 5 years ago

Unfortunately not without a package update.

sebfrie commented 5 years ago

Any updates on the release of the AngleSharp.Js package?

FlorianRappl commented 5 years ago

There will be a new version released within the next ~2 weeks, which will be compatible with AngleSharp v0.12. However, note that most of the real improvements to this package will come later.

I want to release a blog post on the roadmap for the rest of the year and the associated prios.

Biggest road blocker for AngleSharp.Js at the moment is Jint. While awesome at its core it also brought / brings some limitations. That Jint v3 takes so long (if it ever finishes) is also not good. We need / want ES6 support and a leaner model that also has the potential to perform better. We think that this is a general .NET problem (lacking a great JS engine - something which should have been IronJS, but wasn't), which is why there is homework to be picked up before solving AngleSharp.Js.

TL;DR: Sorry for the inconvenience - working on it. Any support appreciated!

sebfrie commented 5 years ago

Understood. Thanks for the fast and comprehensive answer. Keep up the good work!

FlorianRappl commented 5 years ago

Landed in devel.