-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
Background
#6215
Similar (and can be taken together with) #8924
This subitem is focused on unit tests calling using BinaryFormatter:
- Build.UnitTests - testing deserializing exceptions
- Framework.UnitTests - testing deserialization of EventArgs, AssemblyNameEx, CopyOnWriteDictionary
- Removing
EnableUnsafeBinaryFormatterSerializationrequried bacause of the above unit tests - https://github.com/dotnet/msbuild/blob/main/Directory.Build.props#L46-L52
Since this is non-shipping code, it's not a priority. However it should be easy to get rid of those and hence make usages of BinaryFormatter in our code base scope to the necessary places (e.g. GenerateResource task)`
Suggested approach
Unit tests testing exceptions and EventArgs serialization should be moved to the new serialization mechanisms for those (#8786, #8917), or delete if duplicate with unittests introduced as part of those new serialization mechanisms, or removed if serializing other types (as those should not currently use BinaryFormatter for de/serialization).
Reactions are currently unavailable