Closed huan086 closed 7 years ago
Hello, Huan!
I will fix this problem in the next release.
You have found the cause of the JsEngineLoadException
? What JS engine are you using?
JsEngineLoadException was due to the new nuget package not having the native DLLs bundled by default. Installed the 2 native packages and the error went away.
Using ClearScript V8
OK
Note that .NET Core doesn't have binary serialization, so you need to use conditional comments like this to only include the Serializable
attribute (and constructor with SerializationInfo
and StreamingContext
) on .NET Framework and not .NET Core:
#if NET40 || NET45
[Serializable]
#endif
Hello, Huan!
In JavaScript Engine Switcher 2.1.2 fixed this error.
I'm running JavaScript in my Entity Framework seed method. When an exception occurs, it throws
Type 'JavaScriptEngineSwitcher.Core.JsEngineLoadException' in assembly 'JavaScriptEngineSwitcher.Core, Version=2.0.3.0, Culture=neutral, PublicKeyToken=c608b2a8cc9e4472' is not marked as serializable.
So make exceptions serializable. See https://blogs.msdn.microsoft.com/agileer/2013/05/17/the-correct-way-to-code-a-custom-exception-class/