I’m using Solace version 10.5 and we are migrating to dotnet core 8
In the following line :
ContextFactory.Instance.CreateContext(new ContextProperties(), null);
I get the exception : Exception thrown: ‘System.NotSupportedException’ in System.Runtime.Serialization.Formatters.dll
An exception of type ‘System.NotSupportedException’ occurred in System.Runtime.Serialization.Formatters.dll but was not handled in user code
BinaryFormatter serialization and deserialization are disabled within this application.
I have to mention this is the higher I can go with solace version by the way, in case the answer is to updated my version. Still I would like to know what version would resolve this.
For now I’m using the suggested fix
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<!-- Warning: Setting the following switch is *NOT* recommended in web apps. -->
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
</PropertyGroup>