Skip to content

Reenable net framework WPF build test - #57007

Merged
marcpopMSFT merged 1 commit into
mainfrom
marcpopmsft-weekly-test-cleanup-17f
Nov 9, 2026
Merged

marcpopMSFT merged 1 commit into
mainfrom
marcpopmsft-weekly-test-cleanup-17f

Conversation

@marcpopMSFT

Copy link
Copy Markdown
Member

🤖 Part of the weekly test issue cleanup effort.

This re-enables the WPF build test tracked by #29968. The test retargets the current WPF template to net472; it now explicitly selects the latest C# language version so the template's modern syntax can compile instead of inheriting .NET Framework's C# 7.3 default.

Fixes #29968

Validation

  • build.cmd
  • scripts\RunTests.cs -- --project test\Microsoft.NET.Build.Tests\Microsoft.NET.Build.Tests.csproj --filter "FullyQualifiedName~GivenThatWeWantToBuildAWindowsDesktopProject.It_builds_successfully_when_targeting_net_framework" --repeat 3 --test-binlogs

@marcpopMSFT
marcpopMSFT requested a review from a team as a code owner November 9, 2026 21:28
Copilot AI balanced review requested due to automatic review settings November 9, 2026 21:28
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
2 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Re-enabling the WPF build test without a Windows-only condition introduces Linux and macOS test failures because XAML compilation requires Windows.

1 open issue
What changed in this PR

Re-enables the .NET SDK’s WPF build test targeting .NET Framework 4.7.2, addressing the template language-version mismatch tracked by #29968.

Changes:

  • Removes the test’s ignore attribute.
  • Sets LangVersion to latest so modern C# template syntax can compile when targeting net472.
File Description
test/​Microsoft.NET.Build.Tests/​GivenThatWeWantToBuildAWindowsDesktopProject.cs Re-enables the WPF regression test and explicitly selects the latest C# language version.

Review effort: Balanced

@@ -147,7 +147,6 @@ public void It_imports_when_targeting_dotnet_3()
}

[TestMethod]
@marcpopMSFT
marcpopMSFT enabled auto-merge November 9, 2026 22:12
@marcpopMSFT
marcpopMSFT merged commit 315d871 into main Nov 9, 2026
26 checks passed
@marcpopMSFT
marcpopMSFT deleted the marcpopmsft-weekly-test-cleanup-17f branch November 9, 2026 22:52
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

It_builds_successfully_when_targeting_net_framework test wants to compile a .NETCoreApp template on .NET Framework

3 participants