Taritsyn / JavaScriptEngineSwitcher

JavaScript Engine Switcher determines unified interface for access to the basic features of popular JavaScript engines. This library allows you to quickly and easily switch to using of another JavaScript engine.
Apache License 2.0
439 stars 49 forks source link

Could not load type 'JavaScriptEngineSwitcher.Core.InterlockedStatedFlag' from assembly 'JavaScriptEngineSwitcher.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=c608b2a8cc9e4472'. #92

Closed vivvicks closed 3 years ago

vivvicks commented 3 years ago

Could not load type 'JavaScriptEngineSwitcher.Core.InterlockedStatedFlag' from assembly 'JavaScriptEngineSwitcher.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=c608b2a8cc9e4472'.

after upgrade to latest version

vivvicks commented 3 years ago

this is what i am getting in console and when i click on URL i will get above exception "Refused to apply style from 'http://localhost/PublicAccess/Content/Site.less' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled."

Taritsyn commented 3 years ago

Hello!

It looks like you updated the JavaScriptEngineSwitcher.Core to version 3.X, but you didn't update the JS engine's module.

Answer the following questions:

  1. Are you using the JavaScript Engine Switcher directly or through some library (Bundle Transformer, ReactJS.NET, etc)?
  2. What version are you updating from?
  3. What NuGet packages do you have installed?
vivvicks commented 3 years ago

Are you using the JavaScript Engine Switcher directly or through some library (Bundle Transformer, ReactJS.NET, etc)? BundleTransformer

What version are you updating from? JavaScriptEngineSwitcher.ChakraCore from 2.0.0 to 3.7.2 JavaScriptEngineSwitcher.Core from 2.0.0 to 3.3.0

What NuGet packages do you have installed? JavaScriptEngineSwitcher.ChakraCore from 2.0.0 to 3.7.2 JavaScriptEngineSwitcher.Core from 2.0.0 to 3.3.0 JavaScriptEngineSwitcher.ChakraCore.Native.win-x64 3.8.5

which JS engine module?

Taritsyn commented 3 years ago

which JS engine module?

In your case, this is the JavaScriptEngineSwitcher.ChakraCore module.

JavaScriptEngineSwitcher.ChakraCore from 2.0.0 to 3.7.2 JavaScriptEngineSwitcher.Core from 2.0.0 to 3.3.0 JavaScriptEngineSwitcher.ChakraCore.Native.win-x64 3.8.5

If packages are indeed updated this way, then the Could not load type 'JavaScriptEngineSwitcher.Core.InterlockedStatedFlag' … error can occur in the case of a “dirty” installation. In this case, you need to uninstall the JavaScriptEngineSwitcher.* packages, save changes in the project file, remove the JavaScriptEngineSwitcher.* assemblies from the bin directory, and then install these packages again.

I also recommend reading the “How to upgrade applications to version 3.X” guide.

vivvicks commented 3 years ago

Hi, We are using BundleTransformer.Core and BundleTransformer.less. I have updated BundleTransformer.Core but not BundleTransformer.less. Which is causing issue.

Thanks.

"I also recommend reading the “How to upgrade applications to version 3.X” guide." not found useful at all for framework.