Skip to content

[main] Update dependencies from microsoft/testfx - #56283

Merged
joeloff merged 8 commits into
mainfrom
darc-main-0f7acf81-79ec-4c22-9b56-a7ad8d699737
Sep 16, 2026
Merged

joeloff merged 8 commits into
mainfrom
darc-main-0f7acf81-79ec-4c22-9b56-a7ad8d699737

Conversation

@dotnet-maestro

Copy link
Copy Markdown
Contributor

This pull request updates the following dependencies

From https://github.com/microsoft/testfx

…260913.10

On relative base path root
Microsoft.Testing.Platform From Version 2.4.0 -> To Version 2.5.0-preview.26463.10
MSTest , MSTest.Sdk From Version 4.4.0 -> To Version 4.5.0-preview.26463.10
@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.

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Build Failure Analysis

Summary — Every build leg fails CoreCompile with new MSTEST0084/MSTEST0085 analyzer errors introduced by the MSTest/testfx dependency bump this PR brings in (MSTest / MSTest.Sdk 4.4.0 → 4.5.0-preview.26463.10, Microsoft.Testing.Platform 2.4.0 → 2.5.0-preview.26463.10).

Root cause: new MSTest analyzer rules fire as build errors on pre-existing test code

The updated MSTest.Analyzers package (pulled in transitively via the MSTest/MSTest.Sdk bump) ships two rules that did not previously exist/fire in this repo, and they are treated as build errors (not warnings) in these test projects — most likely via TreatWarningsAsErrors/analyzer severity defaults inherited from MSTest.Sdk. Every one of the 10 build legs (Windows x64/arm64, Linux x64/arm64, Mac arm64, AOT and FullFramework variants) fails identically with these two codes; there are no other compiler/MSBuild errors in any leg. This is a direct, reproducible consequence of the version bump itself, not a flake.

  • **[MSTEST0085]((learn.microsoft.com/redacted) — '[TestClass]' has no effect on abstract class '<Name>'. Fires on abstract classes decorated with [TestClass] (a common base-class pattern for shared test infrastructure).
  • **[MSTEST0084]((learn.microsoft.com/redacted) — Platform-compatibility attributes on a test are not paired with an equivalent [OSCondition] attribute. Only surfaces on the Windows legs (10, 7, 8, 9), because those test classes carry [SupportedOSPlatform("windows")]-style attributes without a matching [OSCondition].

Affected files / errors (deduplicated across legs)

MSTEST0085 — abstract class marked [TestClass]:

  • src/Microsoft.CodeAnalysis.NetAnalyzers/tests/Microsoft.CodeAnalysis.NetAnalyzers.UnitTests/Microsoft.NetCore.Analyzers/Performance/DoNotUseCountWhenAnyCanBeUsedTests.Tests.cs:17,1504
  • src/Microsoft.CodeAnalysis.NetAnalyzers/tests/Microsoft.CodeAnalysis.NetAnalyzers.UnitTests/Microsoft.NetCore.Analyzers/Performance/PreferIsEmptyOverCountTests.cs:548,599
  • src/Microsoft.CodeAnalysis.NetAnalyzers/tests/Microsoft.CodeAnalysis.NetAnalyzers.UnitTests/Microsoft.NetCore.Analyzers/Performance/UsePropertyInsteadOfCountMethodWhenAvailableTests.cs:871
  • test/Microsoft.DotNet.HotReload.Client.Tests/ArrayBufferWriterTests.cs:30
  • test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/WasmPublishIntegrationTestBase.cs:14 (shared by both Microsoft.NET.Sdk.BlazorWebAssembly.Tests and ...AoT.Tests)
  • test/Microsoft.NET.Sdk.Razor.Tests/MvcBuildIntegrationTestLegacy.cs:10

MSTEST0084 — Windows-only legs (10, 7, 8, 9):

  • test/dotnet-MsiInstallation.Tests/VSWorkloadTests.cs:11
  • test/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs:15
  • test/dotnet-MsiInstallation.Tests/WorkloadSetTests2.cs:12
  • test/dotnet-MsiInstallation.Tests/MsiInstallerTests.cs:13
  • test/dotnet.Tests/WindowsInstallerTests.cs:16
  • test/dotnet.Tests/CommandTests/Workload/Install/GivenAWindowsMsiManifestInstaller.cs:13
  • test/dotnet.Tests/CommandTests/Workload/List/GivenAnMsiInstallation.cs:14
  • test/Microsoft.DotNet.Cli.Utils.Tests/ProcessExtensionsTests.cs:13

Proposed fix

None of the above files are touched by this PR (the diff only contains eng/Version.Details.props, eng/Version.Details.xml, global.json), so no inline suggestion comments are posted here — a maintainer should choose one of:

  1. Update the flagged source files to satisfy the new rules (e.g. remove [TestClass] from abstract base classes, or add matching [OSCondition] attributes next to the platform-compatibility attributes on the Windows-specific tests) — this is the durable fix and matches the intent of the new analyzer rules.
  2. If the new rule severities are considered too aggressive for a preview build, suppress MSTEST0084/MSTEST0085 (or pin them to warning) via .editorconfig/NoWarn as a stop-gap until the affected tests are updated — but do this deliberately, not as a silent blanket suppression.
  3. Since the source build is 4.5.0-preview.26463.10 (a testfx preview build), confirm with the testfx team whether these two rules are intentionally new-by-default or a regression in default severity for this preview.

Build overview
  • All 10 legs (Windows x64/arm64, Linux x64/arm64, Mac arm64 — each with AOT and non-AOT variants, plus Windows FullFramework) fail identically.
  • Failing target: CoreCompile (task Csc) in multiple test projects.
  • No other MSBuild/NuGet errors were found in any leg — the dependency restore itself succeeded; only the new analyzer diagnostics broke compilation.
  • Exit: Build failed. in every leg's error list.
All distinct MSTest analyzer errors
Code Project(s) File:Line Message
MSTEST0085 Microsoft.CodeAnalysis.NetAnalyzers.UnitTests DoNotUseCountWhenAnyCanBeUsedTests.Tests.cs:1504 [TestClass] has no effect on abstract class DoNotUseCountAsyncWhenAnyCanBeUsedOverlapTests
MSTEST0085 Microsoft.CodeAnalysis.NetAnalyzers.UnitTests PreferIsEmptyOverCountTests.cs:548 [TestClass] has no effect on abstract class PreferIsEmptyOverCountTestsBase
MSTEST0085 Microsoft.CodeAnalysis.NetAnalyzers.UnitTests PreferIsEmptyOverCountTests.cs:599 [TestClass] has no effect on abstract class PreferIsEmptyOverCountLinqTestsBase
MSTEST0085 Microsoft.CodeAnalysis.NetAnalyzers.UnitTests UsePropertyInsteadOfCountMethodWhenAvailableTests.cs:871 [TestClass] has no effect on abstract class UsePropertyInsteadOfCountMethodWhenAvailableOverlapTests
MSTEST0085 Microsoft.CodeAnalysis.NetAnalyzers.UnitTests DoNotUseCountWhenAnyCanBeUsedTests.Tests.cs:17 [TestClass] has no effect on abstract class DoNotUseCountWhenAnyCanBeUsedTests
MSTEST0084 dotnet-MsiInstallation.Tests VSWorkloadTests.cs:11 Platform compatibility attributes not represented by [OSCondition]
MSTEST0084 dotnet-MsiInstallation.Tests WorkloadSetTests.cs:15 Platform compatibility attributes not represented by [OSCondition]
MSTEST0084 dotnet-MsiInstallation.Tests WorkloadSetTests2.cs:12 Platform compatibility attributes not represented by [OSCondition]
MSTEST0084 dotnet-MsiInstallation.Tests MsiInstallerTests.cs:13 Platform compatibility attributes not represented by [OSCondition]
MSTEST0084 dotnet.Tests WindowsInstallerTests.cs:16 Platform compatibility attributes not represented by [OSCondition]
MSTEST0084 dotnet.Tests GivenAWindowsMsiManifestInstaller.cs:13 Platform compatibility attributes not represented by [OSCondition]
MSTEST0084 dotnet.Tests GivenAnMsiInstallation.cs:14 Platform compatibility attributes not represented by [OSCondition]
MSTEST0084 Microsoft.DotNet.Cli.Utils.Tests ProcessExtensionsTests.cs:13 Platform compatibility attributes not represented by [OSCondition]
MSTEST0085 Microsoft.DotNet.HotReload.Client.Tests ArrayBufferWriterTests.cs:30 [TestClass] has no effect on abstract class ArrayBufferWriterTests
MSTEST0085 Microsoft.NET.Sdk.BlazorWebAssembly.Tests / .AoT.Tests WasmPublishIntegrationTestBase.cs:14 [TestClass] has no effect on abstract class WasmPublishIntegrationTestBase
MSTEST0085 Microsoft.NET.Sdk.Razor.Tests MvcBuildIntegrationTestLegacy.cs:10 [TestClass] has no effect on abstract class MvcBuildIntegrationTestLegacy

🤖 Generated by the Build Failure Analysis workflow using (a href="(dev.azure.com/redacted) · commit 664837f

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · auto · 69.9 AIC · ⌖ 2.14 AIC · ⊞ 7.2K · [◷]( · ◷)

@Evangelink
Evangelink requested review from a team as code owners September 14, 2026 16:22
@Evangelink
Evangelink requested a review from a team September 14, 2026 16:22
@Evangelink
Evangelink requested review from a team as code owners September 14, 2026 16:22

@Evangelink Evangelink left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some changes are incorrect.

}.RunAsync(CancellationToken.None);
}

[TestProperty(Traits.DataflowAnalysis, Traits.Dataflow.PredicateAnalysis)]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All these properties removed are defined at class level and already flow down to the test

@joeloff
joeloff merged commit 4c958c2 into main Sep 16, 2026
74 checks passed
@joeloff
joeloff deleted the darc-main-0f7acf81-79ec-4c22-9b56-a7ad8d699737 branch September 16, 2026 20:22
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Sep 17, 2026

This branch had an error being deployed

1 failed deployment
copilot-pat-pool — 47c860eb Deployed Sep 16, 2026 by joeloff via pre_activation #5324
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.

2 participants