Skip to content

[tests] Delete most legacy msbuild tests.#24520

Merged
rolfbjarne merged 1 commit intomainfrom
dev/rolf/delete-legacy-msbuild-tests
Jan 20, 2026
Merged

[tests] Delete most legacy msbuild tests.#24520
rolfbjarne merged 1 commit intomainfrom
dev/rolf/delete-legacy-msbuild-tests

Conversation

@rolfbjarne
Copy link
Member

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes most legacy MSBuild tests from the test suite, focusing on tests that were specific to legacy Xamarin (non-.NET) builds. The cleanup involves deleting entire test files, removing legacy test methods, and simplifying helper infrastructure by removing ExecutionMode enum and related code paths.

Changes:

  • Removed ExecutionMode enum and associated logic that supported both MSBuild (legacy) and .NET build modes
  • Deleted entire test files for legacy-only project types and scenarios (extensions, project variations, binding tests)
  • Removed legacy-specific test methods while keeping a few tests that still need .NET equivalents
  • Removed AssertDotNetAvailable() calls since .NET is now the only supported mode

Reviewed changes

Copilot reviewed 41 out of 41 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
TestHelpers/TestBase.cs Removed Mode field and helper methods for setting up project paths that supported legacy builds
TestHelpers/ExecutionMode.cs Deleted entire file - enum no longer needed with only .NET support
TestHelpers/BuildEngine.cs Simplified RunTarget to only support .NET builds, removed ExecutionMode parameter
TargetTests/ValidateAppBundleTaskTests.cs Deleted entire legacy test file
TargetTests/TargetTests.cs Removed most legacy test methods, kept a few with notes about needed .NET equivalents
TargetTests/DetectSigningIdentityTests.cs Removed AssertDotNetAvailable() call and ExecutionMode parameter
TargetTests/CollectAppManifestsTests.cs Removed AssertDotNetAvailable() call and ExecutionMode parameter
RuntimeTests.cs Deleted entire legacy macOS test file
RoslynSmokeTests.cs Deleted entire legacy macOS Roslyn test file
ProjectsTests/* Deleted 20+ test files for legacy project scenarios
TaskTests/MergeAppBundleTaskTest.cs Removed AssertDotNetAvailable() call
TaskTests/GeneratePlistTaskTests_Core.cs Removed AssertDotNetAvailable() call
TaskTests/DetectSdkLocationsTaskTests.cs Removed legacy SDK version test
ConfigurationNUnit.cs Removed now-unused AssertDotNetAvailable() method

ExecutionResult? executionResult;

public ExecutionResult RunTarget (ApplePlatform platform, ExecutionMode mode, string project, string target, Dictionary<string, string>? properties = null)
public ExecutionResult RunTarget (ApplePlatform platform, string project, string target, Dictionary<string, string>? properties = null)
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

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

The platform parameter is now unused after removing the ExecutionMode logic that used it to determine the build mode. Consider removing this parameter to clean up the API, or document why it's being kept if it's needed for future use.

Copilot uses AI. Check for mistakes.
Comment on lines +24 to +25
Configuration.AssertLegacyXamarinAvailable ();
// .NET: we don't have a test that verifies that the Clean target works as expected, this needs to be added before we can remove this test.
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

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

These comments indicate incomplete migration work. The comments should either be converted to TODO items with tracking issue links, or if there's already a tracking mechanism, reference it explicitly (e.g., "// TODO: See issue #XXXXX").

Copilot uses AI. Check for mistakes.
Comment on lines +64 to +65
Configuration.AssertLegacyXamarinAvailable ();
// .NET: we're currently not enabling png optimization (https://github.com/dotnet/macios/issues/20129), we need to enable that, and add a corresponding test, before we can remove this test.
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

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

This comment pattern appears multiple times. While the GitHub issue link is helpful, consider using a consistent TODO format that can be tracked by tooling (e.g., "// TODO(#20129): ...").

Copilot uses AI. Check for mistakes.
@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #7e08fd6] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 7e08fd6ddabcb23820e160cf9809ef05609929e6 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build #7e08fd6] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: 7e08fd6ddabcb23820e160cf9809ef05609929e6 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 7e08fd6ddabcb23820e160cf9809ef05609929e6 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #7e08fd6] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 7e08fd6ddabcb23820e160cf9809ef05609929e6 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #7e08fd6] Tests on macOS M1 - Mac Monterey (12) passed 💻

All tests on macOS M1 - Mac Monterey (12) passed.

Pipeline on Agent
Hash: 7e08fd6ddabcb23820e160cf9809ef05609929e6 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #7e08fd6] Tests on macOS M1 - Mac Ventura (13) passed 💻

All tests on macOS M1 - Mac Ventura (13) passed.

Pipeline on Agent
Hash: 7e08fd6ddabcb23820e160cf9809ef05609929e6 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #7e08fd6] Tests on macOS arm64 - Mac Sequoia (15) passed 💻

All tests on macOS arm64 - Mac Sequoia (15) passed.

Pipeline on Agent
Hash: 7e08fd6ddabcb23820e160cf9809ef05609929e6 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #7e08fd6] Tests on macOS arm64 - Mac Tahoe (26) passed 💻

All tests on macOS arm64 - Mac Tahoe (26) passed.

Pipeline on Agent
Hash: 7e08fd6ddabcb23820e160cf9809ef05609929e6 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #7e08fd6] Tests on macOS X64 - Mac Sonoma (14) passed 💻

All tests on macOS X64 - Mac Sonoma (14) passed.

Pipeline on Agent
Hash: 7e08fd6ddabcb23820e160cf9809ef05609929e6 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🚀 [CI Build #7e08fd6] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 119 tests passed 🎉

Tests counts

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker: All 44 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 9 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 11 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 9 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 11 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: 7e08fd6ddabcb23820e160cf9809ef05609929e6 [PR build]

@rolfbjarne rolfbjarne merged commit 7eca8f7 into main Jan 20, 2026
50 of 51 checks passed
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.

4 participants