This is an issue in .net8+ when trying to compile the project System.Windows.Forms:
[SYSLIB0011] 'IFormatter' is obsolete: 'BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.' (https://aka.ms/dotnet-warnings/SYSLIB0011)