Skip to content

Commit

Permalink
Preload System.Runtime.Serialization.Primitives
Browse files Browse the repository at this point in the history
We are required to preload System.Runtime.Serialization.Primitives since
it is used for serialization by Newtonsoft.Json.  Failure to do so
results in an EngineExecutionException because of
https://github.com/dotnet/coreclr/issues/5837, which should be fixed in
a post-RTM release.
  • Loading branch information
lstratman committed Aug 11, 2016
1 parent dd3b2dc commit af48a10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/double/Edge.js/dotnetcore/coreclrembedding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ public static void Initialize(IntPtr context, IntPtr exception)
AssemblyLoadContext.Default.LoadFromAssemblyPath(LoadContext.GetAssemblyPath("Microsoft.Extensions.DependencyModel"));
AssemblyLoadContext.Default.LoadFromAssemblyPath(LoadContext.GetAssemblyPath("Newtonsoft.Json"));
AssemblyLoadContext.Default.LoadFromAssemblyPath(LoadContext.GetAssemblyPath("Microsoft.DotNet.InternalAbstractions"));
AssemblyLoadContext.Default.LoadFromAssemblyPath(LoadContext.GetAssemblyPath("System.Runtime.Serialization.Primitives"));

if (!String.IsNullOrEmpty(RuntimeEnvironment.DependencyManifestFile))
{
Expand All @@ -500,7 +501,7 @@ public static void Initialize(IntPtr context, IntPtr exception)

private static Assembly Assembly_Resolving(AssemblyLoadContext arg1, AssemblyName arg2)
{
DebugMessage("CoreCLREmbedding::Initialize (CLR) - Starting resolve process for {0}", arg2.Name);
DebugMessage("CoreCLREmbedding::Assembly_Resolving (CLR) - Starting resolve process for {0}", arg2.Name);
return LoadContext.LoadFromAssemblyName(arg2);
}

Expand Down

0 comments on commit af48a10

Please sign in to comment.