[release/9.0.2xx] Update MSB3825 warning presence #46037
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of #45861 to release/9.0.2xx
Contributes to dotnet/msbuild#11185
Summary
Based on BinaryFormatter removal workgroup recommendation, MSBuild should stop warning in the
GenerateResource
task about possible usage ofBinaryFormatter
during runtime - as in the NET9 the usage of theBinaryFormatter
is avoided during runtime.More details: dotnet/msbuild#11185 (comment)
Customer Impact
User can be receiving false postivie warnings about security related topic - which might decrease credibility of similar warnings and customers attention to true positives.
Regression?
No.
BinaryFormatter used to be used in runtime up till NET8 - and there was no higher runtime then - so the warning was correct unconditionally.
Testing
Tested via manual run of dotnet build with GenerateResource targeting NET8 and NET9 - warning appears only in the former.
Risk
Minimal (just a comparison change).