net6 TeeChart doesn't read net472 TeeChart settings
Posted: Thu Apr 13, 2023 10:12 pm
Hello,
I have uploaded the sample project TeeChartImportOld.zip to the kris.culin@bentley.com email folder using the upload service.
In this sample, we are trying to read the settings saved with the net472 version of TeeChart (the circa 2009).
This is the exception that is occurring:
System.Text.Json.JsonReaderException
HResult=0x80131500
Message='0x00' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
Source=System.Text.Json
StackTrace:
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
It appears it is expecting json but the old net472 isn't storing the settings in json.
We are in the process of migrating our code base to target both net472 and net6. The net6 build will be used in a special platform and it will have the ability to open models that have setting saved with the older TeeChart. Being able to open graphs restoring these settings is essential to our users.
It seems some type of conversion mechanism is needed here. Or at the very least, a way to determine if the settings are compatible with the net6 version.
If you have any questions, please let me know.
Kris Culin
Bentley Systems, Inc.
I have uploaded the sample project TeeChartImportOld.zip to the kris.culin@bentley.com email folder using the upload service.
In this sample, we are trying to read the settings saved with the net472 version of TeeChart (the circa 2009).
This is the exception that is occurring:
System.Text.Json.JsonReaderException
HResult=0x80131500
Message='0x00' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
Source=System.Text.Json
StackTrace:
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
It appears it is expecting json but the old net472 isn't storing the settings in json.
We are in the process of migrating our code base to target both net472 and net6. The net6 build will be used in a special platform and it will have the ability to open models that have setting saved with the older TeeChart. Being able to open graphs restoring these settings is essential to our users.
It seems some type of conversion mechanism is needed here. Or at the very least, a way to determine if the settings are compatible with the net6 version.
If you have any questions, please let me know.
Kris Culin
Bentley Systems, Inc.