Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure WPF builds against framework SRSF version #9492

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

ericstj
Copy link
Member

@ericstj ericstj commented Jul 30, 2024

Fixes # #9309

Description

WPF was depending on the package version of System.Runtime.Serialization.Formatters but never shipping it. Instead WPF should depend on the built-in assembly version. To do that we need to update the SDK version since WPF's vcxprojs don't
enable the nuget package targeting pack #9490

Customer Impact

Customers see a FileNotFoundException instead of the expected PlatformNotSupportedException when using API that depends on BinaryFormatter.

Regression

Yes, regressed in Preview6.

Testing

I've run the unit tests with the fix. I made sure the test assemblies reference the compatibility package. WPF should add more tests to validate that without the package they'll throw PNSE - #9491

Risk

Low. If it builds it should be doing what we want. It could have more fallout in other tests which aren't represented in test.cmd. Those may need to add a reference to the compat packages.

Microsoft Reviewers: Open in CodeFlow

WPF was depending on the package version of
System.Runtime.Serialization.Formatters but never shipping it.
�Instead WPF should depend on the built-in assembly version.
To do that we need to update the SDK version since WPF's vcxprojs don't
enable the nuget package targeting pack #9490
@ericstj ericstj requested review from a team as code owners July 30, 2024 19:20
@dotnet-policy-service dotnet-policy-service bot added the PR metadata: Label to tag PRs, to facilitate with triage label Jul 30, 2024
@pchaurasia14 pchaurasia14 merged commit d417620 into main Jul 30, 2024
8 checks passed
@pchaurasia14 pchaurasia14 deleted the fixFormattersReference branch July 30, 2024 19:51
@pchaurasia14
Copy link
Member

/backport to release/9.0-preview7

Copy link

github-actions bot commented Aug 1, 2024

Started backporting to release/9.0-preview7: https://github.com/dotnet/wpf/actions/runs/10202962600

Copy link

github-actions bot commented Aug 1, 2024

@pchaurasia14 an error occurred while backporting to release/9.0-preview7, please check the run log for details!

Error: @pchaurasia14 is not a repo collaborator, backporting is not allowed. If you're a collaborator please make sure your dotnet team membership visibility is set to Public on https://github.com/orgs/dotnet/people?query=pchaurasia14

@pchaurasia14
Copy link
Member

/backport to release/9.0-preview7

Copy link

github-actions bot commented Aug 1, 2024

Started backporting to release/9.0-preview7: https://github.com/dotnet/wpf/actions/runs/10202973100

Copy link

github-actions bot commented Aug 1, 2024

@pchaurasia14 backporting to release/9.0-preview7 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Ensure WPF builds against framework SRSF version
Using index info to reconstruct a base tree...
M	global.json
M	src/Microsoft.DotNet.Wpf/src/PresentationCore/PresentationCore.csproj
M	src/Microsoft.DotNet.Wpf/src/PresentationFramework/PresentationFramework.csproj
M	src/Microsoft.DotNet.Wpf/tests/UnitTests/PresentationCore.Tests/PresentationCore.Tests.csproj
Falling back to patching base and 3-way merge...
Auto-merging src/Microsoft.DotNet.Wpf/tests/UnitTests/PresentationCore.Tests/PresentationCore.Tests.csproj
CONFLICT (content): Merge conflict in src/Microsoft.DotNet.Wpf/tests/UnitTests/PresentationCore.Tests/PresentationCore.Tests.csproj
Auto-merging src/Microsoft.DotNet.Wpf/src/PresentationFramework/PresentationFramework.csproj
Auto-merging src/Microsoft.DotNet.Wpf/src/PresentationCore/PresentationCore.csproj
Auto-merging global.json
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Ensure WPF builds against framework SRSF version
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

Copy link

github-actions bot commented Aug 1, 2024

@pchaurasia14 an error occurred while backporting to release/9.0-preview7, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

pchaurasia14 added a commit to pchaurasia14/wpf that referenced this pull request Aug 1, 2024
WPF was depending on the package version of
System.Runtime.Serialization.Formatters but never shipping it.
�Instead WPF should depend on the built-in assembly version.
To do that we need to update the SDK version since WPF's vcxprojs don't
enable the nuget package targeting pack dotnet#9490
ericstj added a commit that referenced this pull request Aug 1, 2024
WPF was depending on the package version of
System.Runtime.Serialization.Formatters but never shipping it.
�Instead WPF should depend on the built-in assembly version.
To do that we need to update the SDK version since WPF's vcxprojs don't
enable the nuget package targeting pack #9490
@github-actions github-actions bot locked and limited conversation to collaborators Sep 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
PR metadata: Label to tag PRs, to facilitate with triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants