From c30b04f541e91a2d12b2d0b87e6ceff766695bb9 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Fri, 6 Jun 2025 09:41:36 -0700 Subject: [PATCH 01/10] Based on offline guidance, simplify our container usage in main to use the azure linux images for all linux builds. --- .vsts-ci.yml | 21 +++++-------- .vsts-pr.yml | 12 ++----- .../templates/jobs/sdk-job-matrix.yml | 31 ++++--------------- 3 files changed, 15 insertions(+), 49 deletions(-) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 5c795c0ddafd..00c1f4f0e556 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -64,16 +64,9 @@ extends: template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines parameters: containers: - alpine322Amd64: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.22-amd64 - centosStream9: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9 - debian12Amd64: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-gcc15-amd64 - fedora39: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39 - mariner20CrossArm: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm + azureLinux30Net10BuildAmd64: + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-build-amd64 + sdl: sourceAnalysisPool: name: $(DncEngInternalBuildPool) @@ -198,14 +191,14 @@ extends: osProperties: $(linuxOsPortableProperties) /p:BuildSdkDeb=true runTests: false - categoryName: Portable - container: centosStream9 + container: azureLinux30Net10BuildAmd64 # Do not publish zips and tarballs. The linux-x64 binaries are already published by Official. publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false officialBuildProperties: $(_officialBuildProperties) osProperties: $(linuxOsPortableProperties) /p:IsRPMBasedDistro=true runTests: false - categoryName: Portable - container: centosStream9 + container: azureLinux30Net10BuildAmd64 targetArchitecture: arm64 runtimeIdentifier: linux-arm64 # Do not publish zips and tarballs. The linux-arm64 binaries are already published by Official. @@ -215,7 +208,7 @@ extends: runTests: false ### MUSL ### - categoryName: Musl - container: alpine322Amd64 + container: azureLinux30Net10BuildAmd64 runtimeIdentifier: linux-musl-x64 publishArgument: $(_publishArgument) officialBuildProperties: $(_officialBuildProperties) @@ -225,7 +218,7 @@ extends: enableSbom: false runTests: false - categoryName: Musl - container: mariner20CrossArm + container: azureLinux30Net10BuildAmd64 targetArchitecture: arm runtimeIdentifier: linux-musl-arm publishArgument: $(_publishArgument) diff --git a/.vsts-pr.yml b/.vsts-pr.yml index b59682c50b0c..3671ff2e7156 100644 --- a/.vsts-pr.yml +++ b/.vsts-pr.yml @@ -27,16 +27,8 @@ variables: resources: containers: - - container: alpine322Amd64 - image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.22-amd64 - - container: centosStream9 - image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9 - - container: debian12Amd64 - image: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-gcc15-amd64 - - container: fedora39 - image: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39 - - container: ubuntu2204DebPkg - image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-debpkg + - container: azureLinux30Net10BuildAmd64 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-build-amd64 stages: ############### BUILD STAGE ############### diff --git a/eng/pipelines/templates/jobs/sdk-job-matrix.yml b/eng/pipelines/templates/jobs/sdk-job-matrix.yml index fcfac4403eac..0f2ae692f31a 100644 --- a/eng/pipelines/templates/jobs/sdk-job-matrix.yml +++ b/eng/pipelines/templates/jobs/sdk-job-matrix.yml @@ -29,39 +29,20 @@ parameters: # Don't run the tests on arm64. Only perform the build itself. runTests: false - categoryName: ContainerBased - container: ubuntu2204DebPkg - helixTargetContainer: $(helixTargetContainerPrefix)ubuntu-22.04-helix-amd64 + container: azureLinux30Net10BuildAmd64 + helixTargetContainer: $(helixTargetContainerPrefix)azurelinux.3.amd64.open osProperties: $(linuxOsPortableProperties) runTests: true - categoryName: ContainerBased - container: fedora39 - # No fedora Helix container is available, so use the ubuntu one instead. - helixTargetContainer: $(helixTargetContainerPrefix)ubuntu-22.04-helix-amd64 - osProperties: $(linuxOsPortableProperties) - # Skipping all container-based testing for now. - # See: https://github.com/dotnet/sdk/issues/40935 - runTests: false - - categoryName: ContainerBased - container: centosStream9 - helixTargetContainer: $(helixTargetContainerPrefix)centos-stream9-helix + container: azureLinux30Net10BuildAmd64 + helixTargetContainer: $(helixTargetContainerPrefix)azurelinux.3.amd64.open osProperties: /p:OSName=linux runTests: true - categoryName: ContainerBased - container: debian12Amd64 - helixTargetContainer: $(helixTargetContainerPrefix)debian-11-helix-amd64 + container: azureLinux30Net10BuildAmd64 + helixTargetContainer: $(helixTargetContainerPrefix)azurelinux.3.amd64.open osProperties: /p:OSName=linux /p:BuildSdkDeb=true runTests: true - - categoryName: ContainerBased - container: alpine322Amd64 - helixTargetContainer: $(helixTargetContainerPrefix)alpine-3.22-helix-amd64 - runtimeIdentifier: linux-musl-x64 - # Use HostOSName when running on alpine. - osProperties: /p:HostOSName=linux-musl - # SBOM generation is not supported for alpine. - enableSbom: false - # Skipping all container-based testing for now. - # See: https://github.com/dotnet/sdk/issues/40935 - runTests: false - categoryName: TemplateEngine osProperties: $(linuxOsPortableProperties) testProjects: $(Build.SourcesDirectory)/test/Microsoft.TemplateEngine.Cli.UnitTests/Microsoft.TemplateEngine.Cli.UnitTests.csproj;$(Build.SourcesDirectory)/test/dotnet-new.IntegrationTests/dotnet-new.IntegrationTests.csproj From a6d4e26d5c150944832316c45a2e75624dbf72d6 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Fri, 6 Jun 2025 11:47:52 -0700 Subject: [PATCH 02/10] Replace Portable with glibc in our yml files --- .vsts-ci.yml | 26 +++++++++---------- eng/Badge.proj | 2 +- .../templates/jobs/sdk-job-matrix.yml | 8 +++--- .../templates/variables/sdk-defaults.yml | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 00c1f4f0e556..d5b7f4800804 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -155,56 +155,56 @@ extends: timeoutInMinutes: 90 linuxJobParameterSets: ### OFFICIAL ### - # Note: These builds are also portable like the Portable category, but that category uses containers, and doesn't publish zips and tarballs. + # Note: These builds are also glibc like the glibc category, but that category uses containers, and doesn't publish zips and tarballs. - categoryName: Official publishArgument: $(_publishArgument) officialBuildProperties: $(_officialBuildProperties) - osProperties: $(linuxOsPortableProperties) + osProperties: $(linuxOsglibcProperties) runTests: false - categoryName: Official targetArchitecture: arm runtimeIdentifier: linux-arm publishArgument: $(_publishArgument) officialBuildProperties: $(_officialBuildProperties) - osProperties: $(linuxOsPortableProperties) + osProperties: $(linuxOsglibcProperties) runTests: false - categoryName: Official targetArchitecture: arm64 runtimeIdentifier: linux-arm64 publishArgument: $(_publishArgument) officialBuildProperties: $(_officialBuildProperties) - osProperties: $(linuxOsPortableProperties) + osProperties: $(linuxOsglibcProperties) runTests: false - ### PORTABLE ### - - categoryName: Portable + ### glibc ### + - categoryName: glibc # Do not publish zips and tarballs. The linux-x64 binaries are already published by Official. publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false officialBuildProperties: $(_officialBuildProperties) - osProperties: $(linuxOsPortableProperties) /p:BuildSdkDeb=true + osProperties: $(linuxOsglibcProperties) /p:BuildSdkDeb=true runTests: false - - categoryName: Portable + - categoryName: glibc targetArchitecture: arm64 runtimeIdentifier: linux-arm64 # Do not publish zips and tarballs. The linux-arm64 binaries are already published by Official. publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false officialBuildProperties: $(_officialBuildProperties) - osProperties: $(linuxOsPortableProperties) /p:BuildSdkDeb=true + osProperties: $(linuxOsglibcProperties) /p:BuildSdkDeb=true runTests: false - - categoryName: Portable + - categoryName: glibc container: azureLinux30Net10BuildAmd64 # Do not publish zips and tarballs. The linux-x64 binaries are already published by Official. publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false officialBuildProperties: $(_officialBuildProperties) - osProperties: $(linuxOsPortableProperties) /p:IsRPMBasedDistro=true + osProperties: $(linuxOsglibcProperties) /p:IsRPMBasedDistro=true runTests: false - - categoryName: Portable + - categoryName: glibc container: azureLinux30Net10BuildAmd64 targetArchitecture: arm64 runtimeIdentifier: linux-arm64 # Do not publish zips and tarballs. The linux-arm64 binaries are already published by Official. publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false officialBuildProperties: $(_officialBuildProperties) - osProperties: $(linuxOsPortableProperties) /p:IsRPMBasedDistro=true + osProperties: $(linuxOsglibcProperties) /p:IsRPMBasedDistro=true runTests: false ### MUSL ### - categoryName: Musl diff --git a/eng/Badge.proj b/eng/Badge.proj index 7e3108caf761..eceee8752422 100644 --- a/eng/Badge.proj +++ b/eng/Badge.proj @@ -9,7 +9,7 @@ $(OSName.Replace('-', '_'))_$(TargetArchitecture) - linux_$(TargetArchitecture) + linux_$(TargetArchitecture) $(ArtifactsShippingPackagesDir)$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg $(MSBuildThisFileDirectory)version_badge.svg diff --git a/eng/pipelines/templates/jobs/sdk-job-matrix.yml b/eng/pipelines/templates/jobs/sdk-job-matrix.yml index 0f2ae692f31a..63af3ac6bf9e 100644 --- a/eng/pipelines/templates/jobs/sdk-job-matrix.yml +++ b/eng/pipelines/templates/jobs/sdk-job-matrix.yml @@ -21,17 +21,17 @@ parameters: ### LINUX ### linuxJobParameterSets: - categoryName: TestBuild - osProperties: $(linuxOsPortableProperties) + osProperties: $(linuxOsglibcProperties) - categoryName: TestBuild targetArchitecture: arm64 runtimeIdentifier: linux-arm64 - osProperties: $(linuxOsPortableProperties) + osProperties: $(linuxOsglibcProperties) # Don't run the tests on arm64. Only perform the build itself. runTests: false - categoryName: ContainerBased container: azureLinux30Net10BuildAmd64 helixTargetContainer: $(helixTargetContainerPrefix)azurelinux.3.amd64.open - osProperties: $(linuxOsPortableProperties) + osProperties: $(linuxOsglibcProperties) runTests: true - categoryName: ContainerBased container: azureLinux30Net10BuildAmd64 @@ -44,7 +44,7 @@ parameters: osProperties: /p:OSName=linux /p:BuildSdkDeb=true runTests: true - categoryName: TemplateEngine - osProperties: $(linuxOsPortableProperties) + osProperties: $(linuxOsglibcProperties) testProjects: $(Build.SourcesDirectory)/test/Microsoft.TemplateEngine.Cli.UnitTests/Microsoft.TemplateEngine.Cli.UnitTests.csproj;$(Build.SourcesDirectory)/test/dotnet-new.IntegrationTests/dotnet-new.IntegrationTests.csproj publishXunitResults: true ### MACOS ### diff --git a/eng/pipelines/templates/variables/sdk-defaults.yml b/eng/pipelines/templates/variables/sdk-defaults.yml index f9097cfc211a..98c4b0e5d949 100644 --- a/eng/pipelines/templates/variables/sdk-defaults.yml +++ b/eng/pipelines/templates/variables/sdk-defaults.yml @@ -1,7 +1,7 @@ variables: ############### BUILD ############### buildConfiguration: Release - linuxOsPortableProperties: /p:OSName=linux /p:IsLinuxPortable=true + linuxOsglibcProperties: /p:OSName=linux /p:IsLinuxglibc=true helixTargetContainerPrefix: '@mcr.microsoft.com/dotnet-buildtools/prereqs:' ############### ARCADE ############### From 420f072bf03952fd9f6cf195125e6eda84db6bf5 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Fri, 6 Jun 2025 11:51:55 -0700 Subject: [PATCH 03/10] Remove duplicate leg that's no longer needed. --- eng/pipelines/templates/jobs/sdk-job-matrix.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/eng/pipelines/templates/jobs/sdk-job-matrix.yml b/eng/pipelines/templates/jobs/sdk-job-matrix.yml index 63af3ac6bf9e..893629174406 100644 --- a/eng/pipelines/templates/jobs/sdk-job-matrix.yml +++ b/eng/pipelines/templates/jobs/sdk-job-matrix.yml @@ -33,11 +33,6 @@ parameters: helixTargetContainer: $(helixTargetContainerPrefix)azurelinux.3.amd64.open osProperties: $(linuxOsglibcProperties) runTests: true - - categoryName: ContainerBased - container: azureLinux30Net10BuildAmd64 - helixTargetContainer: $(helixTargetContainerPrefix)azurelinux.3.amd64.open - osProperties: /p:OSName=linux - runTests: true - categoryName: ContainerBased container: azureLinux30Net10BuildAmd64 helixTargetContainer: $(helixTargetContainerPrefix)azurelinux.3.amd64.open From 31ed92e774ca92cecf73315ece7013d8509e203b Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Mon, 9 Jun 2025 17:03:52 -0700 Subject: [PATCH 04/10] Per PR feedback renaming to musl, removing rpm legs, replacing islinuxglibc condition with an OS condition, removing rpm legs, and removing extra deb leg --- .vsts-ci.yml | 24 ++++--------------- eng/Badge.proj | 2 +- .../templates/jobs/sdk-job-matrix.yml | 5 ---- .../templates/variables/sdk-defaults.yml | 2 +- 4 files changed, 6 insertions(+), 27 deletions(-) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index d5b7f4800804..c94f0370d0e9 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -190,24 +190,8 @@ extends: officialBuildProperties: $(_officialBuildProperties) osProperties: $(linuxOsglibcProperties) /p:BuildSdkDeb=true runTests: false - - categoryName: glibc - container: azureLinux30Net10BuildAmd64 - # Do not publish zips and tarballs. The linux-x64 binaries are already published by Official. - publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false - officialBuildProperties: $(_officialBuildProperties) - osProperties: $(linuxOsglibcProperties) /p:IsRPMBasedDistro=true - runTests: false - - categoryName: glibc - container: azureLinux30Net10BuildAmd64 - targetArchitecture: arm64 - runtimeIdentifier: linux-arm64 - # Do not publish zips and tarballs. The linux-arm64 binaries are already published by Official. - publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false - officialBuildProperties: $(_officialBuildProperties) - osProperties: $(linuxOsglibcProperties) /p:IsRPMBasedDistro=true - runTests: false - ### MUSL ### - - categoryName: Musl + ### musl ### + - categoryName: musl container: azureLinux30Net10BuildAmd64 runtimeIdentifier: linux-musl-x64 publishArgument: $(_publishArgument) @@ -217,7 +201,7 @@ extends: # SBOM generation is not supported for alpine. enableSbom: false runTests: false - - categoryName: Musl + - categoryName: musl container: azureLinux30Net10BuildAmd64 targetArchitecture: arm runtimeIdentifier: linux-musl-arm @@ -225,7 +209,7 @@ extends: officialBuildProperties: $(_officialBuildProperties) osProperties: /p:OSName=linux-musl runTests: false - - categoryName: Musl + - categoryName: musl targetArchitecture: arm64 runtimeIdentifier: linux-musl-arm64 publishArgument: $(_publishArgument) diff --git a/eng/Badge.proj b/eng/Badge.proj index eceee8752422..a6bed5411ae9 100644 --- a/eng/Badge.proj +++ b/eng/Badge.proj @@ -9,7 +9,7 @@ $(OSName.Replace('-', '_'))_$(TargetArchitecture) - linux_$(TargetArchitecture) + linux_$(TargetArchitecture) $(ArtifactsShippingPackagesDir)$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg $(MSBuildThisFileDirectory)version_badge.svg diff --git a/eng/pipelines/templates/jobs/sdk-job-matrix.yml b/eng/pipelines/templates/jobs/sdk-job-matrix.yml index 893629174406..7695cbabaa93 100644 --- a/eng/pipelines/templates/jobs/sdk-job-matrix.yml +++ b/eng/pipelines/templates/jobs/sdk-job-matrix.yml @@ -28,11 +28,6 @@ parameters: osProperties: $(linuxOsglibcProperties) # Don't run the tests on arm64. Only perform the build itself. runTests: false - - categoryName: ContainerBased - container: azureLinux30Net10BuildAmd64 - helixTargetContainer: $(helixTargetContainerPrefix)azurelinux.3.amd64.open - osProperties: $(linuxOsglibcProperties) - runTests: true - categoryName: ContainerBased container: azureLinux30Net10BuildAmd64 helixTargetContainer: $(helixTargetContainerPrefix)azurelinux.3.amd64.open diff --git a/eng/pipelines/templates/variables/sdk-defaults.yml b/eng/pipelines/templates/variables/sdk-defaults.yml index 98c4b0e5d949..9c5e07f2ad18 100644 --- a/eng/pipelines/templates/variables/sdk-defaults.yml +++ b/eng/pipelines/templates/variables/sdk-defaults.yml @@ -1,7 +1,7 @@ variables: ############### BUILD ############### buildConfiguration: Release - linuxOsglibcProperties: /p:OSName=linux /p:IsLinuxglibc=true + linuxOsglibcProperties: /p:OSName=linux helixTargetContainerPrefix: '@mcr.microsoft.com/dotnet-buildtools/prereqs:' ############### ARCADE ############### From a45581561f0e9802c037379240b8c93f50ed661f Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Tue, 10 Jun 2025 14:42:12 -0700 Subject: [PATCH 05/10] Update eng/Badge.proj Co-authored-by: Jeremy Koritzinsky --- eng/Badge.proj | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/Badge.proj b/eng/Badge.proj index a6bed5411ae9..f8b454bf233e 100644 --- a/eng/Badge.proj +++ b/eng/Badge.proj @@ -9,7 +9,6 @@ $(OSName.Replace('-', '_'))_$(TargetArchitecture) - linux_$(TargetArchitecture) $(ArtifactsShippingPackagesDir)$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg $(MSBuildThisFileDirectory)version_badge.svg From 42832f2b40b48759da46a205b0ebfd72fae6ed5c Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Mon, 16 Jun 2025 16:12:46 -0700 Subject: [PATCH 06/10] Fix the helix container name --- eng/pipelines/templates/jobs/sdk-job-matrix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/templates/jobs/sdk-job-matrix.yml b/eng/pipelines/templates/jobs/sdk-job-matrix.yml index 7695cbabaa93..8970da1eb89d 100644 --- a/eng/pipelines/templates/jobs/sdk-job-matrix.yml +++ b/eng/pipelines/templates/jobs/sdk-job-matrix.yml @@ -30,7 +30,7 @@ parameters: runTests: false - categoryName: ContainerBased container: azureLinux30Net10BuildAmd64 - helixTargetContainer: $(helixTargetContainerPrefix)azurelinux.3.amd64.open + helixTargetContainer: $(helixTargetContainerPrefix)azurelinux-3.0-net10.0-build-amd64 osProperties: /p:OSName=linux /p:BuildSdkDeb=true runTests: true - categoryName: TemplateEngine From 3451222b92a6a94330454cfdf8ef4d72efc83622 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Tue, 17 Jun 2025 14:49:00 -0700 Subject: [PATCH 07/10] Switch back to unbuntu for the helix images --- eng/pipelines/templates/jobs/sdk-job-matrix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/templates/jobs/sdk-job-matrix.yml b/eng/pipelines/templates/jobs/sdk-job-matrix.yml index 8970da1eb89d..0c1c729b8774 100644 --- a/eng/pipelines/templates/jobs/sdk-job-matrix.yml +++ b/eng/pipelines/templates/jobs/sdk-job-matrix.yml @@ -30,7 +30,7 @@ parameters: runTests: false - categoryName: ContainerBased container: azureLinux30Net10BuildAmd64 - helixTargetContainer: $(helixTargetContainerPrefix)azurelinux-3.0-net10.0-build-amd64 + helixTargetContainer: $(helixTargetContainerPrefix)ubuntu-22.04-helix-amd64 osProperties: /p:OSName=linux /p:BuildSdkDeb=true runTests: true - categoryName: TemplateEngine From cb6a0077d38fb741daf0e9c8edbc54134a724d46 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Tue, 17 Jun 2025 17:01:10 -0700 Subject: [PATCH 08/10] Update to ubuntu 24 so it's in support longer --- eng/pipelines/templates/jobs/sdk-job-matrix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/templates/jobs/sdk-job-matrix.yml b/eng/pipelines/templates/jobs/sdk-job-matrix.yml index 0c1c729b8774..8d97a68b15c8 100644 --- a/eng/pipelines/templates/jobs/sdk-job-matrix.yml +++ b/eng/pipelines/templates/jobs/sdk-job-matrix.yml @@ -30,7 +30,7 @@ parameters: runTests: false - categoryName: ContainerBased container: azureLinux30Net10BuildAmd64 - helixTargetContainer: $(helixTargetContainerPrefix)ubuntu-22.04-helix-amd64 + helixTargetContainer: $(helixTargetContainerPrefix)ubuntu-24.04-helix-amd64 osProperties: /p:OSName=linux /p:BuildSdkDeb=true runTests: true - categoryName: TemplateEngine From 7b04b0a75df40a03e7289b15df066b0df8210158 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Mon, 23 Jun 2025 16:32:22 -0700 Subject: [PATCH 09/10] Disable a few netcoreapp2 tests that are now failing on ubuntu 2404 --- .../GivenThatWeWantToBuildASelfContainedApp.cs | 6 ++++++ .../GivenThatWeWantToPublishAHelloWorldProject.cs | 9 ++++++++- .../GivenThatWeWantToPublishAWebApp.cs | 5 ++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASelfContainedApp.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASelfContainedApp.cs index 64e30da7f47a..3763dd48b84a 100644 --- a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASelfContainedApp.cs +++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASelfContainedApp.cs @@ -26,6 +26,12 @@ public void It_builds_a_runnable_output(string targetFramework, bool dependencie return; } + // Some netcoreapp2.0 Linux tests are no longer working on ubuntu 2404 + if (targetFramework == "netcoreapp2.0" && OperatingSystem.IsLinux()) + { + return; + } + var runtimeIdentifier = EnvironmentInfo.GetCompatibleRid(targetFramework); var testAsset = _testAssetsManager .CopyTestAsset("HelloWorld", identifier: targetFramework) diff --git a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAHelloWorldProject.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAHelloWorldProject.cs index e2efe81e83df..edb3e4fe661e 100644 --- a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAHelloWorldProject.cs +++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAHelloWorldProject.cs @@ -71,6 +71,12 @@ public void It_publishes_self_contained_apps_to_the_publish_folder_and_the_app_s return; } + // Some netcoreapp2.0 Linux tests are no longer working on ubuntu 2404 + if (targetFramework == "netcoreapp2.0" && OperatingSystem.IsLinux()) + { + return; + } + var rid = EnvironmentInfo.GetCompatibleRid(targetFramework); var helloWorldAsset = _testAssetsManager @@ -228,7 +234,8 @@ public void Conflicts_are_resolved_when_publishing_a_portable_app() Conflicts_are_resolved_when_publishing(selfContained: false, ridSpecific: false); } - [Fact] + // This test is for netcoreapp2 and no longer working on ubuntu 2404 + [PlatformSpecificFact(TestPlatforms.Windows | TestPlatforms.OSX)] public void Conflicts_are_resolved_when_publishing_a_self_contained_app() { Conflicts_are_resolved_when_publishing(selfContained: true, ridSpecific: true); diff --git a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAWebApp.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAWebApp.cs index cd64cc38cefe..5cac33daf27c 100644 --- a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAWebApp.cs +++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAWebApp.cs @@ -49,7 +49,8 @@ public void It_publishes_as_framework_dependent_by_default() }); } - [Fact] + // This test is for netcoreapp2 and no longer working on ubuntu 2404 + [PlatformSpecificFact(TestPlatforms.Windows | TestPlatforms.OSX)] public void It_should_publish_self_contained_for_2x() { var tfm = "netcoreapp2.2"; @@ -109,6 +110,8 @@ public void It_should_publish_self_contained_for_2x() [InlineData("Microsoft.AspNetCore.All")] public void It_should_publish_framework_dependent_for_2x(string platformLibrary) { + + var tfm = "netcoreapp2.2"; var testProject = new TestProject() From d4528fd6b7495da58e131b2b611930528611312d Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Tue, 24 Jun 2025 11:38:30 -0700 Subject: [PATCH 10/10] Disable the runnable output test for 2 and 3 on linux --- .../GivenThatWeWantToBuildASelfContainedApp.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASelfContainedApp.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASelfContainedApp.cs index 3763dd48b84a..fb10507bf61f 100644 --- a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASelfContainedApp.cs +++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASelfContainedApp.cs @@ -15,7 +15,8 @@ public GivenThatWeWantToBuildASelfContainedApp(ITestOutputHelper log) : base(log { } - [Theory] + // Some netcoreapp2.0 Linux tests are no longer working on ubuntu 2404 + [PlatformSpecificTheory(TestPlatforms.Windows | TestPlatforms.OSX)] [InlineData("netcoreapp1.1", false)] [InlineData("netcoreapp2.0", false)] [InlineData("netcoreapp3.0", true)] @@ -26,12 +27,6 @@ public void It_builds_a_runnable_output(string targetFramework, bool dependencie return; } - // Some netcoreapp2.0 Linux tests are no longer working on ubuntu 2404 - if (targetFramework == "netcoreapp2.0" && OperatingSystem.IsLinux()) - { - return; - } - var runtimeIdentifier = EnvironmentInfo.GetCompatibleRid(targetFramework); var testAsset = _testAssetsManager .CopyTestAsset("HelloWorld", identifier: targetFramework)