Skip to content

Commit 562ce5b

Browse files
Update information for MSB3825 (#44564)
* Update information for MSB3825 * Apply suggestions from code review Co-authored-by: Genevieve Warren <[email protected]> --------- Co-authored-by: Genevieve Warren <[email protected]>
1 parent d864442 commit 562ce5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/standard/serialization/binaryformatter-migration-guide/winforms-applications.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ If these statements are true, the Designer determines if that property's type ha
7474

7575
Types that had been previously serialized into resource files via [BinaryFormatter] will continue to deserialize as expected without the need for [BinaryFormatter] as the content of ResX files are considered trusted data. In the rare case that deserialization cannot occur without [BinaryFormatter], it can be added back with an unsupported compatibility package. See [BinaryFormatter migration guide: Compatibility Package](compatibility-package.md) for details. Note that an extra step of setting `System.Resources.Extensions.UseBinaryFormatter` app context switch to `true` is required to use [BinaryFormatter] for resources.
7676

77-
##### Generating resource files via msbuild
77+
##### Generating resource files via MSBuild
7878

79-
When generating resource files via msbuild, you may encounter an `MSB3825` error which specifies that your binary formatted resources may be deserialized using [BinaryFormatter] during runtime. As stated above, these resources will not deserialize using [BinaryFormatter] and this warning can be turned off by setting the property `GenerateResourceWarnOnBinaryFormatterUse` to `false`. In rare cases that deserialization cannot occur without [BinaryFormatter], it can be added back with an unsupported compatibility package. See [BinaryFormatter migration guide: Compatibility Package](compatibility-package.md) for details. Note that an additional step of setting `System.Resources.Extensions.UseBinaryFormatter` app context switch to `true` is required to use [BinaryFormatter] for resources.
79+
When you generate resource files via MSBuild, you might encounter an `MSB3825` error. This error specifies that your binary-formatted resources might be deserialized using [BinaryFormatter] during run time. The warning is being removed from builds targeting .NET 9 and later, however the removal is not yet complete in all releases of .NET 9. The warning should be only of concern when targeting .NET 8 and lower. As stated earlier, these resources will not deserialize using [BinaryFormatter] during run time in .NET 9 and later versions. You can turn the warning off by setting the property `GenerateResourceWarnOnBinaryFormatterUse` to `false`. In rare cases that deserialization cannot occur without [BinaryFormatter], it can be added back with an unsupported compatibility package. For more information, see [BinaryFormatter migration guide: Compatibility package](compatibility-package.md). Note that an additional step of setting the `System.Resources.Extensions.UseBinaryFormatter` app context switch to `true` is required to use [BinaryFormatter] for resources.
8080

8181
## Migrate away from BinaryFormatter
8282

0 commit comments

Comments
 (0)