Code Monkey home page Code Monkey logo

Comments (9)

yeshwanth-t avatar yeshwanth-t commented on June 10, 2024 1

@Taritsyn Thank you. The above two suggestions worked great and I am able to resolve those errors. Once again thank you for actively supporting us!!

from javascriptengineswitcher.

Taritsyn avatar Taritsyn commented on June 10, 2024

Hello!

Try to re-read the “Registration of JS engines” section of documentation.

from javascriptengineswitcher.

yeshwanth-t avatar yeshwanth-t commented on June 10, 2024

Thanks @Taritsyn . All those registrations are already in place in my web application. Is there any breaking changes from 3.1.0 to 3.21.0?

from javascriptengineswitcher.

Taritsyn avatar Taritsyn commented on June 10, 2024

Is there any breaking changes from 3.1.0 to 3.21.0?

No.

It's possible that you need to read this.

from javascriptengineswitcher.

Taritsyn avatar Taritsyn commented on June 10, 2024

JavaScriptEngineSwitcher.Core.JsEngineNotFoundException: Could not find a factory, that creates an instance of the JavaScript engine with name ChakraCoreJsEngine.

This error message means that JS engine has not been registered. Check your the Global.asax.cs file there should be the following line of code:

JsEngineSwitcherConfig.Configure(JsEngineSwitcher.Current);

from javascriptengineswitcher.

yeshwanth-t avatar yeshwanth-t commented on June 10, 2024
JsEngineSwitcher

I do have the below code in my Global.asax.cs

public override void Application_Start(object sender, EventArgs e)
{
IdentityModelEventSource.ShowPII = true;
JsEngineSwitcherConfig.Configure((JsEngineSwitcher)JsEngineSwitcher.Current);
}

from javascriptengineswitcher.

Taritsyn avatar Taritsyn commented on June 10, 2024

JsEngineSwitcherConfig.Configure((JsEngineSwitcher)JsEngineSwitcher.Current);

Why are you doing a type conversion? It seems that you have incorrectly migrated from version 2.X to 3.X (see the “How to upgrade applications to version 3.X” section of documentation).

from javascriptengineswitcher.

B-Ahdoot avatar B-Ahdoot commented on June 10, 2024

I am working with @yeshwanth-t. We have 2 workstations already running using the typecasting above. Without the typecast, we receive this error:
cannot convert from 'JavaScriptEngineSwitcher.Core.IJsEngineSwitcher' to 'JavaScriptEngineSwitcher.Core.JsEngineSwitcher'

from javascriptengineswitcher.

Taritsyn avatar Taritsyn commented on June 10, 2024

@B-Ahdoot, As far as I understand, you control contents of the App_Start/JsEngineSwitcherConfig.cs file yourself. Just change argument type of the Configure method to the IJsEngineSwitcher and you won't need type conversion.

To avoid the error described by @yeshwanth-t, you need to ensure that the JsEngineSwitcherConfig.Configure method is called before calling the BundleConfig.RegisterBundles method. As an example, you can look at the BundleTransformer.Sample.AspNet45.Mvc4 demo project (pay special attention to the App_Start/JsEngineSwitcherConfig.cs and Global.asax.cs files).

from javascriptengineswitcher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.