Unhandled Exception: System.Runtime.Serialization.SerializationException: The internal array cannot expand to greater than Int32.MaxValue elements. #146
Not an issue with this code, but with .Net. Posting here simply to help others if they run across the same issue. I encountered it when trying to use the included serialisation to do a binary save of a model.
This was fixed in .Net 4.7.2, but has to be enabled with a flag
Update App.config with
<runtime>
<!-- Use this switch to make BinaryFormatter fast with large object graphs starting with .NET 4.7.2 -->
<AppContextSwitchOverrides value="Switch.System.Runtime.Serialization.UseNewMaxArraySize=true" />
</runtime>
Not an issue with this code, but with .Net. Posting here simply to help others if they run across the same issue. I encountered it when trying to use the included serialisation to do a binary save of a model.
This was fixed in .Net 4.7.2, but has to be enabled with a flag
Update App.config with
Problem solved.