Are you the publisher? Claim or contact us about this channel


Embed this content in your HTML

Search

Report adult content:

click to rate:

Account: (login)

More Channels


Showcase


Channel Catalog


Channel Description:

ClearScript is a library that makes it easy to add scripting to your .NET applications. It currently supports JavaScript (via V8 and JScript) and VBScript.

older | 1 | .... | 102 | 103 | (Page 104) | 105 | 106 | .... | 115 | newer

    0 0

    I don't actually distribute the App. We are developing a Point of Sale SDK that uses ClearScript and distribute the SDK as a nuget package to our partners who use it on their Apps. Previously we used JINT and we bundled all required DLLs directly into the nuget package and now that we are moving to ClearScript v5.4.2.1, our partners ran into all these DLL cannot be loaded issue even after installing Visual C++ redistributable 2013 & 2015 (both x86 and x64). The App was build targeting Any Platform with Prefer 32 Bit not set

    It will be so much easier if we could just cherry pick the required DLLs and bundle them with our nuget release

    0 0

    Hi i2infinity,

    First, we encourage you to build ClearScript yourself via the walkthrough in the ReadMe. That way there'll be no confusion about which libraries to include with your SDK, and you'll get newer and faster versions of ClearScript and V8.

    Next, since you wish to bundle the Visual C++ libraries with your SDK rather than install the redistributable packages, you'll have to deal with the platform issue (32-bit vs. 64-bit), as the files for both platforms are named identically.

    Here's one way to do it. Have your SDK set up the following directory structure on the target machine:
    YourSDK.dll
    ClearScript.dll
    32\
        ClearScriptV8-32.dll
        v8-ia32.dll
        concrt140.dll
        msvcp140.dll
        vccorlib140.dll
        vcruntime140.dll
    64\
        ClearScriptV8-64.dll
        v8-x64.dll
        concrt140.dll
        msvcp140.dll
        vccorlib140.dll
        vcruntime140.dll
    The 32-bit and 64-bit versions of the Visual C++ libraries (concrt140.dll, msvcp140.dll, vccorlib140.dll, and vcruntime140.dll) can be found in your Visual C++ installation directory. Some typical paths:
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x86\Microsoft.VC140.CRT\
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x64\Microsoft.VC140.CRT\
    Finally, to ensure proper loading of the platform-specific ClearScript and V8 libraries, add the following code to your SDK and invoke it before creating your first V8 runtime or engine instance:
    privatestaticvoid InitClearScript() {
        AppDomain.CurrentDomain.AssemblyResolve += (sender, args) => {
            if (args.Name != "ClearScriptV8")
                returnnull;
            var path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            var bits = Environment.Is64BitProcess ? "64" : "32";
            return Assembly.LoadFrom(Path.Combine(path, bits, "ClearScriptV8-" + bits + ".dll"));
        };
    }
    Of course you can customize this hook to load the libraries from any desired location.

    Good luck!

    0 0

    Thanks a bunch. Let me try this out and get back

    0 0

    I have today updated a project with Nuget to use ClearScript 5.4.6.0 but it is now throwing the following error

    Exception: System.TypeLoadException

    Message: Could not load type 'Microsoft.ClearScript.Util.INativeCallback' from assembly 'ClearScript, Version=5.4.6.0, Culture=neutral, PublicKeyToken=935d0c957da47c73'.

    StackTrace: at HostObjectHelpers.QueueNativeCallback(function<void __cdecl(void)>* callback)

    Any tips on what might be happening here?

    Thanks

    0 0

    I have today updated a project with Nuget to use ClearScript 5.4.6.0 but it is now throwing the following error

    Exception: System.TypeLoadException

    Message: Could not load type 'Microsoft.ClearScript.Util.INativeCallback' from assembly 'ClearScript, Version=5.4.6.0, Culture=neutral, PublicKeyToken=935d0c957da47c73'.

    StackTrace: at HostObjectHelpers.QueueNativeCallback(function<void __cdecl(void)>* callback)

    Any tips on what might be happening here?

    Thanks
    Comments: Hello, It looks like you're using mismatched ClearScript libraries. The `INativeCallback` interface was added in the most recent [commit](https://clearscript.codeplex.com/SourceControl/changeset/df2b7256358171f3755da67b51de889a16d1755c), an update to Version 5.4.6. You can see the source code [here](https://clearscript.codeplex.com/SourceControl/changeset/view/df2b7256358171f3755da67b51de889a16d1755c#ClearScript/Util/INativeCallback.cs). Make sure you're using the latest matched ClearScript libraries. We recommend building ClearScript from scratch, using the procedure in the [ReadMe](https://clearscript.codeplex.com/SourceControl/latest#ReadMe.txt). Good luck!

    0 0

    Hey,

    just a quick note - since you modified the headers for the debugger protocol, it is now also possible to connect to a ClearScript instance by using the base node.js debugger (e.g. node debug localhost:9999) without any additional setup!

    Now all it takes is a graphical wrapper for that :-)

    0 0

    I have today updated a project with Nuget to use ClearScript 5.4.6.0 but it is now throwing the following error

    Exception: System.TypeLoadException

    Message: Could not load type 'Microsoft.ClearScript.Util.INativeCallback' from assembly 'ClearScript, Version=5.4.6.0, Culture=neutral, PublicKeyToken=935d0c957da47c73'.

    StackTrace: at HostObjectHelpers.QueueNativeCallback(function<void __cdecl(void)>* callback)

    Any tips on what might be happening here?

    Thanks
    Comments: Cheers but we are using Nuget for packages so just rolled back to the 4.5.5 version which has resolved.

    0 0

    Great! Thanks for confirming the fix!

    0 0

    I have today updated a project with Nuget to use ClearScript 5.4.6.0 but it is now throwing the following error

    Exception: System.TypeLoadException

    Message: Could not load type 'Microsoft.ClearScript.Util.INativeCallback' from assembly 'ClearScript, Version=5.4.6.0, Culture=neutral, PublicKeyToken=935d0c957da47c73'.

    StackTrace: at HostObjectHelpers.QueueNativeCallback(function<void __cdecl(void)>* callback)

    Any tips on what might be happening here?

    Thanks

    0 0

    I have today updated a project with Nuget to use ClearScript 5.4.6.0 but it is now throwing the following error

    Exception: System.TypeLoadException

    Message: Could not load type 'Microsoft.ClearScript.Util.INativeCallback' from assembly 'ClearScript, Version=5.4.6.0, Culture=neutral, PublicKeyToken=935d0c957da47c73'.

    StackTrace: at HostObjectHelpers.QueueNativeCallback(function<void __cdecl(void)>* callback)

    Any tips on what might be happening here?

    Thanks

    0 0

    We are having IIS crashes on 5.4.6 NuGet package as well. We are trying the downgrade to 5.4.3. If someone can build a Nuget with the patch we can also try it. Or tell us the proper way to compile ClearScript and V8 like how the Nuget package is created and we can try that...

    Bill

    0 0

    Hi Bill,

    We can't help you with the NuGet package, so we encourage you to consider building ClearScript yourself via the procedure in the ReadMe. The Git repository on this site includes a potential fix for the intermittent crashing issues you're seeing.

    Good luck!

    0 0
  • 08/30/16--11:55: New Post: vbs debug
  • hello!

    if the code runs into an vbs error in a VS debug session, no step through in vbs code is provided by VS. instead a popup dialog appears prompting for another VS debug session with the message: "The Just-In-Time was launched without necessary security permission. To debug this process, the Just-In-Time debugger must be run as an Administrator. Would you like to debug this process?"

    if I hit yes, another VS debug session opens with nothing loaded (no script documents) and the origin VS debug session jumps to the managed code exception line being thrown, also no vbs document to be seen.

    Im running my VS session as administrator and also passing the debug flags initiating the VBScriptHost class.

    Any ideas?

    0 0
  • 08/30/16--13:22: New Post: vbs debug
  • Hi eichti,

    We can't reproduce the Visual Studio security errors you're seeing. What kind of application are you working on (console, WPF, ASP.NET, etc.)?

    If you can get past the security issues, try the following:
    • Insert a stop statement somewhere at the beginning of your script.
    • Make sure to use WindowsScriptEngineFlags.EnableDebugging and WindowsScriptEngineFlags.EnableJITDebugging.
    • Run your application outside the debugger. When you get the JIT prompt, select "Manually choose the debugging engines" and click Yes. When prompted, select the script debugging engine. The debugger should attach and navigate to the stop statement line.
    Good luck!

    0 0

    We compiled this fix: https://clearscript.codeplex.com/SourceControl/changeset/df2b7256358171f3755da67b51de889a16d1755c

    We tried it for a few hrs and it was MUCH better! Like night and day. We will have it 100% live next Thursday.

    0 0

    Hi ClearScript team,

    do you know when we can expect to see the fix in the latest released version?

    Thanks!

    0 0

    We tried it for a few hrs and it was MUCH better! Like night and day. We will have it 100% live next Thursday.

    That's great to hear. Thanks for following up!

    0 0

    do you know when we can expect to see the fix in the latest released version?

    We're readying version 5.4.7 now, and it should be out within a week. It's a relatively small update.

    One word of caution: Like most ClearScript releases, 5.4.7 is paired with a newer version of V8 than its predecessor, and as V8 is constantly undergoing rapid change, comprehensive application testing prior to deployment is advisable. In the meantime, it may make sense to deploy a locally-built copy of 5.4.6 with the fix.

    Good luck!

    0 0

    Hello.

    I implemented/ported a module system to run on ClearScript. This requires me to wrap the loaded module code in a function declaration.
    This works great but has one small catch: All line numbers in stack traces of exceptions are of by one line. Since this is in the end used to allow my users to write plugins, they do not neccessarily know about the inner implementation of the module system and so the line numbers will be very confusing.
    Is there any way to work around this? If not, is it possible to implement a features which makes it possible to specify a line offset when calling Engine.Execute(...) or something similar?

    0 0

    Hello ZoneRunner,

    This requires me to wrap the loaded module code in a function declaration.

    Can you say a bit more about (or provide a sample of) how you accomplish this wrapping? Do you take the module's code and splice it into a larger string that you then execute? Do the modules have names (or other identifiers), and if so, how are they related to source code files for which you need to see correct line numbers?

    Thanks!

older | 1 | .... | 102 | 103 | (Page 104) | 105 | 106 | .... | 115 | newer