After upgrading to 9.3.x or newer from 9.2.x or older, a sync project may fail with the error "BinaryFormatter serialization and deserialization are disabled within this application"
This is a .net framework error message indicating that the project is invoking a deprecated function to deserialize data from the DB.
.net 8 (in version 9.3.x) or .net 10 (in version 10.0 LTS) have deprecated certain function calls that worked in .net 4.8;
One of these functions was used to serialize data about the project in order to store it in the SQL database.
In order to allow these functions to work, you need to edit the synchronization editor config file, and then to update the project.
SynchronizationEditor.runtimeconfig.json:
{
"runtimeOptions": {
"tfm": "net8.0",
"frameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "8.0.0"
},
{
"name": "Microsoft.WindowsDesktop.App",
"version": "8.0.0"
}
],
"configProperties": {
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": true,
"CSWINRT_USE_WINDOWS_UI_XAML_PROJECTIONS": false
}
}
}
Once this change has been made, edit the project and re-save it.
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center