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

99封情书 提交于 2019-12-11 01:47: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 :

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

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

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:


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)

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.



来源:https://stackoverflow.com/questions/48150043/getting-unable-to-load-chakra-core-dll-error-while-running-hello-world-sample

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!