Getting unable to load chakra core.dll error while

2019-07-17 16:07发布

I am trying to run chakra core c# sample provided here(https://github.com/Microsoft/ChakraCore/wiki/Embedding-ChakraCore#before-you-start) but getting error :enter image description here

I tried to install this also but getting error with it :

Install-Package JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64 -Version 2.4.6

enter image description here

As per my understanding if i want to use chakracore in my project(console app or web application) then i only need chakra core.dll but still i am getting error that chakra core dll not found.

I have tried in visual studio 2015 and 2017 but same problem.

I have few confusion if someone can answer that :

1) Can chakracore execute any javascript code?

2) Can i pass json result to my javascript and get that json result return from the javascript by executing that javascript code with chakracore?

How run run sample application which should display hello world in console application executing javascript code?

1条回答
smile是对你的礼貌
2楼-- · 2019-07-17 16:39

You don't need the Engine Switcher. You only need to reference the official Microsoft.ChakraCore NuGet package from the executable project file.

  • Right-click on the Packages node under the HelloWorld project
  • select Manage NuGet Packages
  • enter 'ChakraCore' into the search box
  • select Microsoft.ChakraCore (it isn't the first item for me)

enter image description here

Once you do, it should run and resolve the ChakraCore.dll included in the NuGet package due to the way the props are done in the package.

查看更多
登录 后发表回答