I have created a new ASP.NET 5 MVC web application which hosts a razor class library with some .net blazor wasm components and a 3rd party library called Elsa. Everything seems to work OK, however when I try to load the Elsa homepage I get the following error:
TypeLoadException: Generic method or method in generic class is internal call, PInvoke, or is defined in a COM Import class.
Unknown location
TypeLoadException: Could not load type 'WebAssembly.JSInterop.JSCallInfo' from assembly 'Microsoft.JSInterop.WebAssembly, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' because it contains an object field at offset 4 that is incorrectly aligned or overlapped by a non-object field.
Unknown location
ReflectionTypeLoadException: Unable to load one or more of the requested types.
Generic method or method in generic class is internal call, PInvoke, or is defined in a COM Import class.
Could not load type 'WebAssembly.JSInterop.JSCallInfo' from assembly 'Microsoft.JSInterop.WebAssembly, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' because it contains an object field at offset 4 that is incorrectly aligned or overlapped by a non-object field.
System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
Kind of lost on this one...not sure why regular MVC pages are loading, but not the 3rd party MVC libs. I believe Elsa was compiled for .NET Standard 2.1.