diff --git a/src/TestUtils/src/Microsoft.Maui.IntegrationTests/AOTTemplateTest.cs b/src/TestUtils/src/Microsoft.Maui.IntegrationTests/AOTTemplateTest.cs index 8ded0f18f133..7858ec9b8491 100644 --- a/src/TestUtils/src/Microsoft.Maui.IntegrationTests/AOTTemplateTest.cs +++ b/src/TestUtils/src/Microsoft.Maui.IntegrationTests/AOTTemplateTest.cs @@ -34,12 +34,6 @@ public void PublishNativeAOT(string id, string framework, string runtimeIdentifi Assert.True(DotnetInternal.New(id, projectDir, DotNetCurrent, output: _output), $"Unable to create template {id}. Check test output for errors."); - // For Android-only builds on Linux, modify the csproj to only target Android - // This avoids restore failures due to missing iOS/macCatalyst workloads - if (isAndroidPlatform && !TestEnvironment.IsMacOS && !TestEnvironment.IsWindows) - { - OnlyAndroid(projectFile); - } var extendedBuildProps = isWindowsFramework ? PrepareNativeAotBuildPropsWindows(runtimeIdentifier) @@ -95,12 +89,6 @@ public void PublishNativeAOTRootAllMauiAssemblies(string id, string framework, s Assert.True(DotnetInternal.New(id, projectDir, DotNetCurrent, output: _output), $"Unable to create template {id}. Check test output for errors."); - // For Android-only builds on Linux, modify the csproj to only target Android - // This avoids restore failures due to missing iOS/macCatalyst workloads - if (isAndroidPlatform && !TestEnvironment.IsMacOS && !TestEnvironment.IsWindows) - { - OnlyAndroid(projectFile); - } var extendedBuildProps = isWindowsFramework ? PrepareNativeAotBuildPropsWindows(runtimeIdentifier) diff --git a/src/TestUtils/src/Microsoft.Maui.IntegrationTests/BaseTemplateTests.cs b/src/TestUtils/src/Microsoft.Maui.IntegrationTests/BaseTemplateTests.cs index 1a73d119a0a1..88f9ea35e034 100644 --- a/src/TestUtils/src/Microsoft.Maui.IntegrationTests/BaseTemplateTests.cs +++ b/src/TestUtils/src/Microsoft.Maui.IntegrationTests/BaseTemplateTests.cs @@ -11,14 +11,6 @@ protected BaseTemplateTests(IntegrationTestFixture fixture, ITestOutputHelper ou Path.Combine(TestDirectory, "Directory.Build.targets"), true); } - protected void OnlyAndroid(string projectFile) - { - FileUtilities.ReplaceInFile(projectFile, new Dictionary() - { - { "net10.0-android;net10.0-ios;net10.0-maccatalyst", "net10.0-android" }, - }); - } - protected void AssertContains(string expected, string actual) { Assert.True( diff --git a/src/TestUtils/src/Microsoft.Maui.IntegrationTests/SimpleTemplateTest.cs b/src/TestUtils/src/Microsoft.Maui.IntegrationTests/SimpleTemplateTest.cs index a79ca922cb88..869ddccdb777 100644 --- a/src/TestUtils/src/Microsoft.Maui.IntegrationTests/SimpleTemplateTest.cs +++ b/src/TestUtils/src/Microsoft.Maui.IntegrationTests/SimpleTemplateTest.cs @@ -43,12 +43,6 @@ public void Build(string id, string framework, string config, bool shouldPack, s "", "1.0.0-preview.1"); - // We only have these packs for Android - if (additionalDotNetBuildParams.Contains("UseMonoRuntime=false", StringComparison.OrdinalIgnoreCase)) - { - OnlyAndroid(projectFile); - } - var buildProps = BuildProps; if (additionalDotNetBuildParams is not "" and not null)