Could not load file or assembly 'Microsoft.Diagnostics.FastSerialization', An operation is not legal in the current state. (0x80131509
I have C# project that generates a DLL and exposes static methods to JavaScript (using Microsoft.JavaScript.NodeApi). The DLL exported methods launches an ETL collection. When this static method is called from C#, it works as expected. But calling this from javascript throws the below error:
Error: Could not load file or assembly 'Microsoft.Diagnostics.FastSerialization, Version=3.1.17.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. An operation is not legal in the current state. (0x80131509)
I have no idea what this means and searching online resulted in no luck. Any help/guidance is much appreciated.