Getting unable to load chakra core.dll error while running hello world sample

1.3k Views Asked by At

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

There are 1 best solutions below

0
On

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.