The Hello world example can be cloned from Github here; https://github.com/Microsoft/Chakra-Samples/tree/master/ChakraCore%20Samples/Hello%20World/Windows/C%23
You’ll also need to get the built version of the DLL from Nuget here;
I noticed that I had to copy the DLL from bin\x86 into the bin folder when running an application as 32 bit (A console app), and copy bin\x64 into the bin folder when running under IIS (64 bit)
So, to capture the error message, you need to add the following lines after RunScript
varerror = Native.JsRunScript(script, currentSourceContext++, “”, outresult);
// Project script result in JS back to C#.
Native.JsStringToPointer(value, outresultPtr, outstringLength);
stringresultString = Marshal.PtrToStringUni(resultPtr);