ClearScript icon indicating copy to clipboard operation
ClearScript copied to clipboard

Add support for .NET Core

Open cilerler opened this issue 9 years ago • 44 comments

When I try to add it from Nuget it says

Restoring packages for ...\ClassLibrary1.csproj...
Package ClearScript.V8 5.4.9 is not compatible with netstandard1.4 (.NETStandard,Version=v1.4). Package ClearScript.V8 5.4.9 supports: net40 (.NETFramework,Version=v4.0)
One or more packages are incompatible with .NETStandard,Version=v1.4.
Package restore failed. Rolling back package changes for 'ClassLibrary1'.

cilerler avatar Aug 10 '17 15:08 cilerler

Unfortunately ClearScript depends on reflection and dynamic runtime APIs that are not covered by the current .NET Standard. Furthermore, its V8 bridge is a mixed assembly and therefore requires .NET Framework.

ClearScriptLib avatar Aug 11 '17 14:08 ClearScriptLib

Thank you, do you think it will be covered by .NET Standard 2?

cilerler avatar Aug 11 '17 14:08 cilerler

Possibly. We'll keep this issue open and check again soon. Looks like .NET Standard 2.0 was finalized just yesterday!

ClearScriptLib avatar Aug 11 '17 14:08 ClearScriptLib

Net Standard 2 support would be great.

bangclash avatar Oct 04 '17 20:10 bangclash

I am agree. Vert great :)

guillaumechervet avatar Oct 05 '17 05:10 guillaumechervet

+1 .Net Core 2.0 support

wouter-b avatar Nov 10 '17 09:11 wouter-b

@ClearScriptLib any news on supporting .netstandard 2.0?

ipjohnson avatar Nov 22 '17 16:11 ipjohnson

Hi @ipjohnson,

We've analyzed the ClearScript assemblies, and it didn't look too bad. A couple dozen APIs, most of them related to COM interop, are not available on .NET Standard.

A bigger problem for ClearScript is its dependence on Windows. JScript and VBScript are Windows-specific, and ClearScriptV8 is mixed-mode (an assembly type that's only supported on Windows).

So even if it used 100% .NET Standard APIs, ClearScript would still be Windows-only. Unfortunately, at this point, the fastest route to a portable ClearScript would probably be a fork based on ChakraCore.

Thanks!

ClearScriptLib avatar Nov 24 '17 19:11 ClearScriptLib

@ClearScriptLib Thanks for the update.

ipjohnson avatar Nov 24 '17 20:11 ipjohnson

+1 That would be great, even if it's Windows-only. I develop on Windows so go for it. :-)

Do you have any timeline?

imsmart-tech avatar Dec 16 '17 17:12 imsmart-tech

Most of us could live without JScript and VBScript. What we're looking for is the ability to load modern JavaScript so we can do pre-rendering like they do in Node. So an #if version that only exposed JavaScript in .NET Standard would still be really useful.

Grauenwolf avatar Jan 07 '18 18:01 Grauenwolf

Thanks, @Grauenwolf. Just wondering, why are you looking for .NET Standard support? Do you wish to host your application in .NET Core or another runtime? Or are you interested in non-Windows platforms?

ClearScriptLib avatar Jan 08 '18 18:01 ClearScriptLib

@ClearScriptLib it is crucial to move applications to Docker environment (could be Linux, could be Windows, isn't that the era we are in now) 😄 Please help us and implement a workaround. 🤗

cilerler avatar Jan 08 '18 18:01 cilerler

Mostly I am interested in ridding myself of dependences on Node.

Node is used a lot by UI devs for build steps and pre-rendering pages. ASP.NET Core could easily do the same thing if it could run the parsers written in JavaScript.

Grauenwolf avatar Jan 08 '18 18:01 Grauenwolf

Yes, running on non-Windows is a must. Nobody is going to consider replacing Node with ASP.NET if Linux support isn't an option.

Grauenwolf avatar Jan 08 '18 18:01 Grauenwolf

V8 & .Net Core on Linux +1

hiyelbaz avatar Jan 08 '18 19:01 hiyelbaz

V8 & .Net Core on Linux +1

guillaumechervet avatar Jan 09 '18 06:01 guillaumechervet

Folks,

Thanks for clarifying your requirements.

Unfortunately ClearScript's V8 connector is implemented in C++/CLI and would have to be redeveloped from scratch to gain cross-platform capability.

Have you considered purely managed JavaScript solutions such as Jint? There's also a portable solution based on V8 here.

Cheers!

ClearScriptLib avatar Jan 09 '18 16:01 ClearScriptLib

I would love to use ClearScript within my .NET Core web application. Today I can't because the module won't initialize. Support for .NET Standard is much appreciated.

charlesprakash avatar Sep 16 '18 07:09 charlesprakash

Hi, this is a great library and great work done by Clearscript team.We at Ubimax are trying to reuse some of our features from an existing windows application into a Unity/Hololens project. We used Clearscript for JS/C# bridging and it was great. But Clearscript seems not to be compatible with Unity. Is there any progress on making a .net standard/.net core supported version which is cross platform or if someone has tried making it usable with Unity/Hololens projects? Thanks in advance :)

ashutosh-kiddev avatar Oct 10 '18 09:10 ashutosh-kiddev