From f6d48648a2f58e18356e0075ba102b4424dbbd85 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 11 Jun 2024 12:57:10 +0000 Subject: [PATCH 001/159] Update dependencies from https://github.com/dotnet/roslyn build 20240611.3 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.10.0-3.24303.7 -> To Version 4.10.0-3.24311.3 --- NuGet.config | 2 +- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/NuGet.config b/NuGet.config index 5ee9fe927c8a..183e42ab25f5 100644 --- a/NuGet.config +++ b/NuGet.config @@ -23,7 +23,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d312484a1953..f3e6e718bac8 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -82,34 +82,34 @@ d237e172b324021b97effa244af44d63d1a8bb7e - + https://github.com/dotnet/roslyn - bef690dda43733707d7dccea9868fe51f34eb8a0 + 2a9ce7e2e1b04988f2f5f7535623ffc3851cd260 - + https://github.com/dotnet/roslyn - bef690dda43733707d7dccea9868fe51f34eb8a0 + 2a9ce7e2e1b04988f2f5f7535623ffc3851cd260 - + https://github.com/dotnet/roslyn - bef690dda43733707d7dccea9868fe51f34eb8a0 + 2a9ce7e2e1b04988f2f5f7535623ffc3851cd260 - + https://github.com/dotnet/roslyn - bef690dda43733707d7dccea9868fe51f34eb8a0 + 2a9ce7e2e1b04988f2f5f7535623ffc3851cd260 - + https://github.com/dotnet/roslyn - bef690dda43733707d7dccea9868fe51f34eb8a0 + 2a9ce7e2e1b04988f2f5f7535623ffc3851cd260 - + https://github.com/dotnet/roslyn - bef690dda43733707d7dccea9868fe51f34eb8a0 + 2a9ce7e2e1b04988f2f5f7535623ffc3851cd260 - + https://github.com/dotnet/roslyn - bef690dda43733707d7dccea9868fe51f34eb8a0 + 2a9ce7e2e1b04988f2f5f7535623ffc3851cd260 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 99a4cf88a0d5..6e42a24f1f25 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -155,13 +155,13 @@ - 4.10.0-3.24303.7 - 4.10.0-3.24303.7 - 4.10.0-3.24303.7 - 4.10.0-3.24303.7 - 4.10.0-3.24303.7 - 4.10.0-3.24303.7 - 4.10.0-3.24303.7 + 4.10.0-3.24311.3 + 4.10.0-3.24311.3 + 4.10.0-3.24311.3 + 4.10.0-3.24311.3 + 4.10.0-3.24311.3 + 4.10.0-3.24311.3 + 4.10.0-3.24311.3 $(MicrosoftNetCompilersToolsetPackageVersion) From 52248c43816c72c2a534ff0275253549ff43c4fe Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 11 Jun 2024 13:04:15 +0000 Subject: [PATCH 002/159] Update dependencies from https://github.com/dotnet/arcade build 20240610.5 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 8.0.0-beta.24270.4 -> To Version 8.0.0-beta.24310.5 --- NuGet.config | 2 +- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 4 ++-- .../job/source-index-stage1.yml | 16 +++++++--------- eng/common/templates/job/source-index-stage1.yml | 11 ++++------- global.json | 4 ++-- 6 files changed, 24 insertions(+), 29 deletions(-) diff --git a/NuGet.config b/NuGet.config index 5ee9fe927c8a..183e42ab25f5 100644 --- a/NuGet.config +++ b/NuGet.config @@ -23,7 +23,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d312484a1953..bf8303b2ba5b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -483,22 +483,22 @@ - + https://github.com/dotnet/arcade - f2b2071632d5d4c46d0f904f2b0d917b1752551b + 9f6799fdc16ae19b3e9478c55b997a6aab839d09 - + https://github.com/dotnet/arcade - f2b2071632d5d4c46d0f904f2b0d917b1752551b + 9f6799fdc16ae19b3e9478c55b997a6aab839d09 - + https://github.com/dotnet/arcade - f2b2071632d5d4c46d0f904f2b0d917b1752551b + 9f6799fdc16ae19b3e9478c55b997a6aab839d09 - + https://github.com/dotnet/arcade - f2b2071632d5d4c46d0f904f2b0d917b1752551b + 9f6799fdc16ae19b3e9478c55b997a6aab839d09 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 99a4cf88a0d5..a8a25f5c05db 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -35,7 +35,7 @@ 7.0.0 4.0.0 7.0.0 - 8.0.0-beta.24270.4 + 8.0.0-beta.24310.5 7.0.0-preview.22423.2 8.0.0 4.3.0 @@ -210,7 +210,7 @@ 6.12.0 6.1.0 - 8.0.0-beta.24270.4 + 8.0.0-beta.24310.5 4.18.4 1.3.2 8.0.0-beta.23607.1 diff --git a/eng/common/templates-official/job/source-index-stage1.yml b/eng/common/templates-official/job/source-index-stage1.yml index 43ee0c202fc7..60dfb6b2d1c0 100644 --- a/eng/common/templates-official/job/source-index-stage1.yml +++ b/eng/common/templates-official/job/source-index-stage1.yml @@ -23,7 +23,7 @@ jobs: value: ${{ parameters.sourceIndexPackageSource }} - name: BinlogPath value: ${{ parameters.binlogPath }} - - template: /eng/common/templates/variables/pool-providers.yml + - template: /eng/common/templates-official/variables/pool-providers.yml ${{ if ne(parameters.pool, '') }}: pool: ${{ parameters.pool }} @@ -34,7 +34,8 @@ jobs: demands: ImageOverride -equals windows.vs2019.amd64.open ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: $(DncEngInternalBuildPool) - demands: ImageOverride -equals windows.vs2019.amd64 + image: windows.vs2022.amd64 + os: windows steps: - ${{ each preStep in parameters.preSteps }}: @@ -70,16 +71,13 @@ jobs: scriptType: 'ps' scriptLocation: 'inlineScript' inlineScript: | - echo "##vso[task.setvariable variable=ARM_CLIENT_ID]$env:servicePrincipalId" - echo "##vso[task.setvariable variable=ARM_ID_TOKEN]$env:idToken" - echo "##vso[task.setvariable variable=ARM_TENANT_ID]$env:tenantId" + echo "##vso[task.setvariable variable=ARM_CLIENT_ID;issecret=true]$env:servicePrincipalId" + echo "##vso[task.setvariable variable=ARM_ID_TOKEN;issecret=true]$env:idToken" + echo "##vso[task.setvariable variable=ARM_TENANT_ID;issecret=true]$env:tenantId" - script: | - echo "Client ID: $(ARM_CLIENT_ID)" - echo "ID Token: $(ARM_ID_TOKEN)" - echo "Tenant ID: $(ARM_TENANT_ID)" az login --service-principal -u $(ARM_CLIENT_ID) --tenant $(ARM_TENANT_ID) --allow-no-subscriptions --federated-token $(ARM_ID_TOKEN) displayName: "Login to Azure" - script: $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1 - displayName: Upload stage1 artifacts to source index \ No newline at end of file + displayName: Upload stage1 artifacts to source index diff --git a/eng/common/templates/job/source-index-stage1.yml b/eng/common/templates/job/source-index-stage1.yml index 43ee0c202fc7..0b6bb89dc78a 100644 --- a/eng/common/templates/job/source-index-stage1.yml +++ b/eng/common/templates/job/source-index-stage1.yml @@ -70,16 +70,13 @@ jobs: scriptType: 'ps' scriptLocation: 'inlineScript' inlineScript: | - echo "##vso[task.setvariable variable=ARM_CLIENT_ID]$env:servicePrincipalId" - echo "##vso[task.setvariable variable=ARM_ID_TOKEN]$env:idToken" - echo "##vso[task.setvariable variable=ARM_TENANT_ID]$env:tenantId" + echo "##vso[task.setvariable variable=ARM_CLIENT_ID;issecret=true]$env:servicePrincipalId" + echo "##vso[task.setvariable variable=ARM_ID_TOKEN;issecret=true]$env:idToken" + echo "##vso[task.setvariable variable=ARM_TENANT_ID;issecret=true]$env:tenantId" - script: | - echo "Client ID: $(ARM_CLIENT_ID)" - echo "ID Token: $(ARM_ID_TOKEN)" - echo "Tenant ID: $(ARM_TENANT_ID)" az login --service-principal -u $(ARM_CLIENT_ID) --tenant $(ARM_TENANT_ID) --allow-no-subscriptions --federated-token $(ARM_ID_TOKEN) displayName: "Login to Azure" - script: $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1 - displayName: Upload stage1 artifacts to source index \ No newline at end of file + displayName: Upload stage1 artifacts to source index diff --git a/global.json b/global.json index 1c7137dc526f..3c75c8136628 100644 --- a/global.json +++ b/global.json @@ -14,7 +14,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24270.4", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24270.4" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24310.5", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24310.5" } } From 76c705819aaa56144116154f14c36e21ada7bffc Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 07:38:54 -0700 Subject: [PATCH 003/159] [release/8.0.3xx] Update dependencies from dotnet/templating (#41545) Co-authored-by: dotnet-maestro[bot] --- NuGet.config | 2 +- eng/Version.Details.xml | 10 +++++----- eng/Versions.props | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/NuGet.config b/NuGet.config index 183e42ab25f5..ca1f5e248d72 100644 --- a/NuGet.config +++ b/NuGet.config @@ -23,7 +23,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 310183cf65a6..c381243925c1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,15 +3,15 @@ https://github.com/dotnet/templating - 1bddd10408f6e7cabcce51d89d2c40919914423d + 7248c3c1d6996893bc52c49520707994463aec29 - + https://github.com/dotnet/templating - 1bddd10408f6e7cabcce51d89d2c40919914423d + 7248c3c1d6996893bc52c49520707994463aec29 - + https://github.com/dotnet/templating - 1bddd10408f6e7cabcce51d89d2c40919914423d + 7248c3c1d6996893bc52c49520707994463aec29 diff --git a/eng/Versions.props b/eng/Versions.props index e607892d1b79..f1451bf76c84 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -144,7 +144,7 @@ $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 8.0.303-servicing.24303.2 + 8.0.303-servicing.24311.4 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion) From c9159553b8db392a6d8b4dd1592d30432f0a3935 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 07:39:43 -0700 Subject: [PATCH 004/159] [release/8.0.3xx] Update dependencies from dotnet/roslyn (#41544) Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c381243925c1..93464c4be96b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -82,34 +82,34 @@ d237e172b324021b97effa244af44d63d1a8bb7e - + https://github.com/dotnet/roslyn - 2a9ce7e2e1b04988f2f5f7535623ffc3851cd260 + dfc272796966cca9b6be9dd3d7d564b22a0fee6b - + https://github.com/dotnet/roslyn - 2a9ce7e2e1b04988f2f5f7535623ffc3851cd260 + dfc272796966cca9b6be9dd3d7d564b22a0fee6b - + https://github.com/dotnet/roslyn - 2a9ce7e2e1b04988f2f5f7535623ffc3851cd260 + dfc272796966cca9b6be9dd3d7d564b22a0fee6b - + https://github.com/dotnet/roslyn - 2a9ce7e2e1b04988f2f5f7535623ffc3851cd260 + dfc272796966cca9b6be9dd3d7d564b22a0fee6b - + https://github.com/dotnet/roslyn - 2a9ce7e2e1b04988f2f5f7535623ffc3851cd260 + dfc272796966cca9b6be9dd3d7d564b22a0fee6b - + https://github.com/dotnet/roslyn - 2a9ce7e2e1b04988f2f5f7535623ffc3851cd260 + dfc272796966cca9b6be9dd3d7d564b22a0fee6b - + https://github.com/dotnet/roslyn - 2a9ce7e2e1b04988f2f5f7535623ffc3851cd260 + dfc272796966cca9b6be9dd3d7d564b22a0fee6b https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index f1451bf76c84..44346b47fb5c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -155,13 +155,13 @@ - 4.10.0-3.24311.3 - 4.10.0-3.24311.3 - 4.10.0-3.24311.3 - 4.10.0-3.24311.3 - 4.10.0-3.24311.3 - 4.10.0-3.24311.3 - 4.10.0-3.24311.3 + 4.10.0-3.24311.11 + 4.10.0-3.24311.11 + 4.10.0-3.24311.11 + 4.10.0-3.24311.11 + 4.10.0-3.24311.11 + 4.10.0-3.24311.11 + 4.10.0-3.24311.11 $(MicrosoftNetCompilersToolsetPackageVersion) From 52357b20287f96bf5617733603705c9e194b4068 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 07:39:55 -0700 Subject: [PATCH 005/159] [release/8.0.3xx] Update dependencies from dotnet/razor (#41543) Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 93464c4be96b..d20c27d7e90a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -285,18 +285,18 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 - + https://github.com/dotnet/razor - 69799ac98a8df65cb6bacfe66293d4cbca54a15e + c0bfb39f2018d2c077798ac992c799929df1453f - + https://github.com/dotnet/razor - 69799ac98a8df65cb6bacfe66293d4cbca54a15e + c0bfb39f2018d2c077798ac992c799929df1453f - + https://github.com/dotnet/razor - 69799ac98a8df65cb6bacfe66293d4cbca54a15e + c0bfb39f2018d2c077798ac992c799929df1453f https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 44346b47fb5c..fb349d2d199c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -176,9 +176,9 @@ - 7.0.0-preview.24273.1 - 7.0.0-preview.24273.1 - 7.0.0-preview.24273.1 + 7.0.0-preview.24312.2 + 7.0.0-preview.24312.2 + 7.0.0-preview.24312.2 From 4c0cf529cf8b534039852b2ab3b9bcb342fae743 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 12 Jun 2024 16:38:26 +0000 Subject: [PATCH 006/159] Update dependencies from https://github.com/dotnet/roslyn build 20240612.9 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.8.0-7.24225.6 -> To Version 4.8.0-7.24312.9 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e9bd517ce15e..f7e27ace3644 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -82,34 +82,34 @@ 551db7f100a4a8222cb2f6a3fc9036113ff7de42 - + https://github.com/dotnet/roslyn - de75b3c77d41c21562fc2e9dbcc26b2268c80b26 + 7dce3e2cf1a923d8bb60476f1b921ed3a9c996bd - + https://github.com/dotnet/roslyn - de75b3c77d41c21562fc2e9dbcc26b2268c80b26 + 7dce3e2cf1a923d8bb60476f1b921ed3a9c996bd - + https://github.com/dotnet/roslyn - de75b3c77d41c21562fc2e9dbcc26b2268c80b26 + 7dce3e2cf1a923d8bb60476f1b921ed3a9c996bd - + https://github.com/dotnet/roslyn - de75b3c77d41c21562fc2e9dbcc26b2268c80b26 + 7dce3e2cf1a923d8bb60476f1b921ed3a9c996bd - + https://github.com/dotnet/roslyn - de75b3c77d41c21562fc2e9dbcc26b2268c80b26 + 7dce3e2cf1a923d8bb60476f1b921ed3a9c996bd - + https://github.com/dotnet/roslyn - de75b3c77d41c21562fc2e9dbcc26b2268c80b26 + 7dce3e2cf1a923d8bb60476f1b921ed3a9c996bd - + https://github.com/dotnet/roslyn - de75b3c77d41c21562fc2e9dbcc26b2268c80b26 + 7dce3e2cf1a923d8bb60476f1b921ed3a9c996bd https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 49691b65d459..e6f17b164706 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -151,13 +151,13 @@ - 4.8.0-7.24225.6 - 4.8.0-7.24225.6 - 4.8.0-7.24225.6 - 4.8.0-7.24225.6 - 4.8.0-7.24225.6 - 4.8.0-7.24225.6 - 4.8.0-7.24225.6 + 4.8.0-7.24312.9 + 4.8.0-7.24312.9 + 4.8.0-7.24312.9 + 4.8.0-7.24312.9 + 4.8.0-7.24312.9 + 4.8.0-7.24312.9 + 4.8.0-7.24312.9 $(MicrosoftNetCompilersToolsetPackageVersion) From 9532af76de356cd98bf53a47dffdc8c4a15d7e1d Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 13 Jun 2024 04:47:08 +0000 Subject: [PATCH 007/159] Update dependencies from https://github.com/dotnet/roslyn build 20240612.15 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.8.0-7.24225.6 -> To Version 4.8.0-7.24312.15 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f7e27ace3644..23ac61d347ae 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -82,34 +82,34 @@ 551db7f100a4a8222cb2f6a3fc9036113ff7de42 - + https://github.com/dotnet/roslyn - 7dce3e2cf1a923d8bb60476f1b921ed3a9c996bd + 63a620cd188b12265291ca5d291e002c1bde4db7 - + https://github.com/dotnet/roslyn - 7dce3e2cf1a923d8bb60476f1b921ed3a9c996bd + 63a620cd188b12265291ca5d291e002c1bde4db7 - + https://github.com/dotnet/roslyn - 7dce3e2cf1a923d8bb60476f1b921ed3a9c996bd + 63a620cd188b12265291ca5d291e002c1bde4db7 - + https://github.com/dotnet/roslyn - 7dce3e2cf1a923d8bb60476f1b921ed3a9c996bd + 63a620cd188b12265291ca5d291e002c1bde4db7 - + https://github.com/dotnet/roslyn - 7dce3e2cf1a923d8bb60476f1b921ed3a9c996bd + 63a620cd188b12265291ca5d291e002c1bde4db7 - + https://github.com/dotnet/roslyn - 7dce3e2cf1a923d8bb60476f1b921ed3a9c996bd + 63a620cd188b12265291ca5d291e002c1bde4db7 - + https://github.com/dotnet/roslyn - 7dce3e2cf1a923d8bb60476f1b921ed3a9c996bd + 63a620cd188b12265291ca5d291e002c1bde4db7 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index e6f17b164706..5f6dd851d6bb 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -151,13 +151,13 @@ - 4.8.0-7.24312.9 - 4.8.0-7.24312.9 - 4.8.0-7.24312.9 - 4.8.0-7.24312.9 - 4.8.0-7.24312.9 - 4.8.0-7.24312.9 - 4.8.0-7.24312.9 + 4.8.0-7.24312.15 + 4.8.0-7.24312.15 + 4.8.0-7.24312.15 + 4.8.0-7.24312.15 + 4.8.0-7.24312.15 + 4.8.0-7.24312.15 + 4.8.0-7.24312.15 $(MicrosoftNetCompilersToolsetPackageVersion) From ef6e4fa3ec9fe054eecba2c42e37e1c398be965e Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 13 Jun 2024 14:07:53 +0000 Subject: [PATCH 008/159] Update dependencies from https://github.com/dotnet/roslyn build 20240613.8 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.8.0-7.24312.15 -> To Version 4.8.0-7.24313.8 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 23ac61d347ae..fdb7460d806c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -82,34 +82,34 @@ 551db7f100a4a8222cb2f6a3fc9036113ff7de42 - + https://github.com/dotnet/roslyn - 63a620cd188b12265291ca5d291e002c1bde4db7 + 014f91653a3467b3895b70d5723b08683f02a0bf - + https://github.com/dotnet/roslyn - 63a620cd188b12265291ca5d291e002c1bde4db7 + 014f91653a3467b3895b70d5723b08683f02a0bf - + https://github.com/dotnet/roslyn - 63a620cd188b12265291ca5d291e002c1bde4db7 + 014f91653a3467b3895b70d5723b08683f02a0bf - + https://github.com/dotnet/roslyn - 63a620cd188b12265291ca5d291e002c1bde4db7 + 014f91653a3467b3895b70d5723b08683f02a0bf - + https://github.com/dotnet/roslyn - 63a620cd188b12265291ca5d291e002c1bde4db7 + 014f91653a3467b3895b70d5723b08683f02a0bf - + https://github.com/dotnet/roslyn - 63a620cd188b12265291ca5d291e002c1bde4db7 + 014f91653a3467b3895b70d5723b08683f02a0bf - + https://github.com/dotnet/roslyn - 63a620cd188b12265291ca5d291e002c1bde4db7 + 014f91653a3467b3895b70d5723b08683f02a0bf https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 5f6dd851d6bb..d4905851f757 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -151,13 +151,13 @@ - 4.8.0-7.24312.15 - 4.8.0-7.24312.15 - 4.8.0-7.24312.15 - 4.8.0-7.24312.15 - 4.8.0-7.24312.15 - 4.8.0-7.24312.15 - 4.8.0-7.24312.15 + 4.8.0-7.24313.8 + 4.8.0-7.24313.8 + 4.8.0-7.24313.8 + 4.8.0-7.24313.8 + 4.8.0-7.24313.8 + 4.8.0-7.24313.8 + 4.8.0-7.24313.8 $(MicrosoftNetCompilersToolsetPackageVersion) From 2789db6afc92346fabf0d280a6f75dd7b6af744a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 13 Jun 2024 07:34:47 -0700 Subject: [PATCH 009/159] [release/8.0.3xx] Update dependencies from dotnet/roslyn (#41573) Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d20c27d7e90a..c07a4e673ab3 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -82,34 +82,34 @@ d237e172b324021b97effa244af44d63d1a8bb7e - + https://github.com/dotnet/roslyn - dfc272796966cca9b6be9dd3d7d564b22a0fee6b + 771f269b3abcbbd991f05becf8fe5e991d24b0c1 - + https://github.com/dotnet/roslyn - dfc272796966cca9b6be9dd3d7d564b22a0fee6b + 771f269b3abcbbd991f05becf8fe5e991d24b0c1 - + https://github.com/dotnet/roslyn - dfc272796966cca9b6be9dd3d7d564b22a0fee6b + 771f269b3abcbbd991f05becf8fe5e991d24b0c1 - + https://github.com/dotnet/roslyn - dfc272796966cca9b6be9dd3d7d564b22a0fee6b + 771f269b3abcbbd991f05becf8fe5e991d24b0c1 - + https://github.com/dotnet/roslyn - dfc272796966cca9b6be9dd3d7d564b22a0fee6b + 771f269b3abcbbd991f05becf8fe5e991d24b0c1 - + https://github.com/dotnet/roslyn - dfc272796966cca9b6be9dd3d7d564b22a0fee6b + 771f269b3abcbbd991f05becf8fe5e991d24b0c1 - + https://github.com/dotnet/roslyn - dfc272796966cca9b6be9dd3d7d564b22a0fee6b + 771f269b3abcbbd991f05becf8fe5e991d24b0c1 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index fb349d2d199c..fb59b41f7954 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -155,13 +155,13 @@ - 4.10.0-3.24311.11 - 4.10.0-3.24311.11 - 4.10.0-3.24311.11 - 4.10.0-3.24311.11 - 4.10.0-3.24311.11 - 4.10.0-3.24311.11 - 4.10.0-3.24311.11 + 4.10.0-3.24312.19 + 4.10.0-3.24312.19 + 4.10.0-3.24312.19 + 4.10.0-3.24312.19 + 4.10.0-3.24312.19 + 4.10.0-3.24312.19 + 4.10.0-3.24312.19 $(MicrosoftNetCompilersToolsetPackageVersion) From b45960467602a84b28d263c8bd3ca283b9e569ef Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 14 Jun 2024 12:52:44 +0000 Subject: [PATCH 010/159] Update dependencies from https://github.com/dotnet/arcade build 20240611.3 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 8.0.0-beta.24310.5 -> To Version 8.0.0-beta.24311.3 --- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 4 ++-- global.json | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c07a4e673ab3..206c729e37e1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -483,22 +483,22 @@ - + https://github.com/dotnet/arcade - 9f6799fdc16ae19b3e9478c55b997a6aab839d09 + c214b6ad17aedca4fa48294d80f6c52ef2463081 - + https://github.com/dotnet/arcade - 9f6799fdc16ae19b3e9478c55b997a6aab839d09 + c214b6ad17aedca4fa48294d80f6c52ef2463081 - + https://github.com/dotnet/arcade - 9f6799fdc16ae19b3e9478c55b997a6aab839d09 + c214b6ad17aedca4fa48294d80f6c52ef2463081 - + https://github.com/dotnet/arcade - 9f6799fdc16ae19b3e9478c55b997a6aab839d09 + c214b6ad17aedca4fa48294d80f6c52ef2463081 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index fb59b41f7954..734ba59756cd 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -35,7 +35,7 @@ 7.0.0 4.0.0 7.0.0 - 8.0.0-beta.24310.5 + 8.0.0-beta.24311.3 7.0.0-preview.22423.2 8.0.0 4.3.0 @@ -210,7 +210,7 @@ 6.12.0 6.1.0 - 8.0.0-beta.24310.5 + 8.0.0-beta.24311.3 4.18.4 1.3.2 8.0.0-beta.23607.1 diff --git a/global.json b/global.json index 3c75c8136628..d2af4d682074 100644 --- a/global.json +++ b/global.json @@ -14,7 +14,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24310.5", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24310.5" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24311.3", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24311.3" } } From 9a77ff93297f2db5df00999d0880095212231327 Mon Sep 17 00:00:00 2001 From: Damon Tivel Date: Wed, 12 Jun 2024 15:56:03 -0700 Subject: [PATCH 011/159] 2024-06 CTL --- .../redist/trustedroots/codesignctl.pem | 48 +++++++++++++++++++ .../redist/trustedroots/timestampctl.pem | 48 +++++++++++++++++++ .../GivenCodeSigningCtlFile.cs | 2 + .../GivenTimestampingCtlFile.cs | 2 +- 4 files changed, 99 insertions(+), 1 deletion(-) diff --git a/src/Layout/redist/trustedroots/codesignctl.pem b/src/Layout/redist/trustedroots/codesignctl.pem index 11978a9a649f..021bd8997f77 100644 --- a/src/Layout/redist/trustedroots/codesignctl.pem +++ b/src/Layout/redist/trustedroots/codesignctl.pem @@ -8620,3 +8620,51 @@ e0G4FBVWdtOW4xWFZAIwJOT2+L0Tbjq3P9y/zXjfJoBXEq9oZ0//8iuxoqGZtMOT G456y3y/FI7r6rj+4QNf -----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIFeDCCA2CgAwIBAgIQSyw7AQGLrSq8jHtbPu2QVzANBgkqhkiG9w0BAQwFADBW +MQswCQYDVQQGEwJHQjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMS0wKwYDVQQD +EyRTZWN0aWdvIFB1YmxpYyBDb2RlIFNpZ25pbmcgUm9vdCBSNDYwHhcNMjEwMzIy +MDAwMDAwWhcNNDYwMzIxMjM1OTU5WjBWMQswCQYDVQQGEwJHQjEYMBYGA1UEChMP +U2VjdGlnbyBMaW1pdGVkMS0wKwYDVQQDEyRTZWN0aWdvIFB1YmxpYyBDb2RlIFNp +Z25pbmcgUm9vdCBSNDYwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCN +55QSIgQkdC7/FiMCkoq2rjaFrEfUI5ErPtx94jGgUW+shJHjUoq14pbe0IdjJImK +/+8Skzt9u7aKvb0Ffyeba2XTpQxpsbxJOZrxbW6q5KCDJ9qaDStQ6Utbs7hkNqR+ +Sj2pcaths3OzPAsM79szV+W+NDfjlxtd/R8SPYIDdub7P2bSlDFp+m2zNKzBenjc +klDyZMeqLQSrw2rq4C+np9xu1+j/2iGrQL+57g2extmeme/G3h+pDHazJyCh1rr9 +gOcB0u/rgimVcI3/uxXP/tEPNqIuTzKQdEZrRzUTdwUzT2MuuC3hv2WnBGsY2HH6 +zAjybYmZELGt2z4s5KoYsMYHAXVn3m3pY2MeNn9pib6qRT5uWl+PoVvLnTCGMOgD +s0DGDQ84zWeoU4j6uDBl+m/H5x2xg3RpPqzEaDux5mczmrYI4IAFSEDu9oJkRqj1 +c7AGlfJsZZ+/VVscnFcax3hGfHCqlBuCF6yH6bbJDoEcQNYWFyn8XJwYK+pF9e+9 +1WdPKF4F7pBMeufG9ND8+s0+MkYTIDaKBOq3qgdGnA2TOglmmVhcKaO5DKYwODzQ +RjY1fJy67sPV+Qp2+n4FG0DKkjXp1XrRtX8ArqmQqsV/AZwQsRb8zG4Y3G9i/qZQ +p7h7uJ0VP/4gDHXIIloTlRmQAOka1cKG8eOO7F/05QIDAQABo0IwQDAdBgNVHQ4E +FgQUMuuSmv81lkgvKEBCcCA2kVwXheYwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB +/wQFMAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAHZlwuPXIkrXHYle/2lexhQCTXOm +zc0oyrA36r+nySGqql/av/aDbNCA0QpcAKTL88w5D55BcYjVPOiKe4wXI/fKNHSR +bAauUD8AWbImPDwXg1cDPi3RGj3UzwdUskMLUnKoiPXEF/Jv0Vil0WjkPZgIGO42 +9EhImvpUcPCI1HAWMEJJ0Nk/dUtFcdiuorthDoiFUFe5uhErNikfjyBynlyeidGC +2kWNapnahHFrM6UQu3nwl/Z0gaA/V8eGjDCMDjiVrgHGHqvcqB9vL9f/dh6uF3Nt +5bl1s2EGqJUzwk5vsjfylb6FVBK5yL1iQnb3Kvz1NzEDJlf+0ebb8BYCcoOMCLOE +rKnkB/ihiMQTWlBHVEKm7dBBNCyYsT6iNKEMXb2s9395p79tDFYyhRtLl7jhrOSk +PHHxo+FOY9b0Rrr1CwjhYzztolkvCtQsayOinqFN7tESzRgzUO1Bbst/PUFgC2ML +ePV170MVtzYLEK/cXBipmNk22R3YhLMGioLjexskp0LO7g8+VlwyfexL3lYrOzu6 ++XpY0FG2bNb2WKJSJHpEhqEcYD9J0/z6+YQcBcI0v+Lm8RkqmS9WVzWctfUHw0Yv +3jg9GQ37o/HfE57nqXJYMa+96trX1m13MzOO9Kz9wb9Jh9JwBWd0Bqb2eEAtFgSR +Dx/TFsS4ehcNJMmy +-----END CERTIFICATE----- + +-----BEGIN CERTIFICATE----- +MIICKDCCAa+gAwIBAgIQUCSbou+Opr9sLB8aY4XUwzAKBggqhkjOPQQDAzBWMQsw +CQYDVQQGEwJHQjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMS0wKwYDVQQDEyRT +ZWN0aWdvIFB1YmxpYyBDb2RlIFNpZ25pbmcgUm9vdCBFNDYwHhcNMjEwMzIyMDAw +MDAwWhcNNDYwMzIxMjM1OTU5WjBWMQswCQYDVQQGEwJHQjEYMBYGA1UEChMPU2Vj +dGlnbyBMaW1pdGVkMS0wKwYDVQQDEyRTZWN0aWdvIFB1YmxpYyBDb2RlIFNpZ25p +bmcgUm9vdCBFNDYwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQIMoEDH487om+BR4zl +e7m6wWmyW0nAKLkUWG8kM85Qm3PZO8FoOZx6Yc5c0iJHRKuAhanllayqrmZYhlan +uIODzLTRDqlR+EtnOX+MubY5aDSPGUq6jiHrQrisVp0J3AejQjBAMB0GA1UdDgQW +BBTPfSygkHqYHd22XoXC4NoVcdLlXjAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/ +BAUwAwEB/zAKBggqhkjOPQQDAwNnADBkAjACd++zAerlV83j8HflRwwwlLmgchbs +aGX/4g44dv/oG8KfzCVTRg6sZHMobtK0IqYCMGk5W6+oBFyZMtOebrSwXs8lGjll +/zHz43Zy8DMXO+iiqzSEwWGneZ6KupkGGqfVKw== +-----END CERTIFICATE----- + diff --git a/src/Layout/redist/trustedroots/timestampctl.pem b/src/Layout/redist/trustedroots/timestampctl.pem index 592079fa33ae..e11dc73a8817 100644 --- a/src/Layout/redist/trustedroots/timestampctl.pem +++ b/src/Layout/redist/trustedroots/timestampctl.pem @@ -9257,3 +9257,51 @@ sEn9loiN7TPb5cHvtvLTRX9Dvr82zadlqpFiHzd/7Uvv7nMXbi8LgNW1asp98aib oTM3VxKKcl+Yqg== -----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICNjCCAb2gAwIBAgIUNdzqqPFud6Xd/BatNpw0vRVFzikwCgYIKoZIzj0EAwMw +WzELMAkGA1UEBhMCTkwxIDAeBgNVBAoMF1F1b1ZhZGlzIFRydXN0bGluayBCLlYu +MSowKAYDVQQDDCFRdW9WYWRpcyBTaWduaW5nIEVDQyBQMzg0IFJvb3QgRzQwHhcN +MjMwMzE2MTUzNjAyWhcNNDgwMzA5MTUzNjAxWjBbMQswCQYDVQQGEwJOTDEgMB4G +A1UECgwXUXVvVmFkaXMgVHJ1c3RsaW5rIEIuVi4xKjAoBgNVBAMMIVF1b1ZhZGlz +IFNpZ25pbmcgRUNDIFAzODQgUm9vdCBHNDB2MBAGByqGSM49AgEGBSuBBAAiA2IA +BFI7CA12eXWd/JJ/J6R9xlocD5E82+Q5+IKq2PzmYohXxrVz2z72REWsGaRBYykL +liyHxKYC012KoqjnXjbs38WhRVVKDFRRkBCcHpoM+PM0sJSy54NIx1jKetHHJGgF +LKNCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUWRZsDiAtkUp02ppPs/4p +UbnpynwwDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMDA2cAMGQCMBZ8eADXpJ2W +4XVLDPFJMoABShYkMQVq5PHCRA1/t5l5Lgkw15p6O0DmoSYM500L/QIwRmBoIwwu +shW7GPd4iqd4bGvn1U+4UL+binQ0f4vyuAw62hoABxh7IH+mdNN+g6gT +-----END CERTIFICATE----- + +-----BEGIN CERTIFICATE----- +MIIFhjCCA26gAwIBAgIUDx0XQGkARJQ7rWtetIcEV1mwgI0wDQYJKoZIhvcNAQEM +BQAwWzELMAkGA1UEBhMCTkwxIDAeBgNVBAoMF1F1b1ZhZGlzIFRydXN0bGluayBC +LlYuMSowKAYDVQQDDCFRdW9WYWRpcyBTaWduaW5nIFJTQSA0MDk2IFJvb3QgRzQw +HhcNMjMwMzE2MTUzMjQ4WhcNNDgwMzA5MTUzMjQ3WjBbMQswCQYDVQQGEwJOTDEg +MB4GA1UECgwXUXVvVmFkaXMgVHJ1c3RsaW5rIEIuVi4xKjAoBgNVBAMMIVF1b1Zh +ZGlzIFNpZ25pbmcgUlNBIDQwOTYgUm9vdCBHNDCCAiIwDQYJKoZIhvcNAQEBBQAD +ggIPADCCAgoCggIBANCMA/gAIDZZWuEcZP0bo8ss5R5zIRDr5DYOLLh2vyg6HsEK +lEXzWuk7wBrF/Od8OMzpHCy3eWGse+BO9i63oTIVG5Usix1Q9qWzsBtj8kbCw1ah +ydO8E87y24Yapmjr/e+jY6++44IZ/dcSBK5vmJsUr6j353+z1npzUQNo5JeB01o8 +M73Gwf3kfkkc4xQNj8FluJcrYVr88zQ27Gcpe9JMkCrSpkKpxsgByVy/XDcx/gZZ +V+5urRyeovFq3IjllYTV1h4BnVAW4y9xraGRIKayq/4IKAI2L0OYjDucphkEmrWx +fP6wDX+kMCPCbw8jAWv/2fOFgq0Fq2xAp4FQbQF/xgTcDsm5zq9p8QOsw8wV4B7q ++2N+NGtSU/CYTPydg13Dik8/k71zWkWhuQ9S8LChI4MKh+lsKaLEN574U5UABwyo +OSDDRurBPRQZrEtzebgE7lwMo3WWWrVuAp5e8rtyLNrxaSVcIDjqRydWbNLF+BB2 +3iKUaZ3tV6RspDUpmsp9Gl9VRErEVJ+/O5kS0M1oMyK9LB3GGTOkW4SGhEMJQiW5 +4pcs8ZQHrF6QjAEib6Ur9DcEB6vI10xQh/I+Qb8mKiyjZpHO/h5i5sbppaG+mMPv +5GbN/dvvii+WTHuuM/g6zvyF+GOvyfLA/bRmez3zYyO9W29RPWnDQFTw1q43AgMB +AAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFFNw9E+5WtshFimqEnp6 +WQvW/EXtMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQwFAAOCAgEABdc9SCeg +Xz5mkfFh+wZoILbKSVY9qoP3Hp4WLAFpeQZiLSOoxvNLVIX4ENWYrM+wzVb+S32X +VA9kvl3QK/QJirECmvyyfMprJvKkzYF0ZjNUo0fWUGwJzja4lQjeExGte0dcsQYL +vCkqRRnt0v019E5kVDVkXgNBUipl06AULYmUAjJ9xAukbzZcIfr7XuGtpWRZzIGP +XA/R55Bn/KkJtWW7ALvB74auDpnnPT6PkJXTdgIlUOqJvtISRy0bLjv3r01ZkZvZ +aAEzmMswZpCSiFJCX0evKp4BvOBrc/e63FZC4WfU7pqtAS43PzA9h/gdcWug6I9g +R0tl50viFBfXmgYbyLcxeEJKDmHnfnWDwMENqAmsvLNroHNwdALkSdipcyA/pnYA +aR/8fXg5dYPlpuVy4F6mQhyQ4R4aASXG6NxsR7O+1Y6Q4FL4oE2IHV5kkwkUXJad +UHqicmqUZTynAe2cj+d28fmV4066TjbYiSfTRH/Ji6gJnpG9ySiYRCCHtMecjsfZ +Y+wj87Hgonlo4ek+S05aqdOPaUX5v1K6KrchPNN2GE6Tdz5OO2v2ACWyinbBn12X +dnnmQphmiOAQhu+wodWXUMTpoURWz+57cSnrKAvNbTz6DPvb1mU5UwNTfSQn09h4 +h31GcJwT1UuEv1xp188BqF4OvBPFXkjrhyE= +-----END CERTIFICATE----- + diff --git a/src/Tests/trustedroots.Tests/GivenCodeSigningCtlFile.cs b/src/Tests/trustedroots.Tests/GivenCodeSigningCtlFile.cs index 8304576ffa48..41483b5c8e9c 100644 --- a/src/Tests/trustedroots.Tests/GivenCodeSigningCtlFile.cs +++ b/src/Tests/trustedroots.Tests/GivenCodeSigningCtlFile.cs @@ -23,11 +23,13 @@ public GivenCodeSigningCtlFile() [InlineData("45140b3247eb9cc8c5b4f0d7b53091f73292089e6e5a63e2749dd3aca9198eda")] // CN=Go Daddy Root Certificate Authority - G2, O="GoDaddy.com, Inc.", L=Scottsdale, S=Arizona, C=US [InlineData("4b03f45807ad70f21bfc2cae71c9fde4604c064cf5ffb686bae5dbaad7fdd34c")] // CN=thawte Primary Root CA - G3, OU="(c) 2008 thawte, Inc. - For authorized use only", OU=Certification Services Division, O="thawte, Inc.", C=US [InlineData("52f0e1c4e58ec629291b60317f074671b85d7ea80d5b07273463534b32b40234")] // CN=COMODO RSA Certification Authority, O=COMODO CA Limited, L=Salford, S=Greater Manchester, C=GB + [InlineData("5367f20c7ade0e2bca790915056d086b720c33c1fa2a2661acf787e3292e1270")] // CN=Microsoft Identity Verification Root Certificate Authority 2020, O=Microsoft Corporation, C=US [InlineData("552f7bdcf1a7af9e6ce672017f4f12abf77240c78e761ac203d1d9d20ac89988")] // CN=DigiCert Trusted Root G4, OU=www.digicert.com, O=DigiCert Inc, C=US [InlineData("5c58468d55f58e497e743982d2b50010b6d165374acf83a7d4a32db768c4408e")] // CN=Certum Trusted Network CA, OU=Certum Certification Authority, O=Unizeto Technologies S.A., C=PL [InlineData("7353b6d6c2d6da4247773f3f07d075decb5134212bead0928ef1f46115260941")] // CN=DigiCert CS RSA4096 Root G5, O="DigiCert, Inc.", C=US [InlineData("7431e5f4c3c1ce4690774f0b61e05440883ba9a01ed00ba6abd7806ed3b118cf")] // CN=DigiCert High Assurance EV Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US [InlineData("7b9d553e1c92cb6e8803e137f4f287d4363757f5d44b37d52f9fca22fb97df86")] // CN=GlobalSign Code Signing Root R45, O=GlobalSign nv-sa, C=BE + [InlineData("7e76260ae69a55d3f060b0fd18b2a8c01443c87b60791030c9fa0b0585101a38")] // CN=Sectigo Public Code Signing Root R46, O=Sectigo Limited, C=GB [InlineData("85666a562ee0be5ce925c1d8890a6f76a87ec16d4d7d5f29ea7419cf20123b69")] // CN=SSL.com Root Certification Authority RSA, O=SSL Corporation, L=Houston, S=Texas, C=US [InlineData("85a0dd7dd720adb7ff05f83d542b209dc7ff4528f7d677b18389fea5e5c49e86")] // CN=QuoVadis Root CA 2, O=QuoVadis Limited, C=BM [InlineData("8d722f81a9c113c0791df136a2966db26c950a971db46b4199f4ea54b78bfb9f")] // CN=thawte Primary Root CA, OU="(c) 2006 thawte, Inc. - For authorized use only", OU=Certification Services Division, O="thawte, Inc.", C=US diff --git a/src/Tests/trustedroots.Tests/GivenTimestampingCtlFile.cs b/src/Tests/trustedroots.Tests/GivenTimestampingCtlFile.cs index 8096fe3a1d9e..7d2f255c9479 100644 --- a/src/Tests/trustedroots.Tests/GivenTimestampingCtlFile.cs +++ b/src/Tests/trustedroots.Tests/GivenTimestampingCtlFile.cs @@ -25,10 +25,10 @@ public GivenTimestampingCtlFile() [InlineData("5c58468d55f58e497e743982d2b50010b6d165374acf83a7d4a32db768c4408e")] // CN=Certum Trusted Network CA, OU=Certum Certification Authority, O=Unizeto Technologies S.A., C=PL [InlineData("6dc47172e01cbcb0bf62580d895fe2b8ac9ad4f873801e0c10b9c837d21eb177")] // CN=Entrust.net Certification Authority (2048), OU=(c) 1999 Entrust.net Limited, OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), O=Entrust.net [InlineData("6fff78e400a70c11011cd85977c459fb5af96a3df0540820d0f4b8607875e58f")] // CN=UTN-USERFirst-Object, OU=http://www.usertrust.com, O=The USERTRUST Network, L=Salt Lake City, S=UT, C=US + [InlineData("85666a562ee0be5ce925c1d8890a6f76a87ec16d4d7d5f29ea7419cf20123b69")] // CN=SSL.com Root Certification Authority RSA, O=SSL Corporation, L=Houston, S=Texas, C=US [InlineData("8a866fd1b276b57e578e921c65828a2bed58e9f2f288054134b7f1f4bfc9cc74")] // CN=QuoVadis Root CA 1 G3, O=QuoVadis Limited, C=BM [InlineData("a45ede3bbbf09c8ae15c72efc07268d693a21c996fd51e67ca079460fd6d8873")] // CN=QuoVadis Root Certification Authority, OU=Root Certification Authority, O=QuoVadis Limited, C=BM [InlineData("cbb522d7b7f127ad6a0113865bdf1cd4102e7d0759af635a7cf4720dc963c53b")] // CN=GlobalSign, O=GlobalSign, OU=GlobalSign Root CA - R3 - [InlineData("d7a7a0fb5d7e2731d771e9484ebcdef71d5f0c3e0a2948782bc83ee0ea699ef4")] // CN=AAA Certificate Services, O=Comodo CA Limited, L=Salford, S=Greater Manchester, C=GB [InlineData("e793c9b02fd8aa13e21c31228accb08119643b749c898964b1746d46c3d4cbd2")] // CN=USERTrust RSA Certification Authority, O=The USERTRUST Network, L=Jersey City, S=New Jersey, C=US public void File_contains_certificates_used_in_NuGet_org_package_signatures(string expectedFingerprint) { From 06f3f379d05c734015d78076762f3d83386774fc Mon Sep 17 00:00:00 2001 From: Damon Tivel Date: Wed, 12 Jun 2024 15:56:03 -0700 Subject: [PATCH 012/159] 2024-06 CTL --- .../redist/trustedroots/codesignctl.pem | 48 +++++++++++++++++++ .../redist/trustedroots/timestampctl.pem | 48 +++++++++++++++++++ .../GivenCodeSigningCtlFile.cs | 2 + .../GivenTimestampingCtlFile.cs | 2 +- 4 files changed, 99 insertions(+), 1 deletion(-) diff --git a/src/Layout/redist/trustedroots/codesignctl.pem b/src/Layout/redist/trustedroots/codesignctl.pem index 11978a9a649f..021bd8997f77 100644 --- a/src/Layout/redist/trustedroots/codesignctl.pem +++ b/src/Layout/redist/trustedroots/codesignctl.pem @@ -8620,3 +8620,51 @@ e0G4FBVWdtOW4xWFZAIwJOT2+L0Tbjq3P9y/zXjfJoBXEq9oZ0//8iuxoqGZtMOT G456y3y/FI7r6rj+4QNf -----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIFeDCCA2CgAwIBAgIQSyw7AQGLrSq8jHtbPu2QVzANBgkqhkiG9w0BAQwFADBW +MQswCQYDVQQGEwJHQjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMS0wKwYDVQQD +EyRTZWN0aWdvIFB1YmxpYyBDb2RlIFNpZ25pbmcgUm9vdCBSNDYwHhcNMjEwMzIy +MDAwMDAwWhcNNDYwMzIxMjM1OTU5WjBWMQswCQYDVQQGEwJHQjEYMBYGA1UEChMP +U2VjdGlnbyBMaW1pdGVkMS0wKwYDVQQDEyRTZWN0aWdvIFB1YmxpYyBDb2RlIFNp +Z25pbmcgUm9vdCBSNDYwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCN +55QSIgQkdC7/FiMCkoq2rjaFrEfUI5ErPtx94jGgUW+shJHjUoq14pbe0IdjJImK +/+8Skzt9u7aKvb0Ffyeba2XTpQxpsbxJOZrxbW6q5KCDJ9qaDStQ6Utbs7hkNqR+ +Sj2pcaths3OzPAsM79szV+W+NDfjlxtd/R8SPYIDdub7P2bSlDFp+m2zNKzBenjc +klDyZMeqLQSrw2rq4C+np9xu1+j/2iGrQL+57g2extmeme/G3h+pDHazJyCh1rr9 +gOcB0u/rgimVcI3/uxXP/tEPNqIuTzKQdEZrRzUTdwUzT2MuuC3hv2WnBGsY2HH6 +zAjybYmZELGt2z4s5KoYsMYHAXVn3m3pY2MeNn9pib6qRT5uWl+PoVvLnTCGMOgD +s0DGDQ84zWeoU4j6uDBl+m/H5x2xg3RpPqzEaDux5mczmrYI4IAFSEDu9oJkRqj1 +c7AGlfJsZZ+/VVscnFcax3hGfHCqlBuCF6yH6bbJDoEcQNYWFyn8XJwYK+pF9e+9 +1WdPKF4F7pBMeufG9ND8+s0+MkYTIDaKBOq3qgdGnA2TOglmmVhcKaO5DKYwODzQ +RjY1fJy67sPV+Qp2+n4FG0DKkjXp1XrRtX8ArqmQqsV/AZwQsRb8zG4Y3G9i/qZQ +p7h7uJ0VP/4gDHXIIloTlRmQAOka1cKG8eOO7F/05QIDAQABo0IwQDAdBgNVHQ4E +FgQUMuuSmv81lkgvKEBCcCA2kVwXheYwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB +/wQFMAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAHZlwuPXIkrXHYle/2lexhQCTXOm +zc0oyrA36r+nySGqql/av/aDbNCA0QpcAKTL88w5D55BcYjVPOiKe4wXI/fKNHSR +bAauUD8AWbImPDwXg1cDPi3RGj3UzwdUskMLUnKoiPXEF/Jv0Vil0WjkPZgIGO42 +9EhImvpUcPCI1HAWMEJJ0Nk/dUtFcdiuorthDoiFUFe5uhErNikfjyBynlyeidGC +2kWNapnahHFrM6UQu3nwl/Z0gaA/V8eGjDCMDjiVrgHGHqvcqB9vL9f/dh6uF3Nt +5bl1s2EGqJUzwk5vsjfylb6FVBK5yL1iQnb3Kvz1NzEDJlf+0ebb8BYCcoOMCLOE +rKnkB/ihiMQTWlBHVEKm7dBBNCyYsT6iNKEMXb2s9395p79tDFYyhRtLl7jhrOSk +PHHxo+FOY9b0Rrr1CwjhYzztolkvCtQsayOinqFN7tESzRgzUO1Bbst/PUFgC2ML +ePV170MVtzYLEK/cXBipmNk22R3YhLMGioLjexskp0LO7g8+VlwyfexL3lYrOzu6 ++XpY0FG2bNb2WKJSJHpEhqEcYD9J0/z6+YQcBcI0v+Lm8RkqmS9WVzWctfUHw0Yv +3jg9GQ37o/HfE57nqXJYMa+96trX1m13MzOO9Kz9wb9Jh9JwBWd0Bqb2eEAtFgSR +Dx/TFsS4ehcNJMmy +-----END CERTIFICATE----- + +-----BEGIN CERTIFICATE----- +MIICKDCCAa+gAwIBAgIQUCSbou+Opr9sLB8aY4XUwzAKBggqhkjOPQQDAzBWMQsw +CQYDVQQGEwJHQjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMS0wKwYDVQQDEyRT +ZWN0aWdvIFB1YmxpYyBDb2RlIFNpZ25pbmcgUm9vdCBFNDYwHhcNMjEwMzIyMDAw +MDAwWhcNNDYwMzIxMjM1OTU5WjBWMQswCQYDVQQGEwJHQjEYMBYGA1UEChMPU2Vj +dGlnbyBMaW1pdGVkMS0wKwYDVQQDEyRTZWN0aWdvIFB1YmxpYyBDb2RlIFNpZ25p +bmcgUm9vdCBFNDYwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQIMoEDH487om+BR4zl +e7m6wWmyW0nAKLkUWG8kM85Qm3PZO8FoOZx6Yc5c0iJHRKuAhanllayqrmZYhlan +uIODzLTRDqlR+EtnOX+MubY5aDSPGUq6jiHrQrisVp0J3AejQjBAMB0GA1UdDgQW +BBTPfSygkHqYHd22XoXC4NoVcdLlXjAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/ +BAUwAwEB/zAKBggqhkjOPQQDAwNnADBkAjACd++zAerlV83j8HflRwwwlLmgchbs +aGX/4g44dv/oG8KfzCVTRg6sZHMobtK0IqYCMGk5W6+oBFyZMtOebrSwXs8lGjll +/zHz43Zy8DMXO+iiqzSEwWGneZ6KupkGGqfVKw== +-----END CERTIFICATE----- + diff --git a/src/Layout/redist/trustedroots/timestampctl.pem b/src/Layout/redist/trustedroots/timestampctl.pem index 592079fa33ae..e11dc73a8817 100644 --- a/src/Layout/redist/trustedroots/timestampctl.pem +++ b/src/Layout/redist/trustedroots/timestampctl.pem @@ -9257,3 +9257,51 @@ sEn9loiN7TPb5cHvtvLTRX9Dvr82zadlqpFiHzd/7Uvv7nMXbi8LgNW1asp98aib oTM3VxKKcl+Yqg== -----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICNjCCAb2gAwIBAgIUNdzqqPFud6Xd/BatNpw0vRVFzikwCgYIKoZIzj0EAwMw +WzELMAkGA1UEBhMCTkwxIDAeBgNVBAoMF1F1b1ZhZGlzIFRydXN0bGluayBCLlYu +MSowKAYDVQQDDCFRdW9WYWRpcyBTaWduaW5nIEVDQyBQMzg0IFJvb3QgRzQwHhcN +MjMwMzE2MTUzNjAyWhcNNDgwMzA5MTUzNjAxWjBbMQswCQYDVQQGEwJOTDEgMB4G +A1UECgwXUXVvVmFkaXMgVHJ1c3RsaW5rIEIuVi4xKjAoBgNVBAMMIVF1b1ZhZGlz +IFNpZ25pbmcgRUNDIFAzODQgUm9vdCBHNDB2MBAGByqGSM49AgEGBSuBBAAiA2IA +BFI7CA12eXWd/JJ/J6R9xlocD5E82+Q5+IKq2PzmYohXxrVz2z72REWsGaRBYykL +liyHxKYC012KoqjnXjbs38WhRVVKDFRRkBCcHpoM+PM0sJSy54NIx1jKetHHJGgF +LKNCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUWRZsDiAtkUp02ppPs/4p +UbnpynwwDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMDA2cAMGQCMBZ8eADXpJ2W +4XVLDPFJMoABShYkMQVq5PHCRA1/t5l5Lgkw15p6O0DmoSYM500L/QIwRmBoIwwu +shW7GPd4iqd4bGvn1U+4UL+binQ0f4vyuAw62hoABxh7IH+mdNN+g6gT +-----END CERTIFICATE----- + +-----BEGIN CERTIFICATE----- +MIIFhjCCA26gAwIBAgIUDx0XQGkARJQ7rWtetIcEV1mwgI0wDQYJKoZIhvcNAQEM +BQAwWzELMAkGA1UEBhMCTkwxIDAeBgNVBAoMF1F1b1ZhZGlzIFRydXN0bGluayBC +LlYuMSowKAYDVQQDDCFRdW9WYWRpcyBTaWduaW5nIFJTQSA0MDk2IFJvb3QgRzQw +HhcNMjMwMzE2MTUzMjQ4WhcNNDgwMzA5MTUzMjQ3WjBbMQswCQYDVQQGEwJOTDEg +MB4GA1UECgwXUXVvVmFkaXMgVHJ1c3RsaW5rIEIuVi4xKjAoBgNVBAMMIVF1b1Zh +ZGlzIFNpZ25pbmcgUlNBIDQwOTYgUm9vdCBHNDCCAiIwDQYJKoZIhvcNAQEBBQAD +ggIPADCCAgoCggIBANCMA/gAIDZZWuEcZP0bo8ss5R5zIRDr5DYOLLh2vyg6HsEK +lEXzWuk7wBrF/Od8OMzpHCy3eWGse+BO9i63oTIVG5Usix1Q9qWzsBtj8kbCw1ah +ydO8E87y24Yapmjr/e+jY6++44IZ/dcSBK5vmJsUr6j353+z1npzUQNo5JeB01o8 +M73Gwf3kfkkc4xQNj8FluJcrYVr88zQ27Gcpe9JMkCrSpkKpxsgByVy/XDcx/gZZ +V+5urRyeovFq3IjllYTV1h4BnVAW4y9xraGRIKayq/4IKAI2L0OYjDucphkEmrWx +fP6wDX+kMCPCbw8jAWv/2fOFgq0Fq2xAp4FQbQF/xgTcDsm5zq9p8QOsw8wV4B7q ++2N+NGtSU/CYTPydg13Dik8/k71zWkWhuQ9S8LChI4MKh+lsKaLEN574U5UABwyo +OSDDRurBPRQZrEtzebgE7lwMo3WWWrVuAp5e8rtyLNrxaSVcIDjqRydWbNLF+BB2 +3iKUaZ3tV6RspDUpmsp9Gl9VRErEVJ+/O5kS0M1oMyK9LB3GGTOkW4SGhEMJQiW5 +4pcs8ZQHrF6QjAEib6Ur9DcEB6vI10xQh/I+Qb8mKiyjZpHO/h5i5sbppaG+mMPv +5GbN/dvvii+WTHuuM/g6zvyF+GOvyfLA/bRmez3zYyO9W29RPWnDQFTw1q43AgMB +AAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFFNw9E+5WtshFimqEnp6 +WQvW/EXtMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQwFAAOCAgEABdc9SCeg +Xz5mkfFh+wZoILbKSVY9qoP3Hp4WLAFpeQZiLSOoxvNLVIX4ENWYrM+wzVb+S32X +VA9kvl3QK/QJirECmvyyfMprJvKkzYF0ZjNUo0fWUGwJzja4lQjeExGte0dcsQYL +vCkqRRnt0v019E5kVDVkXgNBUipl06AULYmUAjJ9xAukbzZcIfr7XuGtpWRZzIGP +XA/R55Bn/KkJtWW7ALvB74auDpnnPT6PkJXTdgIlUOqJvtISRy0bLjv3r01ZkZvZ +aAEzmMswZpCSiFJCX0evKp4BvOBrc/e63FZC4WfU7pqtAS43PzA9h/gdcWug6I9g +R0tl50viFBfXmgYbyLcxeEJKDmHnfnWDwMENqAmsvLNroHNwdALkSdipcyA/pnYA +aR/8fXg5dYPlpuVy4F6mQhyQ4R4aASXG6NxsR7O+1Y6Q4FL4oE2IHV5kkwkUXJad +UHqicmqUZTynAe2cj+d28fmV4066TjbYiSfTRH/Ji6gJnpG9ySiYRCCHtMecjsfZ +Y+wj87Hgonlo4ek+S05aqdOPaUX5v1K6KrchPNN2GE6Tdz5OO2v2ACWyinbBn12X +dnnmQphmiOAQhu+wodWXUMTpoURWz+57cSnrKAvNbTz6DPvb1mU5UwNTfSQn09h4 +h31GcJwT1UuEv1xp188BqF4OvBPFXkjrhyE= +-----END CERTIFICATE----- + diff --git a/src/Tests/trustedroots.Tests/GivenCodeSigningCtlFile.cs b/src/Tests/trustedroots.Tests/GivenCodeSigningCtlFile.cs index 8304576ffa48..41483b5c8e9c 100644 --- a/src/Tests/trustedroots.Tests/GivenCodeSigningCtlFile.cs +++ b/src/Tests/trustedroots.Tests/GivenCodeSigningCtlFile.cs @@ -23,11 +23,13 @@ public GivenCodeSigningCtlFile() [InlineData("45140b3247eb9cc8c5b4f0d7b53091f73292089e6e5a63e2749dd3aca9198eda")] // CN=Go Daddy Root Certificate Authority - G2, O="GoDaddy.com, Inc.", L=Scottsdale, S=Arizona, C=US [InlineData("4b03f45807ad70f21bfc2cae71c9fde4604c064cf5ffb686bae5dbaad7fdd34c")] // CN=thawte Primary Root CA - G3, OU="(c) 2008 thawte, Inc. - For authorized use only", OU=Certification Services Division, O="thawte, Inc.", C=US [InlineData("52f0e1c4e58ec629291b60317f074671b85d7ea80d5b07273463534b32b40234")] // CN=COMODO RSA Certification Authority, O=COMODO CA Limited, L=Salford, S=Greater Manchester, C=GB + [InlineData("5367f20c7ade0e2bca790915056d086b720c33c1fa2a2661acf787e3292e1270")] // CN=Microsoft Identity Verification Root Certificate Authority 2020, O=Microsoft Corporation, C=US [InlineData("552f7bdcf1a7af9e6ce672017f4f12abf77240c78e761ac203d1d9d20ac89988")] // CN=DigiCert Trusted Root G4, OU=www.digicert.com, O=DigiCert Inc, C=US [InlineData("5c58468d55f58e497e743982d2b50010b6d165374acf83a7d4a32db768c4408e")] // CN=Certum Trusted Network CA, OU=Certum Certification Authority, O=Unizeto Technologies S.A., C=PL [InlineData("7353b6d6c2d6da4247773f3f07d075decb5134212bead0928ef1f46115260941")] // CN=DigiCert CS RSA4096 Root G5, O="DigiCert, Inc.", C=US [InlineData("7431e5f4c3c1ce4690774f0b61e05440883ba9a01ed00ba6abd7806ed3b118cf")] // CN=DigiCert High Assurance EV Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US [InlineData("7b9d553e1c92cb6e8803e137f4f287d4363757f5d44b37d52f9fca22fb97df86")] // CN=GlobalSign Code Signing Root R45, O=GlobalSign nv-sa, C=BE + [InlineData("7e76260ae69a55d3f060b0fd18b2a8c01443c87b60791030c9fa0b0585101a38")] // CN=Sectigo Public Code Signing Root R46, O=Sectigo Limited, C=GB [InlineData("85666a562ee0be5ce925c1d8890a6f76a87ec16d4d7d5f29ea7419cf20123b69")] // CN=SSL.com Root Certification Authority RSA, O=SSL Corporation, L=Houston, S=Texas, C=US [InlineData("85a0dd7dd720adb7ff05f83d542b209dc7ff4528f7d677b18389fea5e5c49e86")] // CN=QuoVadis Root CA 2, O=QuoVadis Limited, C=BM [InlineData("8d722f81a9c113c0791df136a2966db26c950a971db46b4199f4ea54b78bfb9f")] // CN=thawte Primary Root CA, OU="(c) 2006 thawte, Inc. - For authorized use only", OU=Certification Services Division, O="thawte, Inc.", C=US diff --git a/src/Tests/trustedroots.Tests/GivenTimestampingCtlFile.cs b/src/Tests/trustedroots.Tests/GivenTimestampingCtlFile.cs index 8096fe3a1d9e..7d2f255c9479 100644 --- a/src/Tests/trustedroots.Tests/GivenTimestampingCtlFile.cs +++ b/src/Tests/trustedroots.Tests/GivenTimestampingCtlFile.cs @@ -25,10 +25,10 @@ public GivenTimestampingCtlFile() [InlineData("5c58468d55f58e497e743982d2b50010b6d165374acf83a7d4a32db768c4408e")] // CN=Certum Trusted Network CA, OU=Certum Certification Authority, O=Unizeto Technologies S.A., C=PL [InlineData("6dc47172e01cbcb0bf62580d895fe2b8ac9ad4f873801e0c10b9c837d21eb177")] // CN=Entrust.net Certification Authority (2048), OU=(c) 1999 Entrust.net Limited, OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), O=Entrust.net [InlineData("6fff78e400a70c11011cd85977c459fb5af96a3df0540820d0f4b8607875e58f")] // CN=UTN-USERFirst-Object, OU=http://www.usertrust.com, O=The USERTRUST Network, L=Salt Lake City, S=UT, C=US + [InlineData("85666a562ee0be5ce925c1d8890a6f76a87ec16d4d7d5f29ea7419cf20123b69")] // CN=SSL.com Root Certification Authority RSA, O=SSL Corporation, L=Houston, S=Texas, C=US [InlineData("8a866fd1b276b57e578e921c65828a2bed58e9f2f288054134b7f1f4bfc9cc74")] // CN=QuoVadis Root CA 1 G3, O=QuoVadis Limited, C=BM [InlineData("a45ede3bbbf09c8ae15c72efc07268d693a21c996fd51e67ca079460fd6d8873")] // CN=QuoVadis Root Certification Authority, OU=Root Certification Authority, O=QuoVadis Limited, C=BM [InlineData("cbb522d7b7f127ad6a0113865bdf1cd4102e7d0759af635a7cf4720dc963c53b")] // CN=GlobalSign, O=GlobalSign, OU=GlobalSign Root CA - R3 - [InlineData("d7a7a0fb5d7e2731d771e9484ebcdef71d5f0c3e0a2948782bc83ee0ea699ef4")] // CN=AAA Certificate Services, O=Comodo CA Limited, L=Salford, S=Greater Manchester, C=GB [InlineData("e793c9b02fd8aa13e21c31228accb08119643b749c898964b1746d46c3d4cbd2")] // CN=USERTrust RSA Certification Authority, O=The USERTRUST Network, L=Jersey City, S=New Jersey, C=US public void File_contains_certificates_used_in_NuGet_org_package_signatures(string expectedFingerprint) { From 308b9ad64cfc8cba1fc59370991e597454209c2a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 15 Jun 2024 12:44:47 +0000 Subject: [PATCH 013/159] Update dependencies from https://github.com/dotnet/razor build 20240614.2 Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal , Microsoft.CodeAnalysis.Razor.Tooling.Internal , Microsoft.NET.Sdk.Razor.SourceGenerators.Transport From Version 7.0.0-preview.24312.2 -> To Version 7.0.0-preview.24314.2 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c07a4e673ab3..3c471d786369 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -285,18 +285,18 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 - + https://github.com/dotnet/razor - c0bfb39f2018d2c077798ac992c799929df1453f + fc9b28705adcd7c5dbd6f5104ee1d992e857a9fb - + https://github.com/dotnet/razor - c0bfb39f2018d2c077798ac992c799929df1453f + fc9b28705adcd7c5dbd6f5104ee1d992e857a9fb - + https://github.com/dotnet/razor - c0bfb39f2018d2c077798ac992c799929df1453f + fc9b28705adcd7c5dbd6f5104ee1d992e857a9fb https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index fb59b41f7954..6f0d5fae6045 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -176,9 +176,9 @@ - 7.0.0-preview.24312.2 - 7.0.0-preview.24312.2 - 7.0.0-preview.24312.2 + 7.0.0-preview.24314.2 + 7.0.0-preview.24314.2 + 7.0.0-preview.24314.2 From d73873c48128d7d6a973a6ad64e2610bdf7272dc Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 15 Jun 2024 12:45:15 +0000 Subject: [PATCH 014/159] Update dependencies from https://github.com/dotnet/templating build 20240614.2 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.303-servicing.24311.4 -> To Version 8.0.303-servicing.24314.2 --- NuGet.config | 2 +- eng/Version.Details.xml | 10 +++++----- eng/Versions.props | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/NuGet.config b/NuGet.config index ca1f5e248d72..6baf4d7d0dc9 100644 --- a/NuGet.config +++ b/NuGet.config @@ -23,7 +23,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c07a4e673ab3..fa1750142752 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,15 +3,15 @@ https://github.com/dotnet/templating - 7248c3c1d6996893bc52c49520707994463aec29 + 2c8137bda50484d21e263aaac51dad537ba57cc8 - + https://github.com/dotnet/templating - 7248c3c1d6996893bc52c49520707994463aec29 + 2c8137bda50484d21e263aaac51dad537ba57cc8 - + https://github.com/dotnet/templating - 7248c3c1d6996893bc52c49520707994463aec29 + 2c8137bda50484d21e263aaac51dad537ba57cc8 diff --git a/eng/Versions.props b/eng/Versions.props index fb59b41f7954..096cfc32e562 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -144,7 +144,7 @@ $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 8.0.303-servicing.24311.4 + 8.0.303-servicing.24314.2 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion) From 0bd63554c1b286bb91632dcaf2e4eef4ec67e5c7 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 15 Jun 2024 12:47:19 +0000 Subject: [PATCH 015/159] Update dependencies from https://github.com/dotnet/arcade build 20240611.3 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 8.0.0-beta.24310.5 -> To Version 8.0.0-beta.24311.3 From bc938c63d65e94be8297aa86ebb9d1671f61bdb9 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 16 Jun 2024 12:38:00 +0000 Subject: [PATCH 016/159] Update dependencies from https://github.com/dotnet/razor build 20240614.2 Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal , Microsoft.CodeAnalysis.Razor.Tooling.Internal , Microsoft.NET.Sdk.Razor.SourceGenerators.Transport From Version 7.0.0-preview.24312.2 -> To Version 7.0.0-preview.24314.2 From 66ca80c5aca56fc89c28d5a8e1d734c5ffa99563 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 16 Jun 2024 12:38:31 +0000 Subject: [PATCH 017/159] Update dependencies from https://github.com/dotnet/templating build 20240614.2 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.303-servicing.24311.4 -> To Version 8.0.303-servicing.24314.2 From 4b168dc968c29c1bdb6790b0fed5e40d5e10dff6 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 16 Jun 2024 12:40:33 +0000 Subject: [PATCH 018/159] Update dependencies from https://github.com/dotnet/arcade build 20240611.3 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 8.0.0-beta.24310.5 -> To Version 8.0.0-beta.24311.3 From 3a8dccce312dc59939766a28afd91d85655f3975 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 17 Jun 2024 12:31:15 +0000 Subject: [PATCH 019/159] Update dependencies from https://github.com/microsoft/vstest build 20240617.2 Microsoft.NET.Test.Sdk , Microsoft.TestPlatform.Build , Microsoft.TestPlatform.CLI From Version 17.10.0-release-24272-11 -> To Version 17.10.0-release-24317-02 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c07a4e673ab3..eec9b4d3cd20 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -187,18 +187,18 @@ https://github.com/nuget/nuget.client fb50d1a45ed10b39b5f335bc3a4bdcaea9b951cf - + https://github.com/microsoft/vstest - 83d73f783bf54c336d1eab04a53d554f8a6c0b19 + c4d80397805bec06b354d20aeb1773e243c6add0 - + https://github.com/microsoft/vstest - 83d73f783bf54c336d1eab04a53d554f8a6c0b19 + c4d80397805bec06b354d20aeb1773e243c6add0 - + https://github.com/microsoft/vstest - 83d73f783bf54c336d1eab04a53d554f8a6c0b19 + c4d80397805bec06b354d20aeb1773e243c6add0 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index fb59b41f7954..080b1362d391 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -100,9 +100,9 @@ - 17.10.0-release-24272-11 - 17.10.0-release-24272-11 - 17.10.0-release-24272-11 + 17.10.0-release-24317-02 + 17.10.0-release-24317-02 + 17.10.0-release-24317-02 From c12e91a116c4cd08819177c9cb20c66d108569bd Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 17 Jun 2024 12:31:52 +0000 Subject: [PATCH 020/159] Update dependencies from https://github.com/dotnet/razor build 20240614.2 Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal , Microsoft.CodeAnalysis.Razor.Tooling.Internal , Microsoft.NET.Sdk.Razor.SourceGenerators.Transport From Version 7.0.0-preview.24312.2 -> To Version 7.0.0-preview.24314.2 From ebbd5cecddd08e409bc20b5e04c3e81cc95131b8 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 17 Jun 2024 12:32:24 +0000 Subject: [PATCH 021/159] Update dependencies from https://github.com/dotnet/templating build 20240614.2 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.303-servicing.24311.4 -> To Version 8.0.303-servicing.24314.2 From 0aad89a92e541e92f18746c96d0834a8efdfe279 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 17 Jun 2024 12:34:27 +0000 Subject: [PATCH 022/159] Update dependencies from https://github.com/dotnet/arcade build 20240611.3 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 8.0.0-beta.24310.5 -> To Version 8.0.0-beta.24311.3 From b9fb211238c0a1be4af509c366f870badfb2e863 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 18 Jun 2024 11:25:45 +0000 Subject: [PATCH 023/159] Update dependencies from https://github.com/dotnet/roslyn build 20240618.1 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.8.0-7.24312.15 -> To Version 4.8.0-7.24318.1 --- NuGet.config | 1 + eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/NuGet.config b/NuGet.config index fc5e64092a4c..850f5582062f 100644 --- a/NuGet.config +++ b/NuGet.config @@ -19,6 +19,7 @@ + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index fdb7460d806c..66ac3a1f0d9b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -82,34 +82,34 @@ 551db7f100a4a8222cb2f6a3fc9036113ff7de42 - + https://github.com/dotnet/roslyn - 014f91653a3467b3895b70d5723b08683f02a0bf + 4f7be70476bfc539fcef6633c2e9d3a9dc530443 - + https://github.com/dotnet/roslyn - 014f91653a3467b3895b70d5723b08683f02a0bf + 4f7be70476bfc539fcef6633c2e9d3a9dc530443 - + https://github.com/dotnet/roslyn - 014f91653a3467b3895b70d5723b08683f02a0bf + 4f7be70476bfc539fcef6633c2e9d3a9dc530443 - + https://github.com/dotnet/roslyn - 014f91653a3467b3895b70d5723b08683f02a0bf + 4f7be70476bfc539fcef6633c2e9d3a9dc530443 - + https://github.com/dotnet/roslyn - 014f91653a3467b3895b70d5723b08683f02a0bf + 4f7be70476bfc539fcef6633c2e9d3a9dc530443 - + https://github.com/dotnet/roslyn - 014f91653a3467b3895b70d5723b08683f02a0bf + 4f7be70476bfc539fcef6633c2e9d3a9dc530443 - + https://github.com/dotnet/roslyn - 014f91653a3467b3895b70d5723b08683f02a0bf + 4f7be70476bfc539fcef6633c2e9d3a9dc530443 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index d4905851f757..47302a992edb 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -151,13 +151,13 @@ - 4.8.0-7.24313.8 - 4.8.0-7.24313.8 - 4.8.0-7.24313.8 - 4.8.0-7.24313.8 - 4.8.0-7.24313.8 - 4.8.0-7.24313.8 - 4.8.0-7.24313.8 + 4.8.0-7.24318.1 + 4.8.0-7.24318.1 + 4.8.0-7.24318.1 + 4.8.0-7.24318.1 + 4.8.0-7.24318.1 + 4.8.0-7.24318.1 + 4.8.0-7.24318.1 $(MicrosoftNetCompilersToolsetPackageVersion) From 37302cb1eddcd55e9f3c00a3c72e387f7d9af38b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 18 Jun 2024 12:45:36 +0000 Subject: [PATCH 024/159] Update dependencies from https://github.com/microsoft/vstest build 20240617.2 Microsoft.NET.Test.Sdk , Microsoft.TestPlatform.Build , Microsoft.TestPlatform.CLI From Version 17.10.0-release-24272-11 -> To Version 17.10.0-release-24317-02 --- NuGet.config | 1 + 1 file changed, 1 insertion(+) diff --git a/NuGet.config b/NuGet.config index ca1f5e248d72..2fe66c7b93ed 100644 --- a/NuGet.config +++ b/NuGet.config @@ -24,6 +24,7 @@ + From 3c4fad0bd5e4ff655f85f834b7e8eaad52043955 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 18 Jun 2024 12:46:16 +0000 Subject: [PATCH 025/159] Update dependencies from https://github.com/dotnet/razor build 20240614.2 Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal , Microsoft.CodeAnalysis.Razor.Tooling.Internal , Microsoft.NET.Sdk.Razor.SourceGenerators.Transport From Version 7.0.0-preview.24312.2 -> To Version 7.0.0-preview.24314.2 --- NuGet.config | 1 + 1 file changed, 1 insertion(+) diff --git a/NuGet.config b/NuGet.config index ca1f5e248d72..2fe66c7b93ed 100644 --- a/NuGet.config +++ b/NuGet.config @@ -24,6 +24,7 @@ + From 9f444483393ce9a5e32a440e2d8728febc546c5d Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 18 Jun 2024 12:46:46 +0000 Subject: [PATCH 026/159] Update dependencies from https://github.com/dotnet/roslyn build 20240618.3 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.10.0-3.24312.19 -> To Version 4.10.0-3.24318.3 --- NuGet.config | 1 + eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/NuGet.config b/NuGet.config index ca1f5e248d72..2fe66c7b93ed 100644 --- a/NuGet.config +++ b/NuGet.config @@ -24,6 +24,7 @@ + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 206c729e37e1..88ab4fec9d77 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -82,34 +82,34 @@ d237e172b324021b97effa244af44d63d1a8bb7e - + https://github.com/dotnet/roslyn - 771f269b3abcbbd991f05becf8fe5e991d24b0c1 + 10c1f374ce445ebbcc17fe8b52564539591628a8 - + https://github.com/dotnet/roslyn - 771f269b3abcbbd991f05becf8fe5e991d24b0c1 + 10c1f374ce445ebbcc17fe8b52564539591628a8 - + https://github.com/dotnet/roslyn - 771f269b3abcbbd991f05becf8fe5e991d24b0c1 + 10c1f374ce445ebbcc17fe8b52564539591628a8 - + https://github.com/dotnet/roslyn - 771f269b3abcbbd991f05becf8fe5e991d24b0c1 + 10c1f374ce445ebbcc17fe8b52564539591628a8 - + https://github.com/dotnet/roslyn - 771f269b3abcbbd991f05becf8fe5e991d24b0c1 + 10c1f374ce445ebbcc17fe8b52564539591628a8 - + https://github.com/dotnet/roslyn - 771f269b3abcbbd991f05becf8fe5e991d24b0c1 + 10c1f374ce445ebbcc17fe8b52564539591628a8 - + https://github.com/dotnet/roslyn - 771f269b3abcbbd991f05becf8fe5e991d24b0c1 + 10c1f374ce445ebbcc17fe8b52564539591628a8 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 734ba59756cd..a3a2bc3d943b 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -155,13 +155,13 @@ - 4.10.0-3.24312.19 - 4.10.0-3.24312.19 - 4.10.0-3.24312.19 - 4.10.0-3.24312.19 - 4.10.0-3.24312.19 - 4.10.0-3.24312.19 - 4.10.0-3.24312.19 + 4.10.0-3.24318.3 + 4.10.0-3.24318.3 + 4.10.0-3.24318.3 + 4.10.0-3.24318.3 + 4.10.0-3.24318.3 + 4.10.0-3.24318.3 + 4.10.0-3.24318.3 $(MicrosoftNetCompilersToolsetPackageVersion) From 5a91dac0100f40f92416154eebd82a6ac7096e5a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 18 Jun 2024 12:47:18 +0000 Subject: [PATCH 027/159] Update dependencies from https://github.com/dotnet/templating build 20240614.2 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.303-servicing.24311.4 -> To Version 8.0.303-servicing.24314.2 From e6e6a12e6780f7ba17cb5bb9c6b698fb1023eeba Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 19 Jun 2024 12:31:10 +0000 Subject: [PATCH 028/159] Update dependencies from https://github.com/microsoft/vstest build 20240617.2 Microsoft.NET.Test.Sdk , Microsoft.TestPlatform.Build , Microsoft.TestPlatform.CLI From Version 17.10.0-release-24272-11 -> To Version 17.10.0-release-24317-02 From 11a21c43435993a77826e7df5e97eb7999eea712 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 19 Jun 2024 12:31:47 +0000 Subject: [PATCH 029/159] Update dependencies from https://github.com/dotnet/razor build 20240614.2 Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal , Microsoft.CodeAnalysis.Razor.Tooling.Internal , Microsoft.NET.Sdk.Razor.SourceGenerators.Transport From Version 7.0.0-preview.24312.2 -> To Version 7.0.0-preview.24314.2 From 85ed2b09a8662b7fc9ad4425aed778994c8d13d0 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 19 Jun 2024 12:32:21 +0000 Subject: [PATCH 030/159] Update dependencies from https://github.com/dotnet/roslyn build 20240618.3 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.10.0-3.24312.19 -> To Version 4.10.0-3.24318.3 From e9c90bfb45a401fe9d0ac77414769db621059b4b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 19 Jun 2024 12:32:55 +0000 Subject: [PATCH 031/159] Update dependencies from https://github.com/dotnet/templating build 20240614.2 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.303-servicing.24311.4 -> To Version 8.0.303-servicing.24314.2 From aacfaf5ee70fa08a96025001c6712e4bd87b3a59 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 20 Jun 2024 12:28:12 +0000 Subject: [PATCH 032/159] Update dependencies from https://github.com/microsoft/vstest build 20240617.2 Microsoft.NET.Test.Sdk , Microsoft.TestPlatform.Build , Microsoft.TestPlatform.CLI From Version 17.10.0-release-24272-11 -> To Version 17.10.0-release-24317-02 From 1c48ffd3fd667fe90fe9d2f620daec0147290c52 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 20 Jun 2024 12:28:40 +0000 Subject: [PATCH 033/159] Update dependencies from https://github.com/dotnet/razor build 20240614.2 Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal , Microsoft.CodeAnalysis.Razor.Tooling.Internal , Microsoft.NET.Sdk.Razor.SourceGenerators.Transport From Version 7.0.0-preview.24312.2 -> To Version 7.0.0-preview.24314.2 From 09b59b883917ce52e445ce65db6a09017173f902 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 20 Jun 2024 12:29:12 +0000 Subject: [PATCH 034/159] Update dependencies from https://github.com/dotnet/roslyn build 20240618.3 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.10.0-3.24312.19 -> To Version 4.10.0-3.24318.3 From da527ecd5a40c64bba146001a57aee3a0b0ab50d Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 20 Jun 2024 12:29:48 +0000 Subject: [PATCH 035/159] Update dependencies from https://github.com/dotnet/templating build 20240614.2 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.303-servicing.24311.4 -> To Version 8.0.303-servicing.24314.2 From 94f324e4d9bdf9fd58147d63dddf6618f1e07e63 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 21 Jun 2024 12:46:18 +0000 Subject: [PATCH 036/159] Update dependencies from https://github.com/microsoft/vstest build 20240617.2 Microsoft.NET.Test.Sdk , Microsoft.TestPlatform.Build , Microsoft.TestPlatform.CLI From Version 17.10.0-release-24272-11 -> To Version 17.10.0-release-24317-02 From 4282bf938ea687abf9f801c154ee1f697e810896 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 21 Jun 2024 12:46:49 +0000 Subject: [PATCH 037/159] Update dependencies from https://github.com/dotnet/razor build 20240614.2 Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal , Microsoft.CodeAnalysis.Razor.Tooling.Internal , Microsoft.NET.Sdk.Razor.SourceGenerators.Transport From Version 7.0.0-preview.24312.2 -> To Version 7.0.0-preview.24314.2 From 6369cad0d94cb07ff2ae30c4b1af4d68ede922a1 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 21 Jun 2024 12:47:20 +0000 Subject: [PATCH 038/159] Update dependencies from https://github.com/dotnet/roslyn build 20240618.3 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.10.0-3.24312.19 -> To Version 4.10.0-3.24318.3 From 14f0b2c11b77aa9c2407a1e578c1a189c0fc3d79 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 21 Jun 2024 12:47:55 +0000 Subject: [PATCH 039/159] Update dependencies from https://github.com/dotnet/templating build 20240614.2 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.303-servicing.24311.4 -> To Version 8.0.303-servicing.24314.2 From 1e4f3371326a00fd9e5073f6aeb5b032db45ecec Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 22 Jun 2024 12:51:51 +0000 Subject: [PATCH 040/159] Update dependencies from https://github.com/microsoft/vstest build 20240617.2 Microsoft.NET.Test.Sdk , Microsoft.TestPlatform.Build , Microsoft.TestPlatform.CLI From Version 17.10.0-release-24272-11 -> To Version 17.10.0-release-24317-02 From daed755b2c36a2f58e947a6b2258f5a301d35533 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 22 Jun 2024 12:52:22 +0000 Subject: [PATCH 041/159] Update dependencies from https://github.com/dotnet/razor build 20240614.2 Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal , Microsoft.CodeAnalysis.Razor.Tooling.Internal , Microsoft.NET.Sdk.Razor.SourceGenerators.Transport From Version 7.0.0-preview.24312.2 -> To Version 7.0.0-preview.24314.2 From 3c9cbea78dcdbd2863311ee0f41bfd386edf8040 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 22 Jun 2024 12:54:04 +0000 Subject: [PATCH 042/159] Update dependencies from https://github.com/dotnet/roslyn build 20240618.3 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.10.0-3.24312.19 -> To Version 4.10.0-3.24318.3 From 128de5bd6a0ad974e9e52549f26f727f449ded4e Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 22 Jun 2024 12:54:39 +0000 Subject: [PATCH 043/159] Update dependencies from https://github.com/dotnet/templating build 20240614.2 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.303-servicing.24311.4 -> To Version 8.0.303-servicing.24314.2 From d27f0a5597bbad652028f587311deecd17f765d7 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 22 Jun 2024 12:58:31 +0000 Subject: [PATCH 044/159] Update dependencies from https://github.com/dotnet/arcade build 20240621.3 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 8.0.0-beta.24311.3 -> To Version 8.0.0-beta.24321.3 --- NuGet.config | 1 + eng/Version.Details.xml | 16 +++---- eng/Versions.props | 4 +- .../templates-official/job/source-build.yml | 8 ++++ .../templates-official/jobs/source-build.yml | 8 ++++ .../steps/enable-internal-runtimes.yml | 28 ++++++++++++ .../steps/get-delegation-sas.yml | 43 +++++++++++++++++++ .../steps/get-federated-access-token.yml | 28 ++++++++++++ eng/common/templates/job/source-build.yml | 8 ++++ eng/common/templates/jobs/source-build.yml | 8 ++++ .../steps/enable-internal-runtimes.yml | 28 ++++++++++++ .../templates/steps/get-delegation-sas.yml | 43 +++++++++++++++++++ .../steps/get-federated-access-token.yml | 28 ++++++++++++ global.json | 4 +- 14 files changed, 243 insertions(+), 12 deletions(-) create mode 100644 eng/common/templates-official/steps/enable-internal-runtimes.yml create mode 100644 eng/common/templates-official/steps/get-delegation-sas.yml create mode 100644 eng/common/templates-official/steps/get-federated-access-token.yml create mode 100644 eng/common/templates/steps/enable-internal-runtimes.yml create mode 100644 eng/common/templates/steps/get-delegation-sas.yml create mode 100644 eng/common/templates/steps/get-federated-access-token.yml diff --git a/NuGet.config b/NuGet.config index ca1f5e248d72..2fe66c7b93ed 100644 --- a/NuGet.config +++ b/NuGet.config @@ -24,6 +24,7 @@ + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 206c729e37e1..c5d071ecc34c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -483,22 +483,22 @@ - + https://github.com/dotnet/arcade - c214b6ad17aedca4fa48294d80f6c52ef2463081 + a95bcc256e9bdf47394e4dab04872811c16daaea - + https://github.com/dotnet/arcade - c214b6ad17aedca4fa48294d80f6c52ef2463081 + a95bcc256e9bdf47394e4dab04872811c16daaea - + https://github.com/dotnet/arcade - c214b6ad17aedca4fa48294d80f6c52ef2463081 + a95bcc256e9bdf47394e4dab04872811c16daaea - + https://github.com/dotnet/arcade - c214b6ad17aedca4fa48294d80f6c52ef2463081 + a95bcc256e9bdf47394e4dab04872811c16daaea https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 734ba59756cd..e20ee169fdfc 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -35,7 +35,7 @@ 7.0.0 4.0.0 7.0.0 - 8.0.0-beta.24311.3 + 8.0.0-beta.24321.3 7.0.0-preview.22423.2 8.0.0 4.3.0 @@ -210,7 +210,7 @@ 6.12.0 6.1.0 - 8.0.0-beta.24311.3 + 8.0.0-beta.24321.3 4.18.4 1.3.2 8.0.0-beta.23607.1 diff --git a/eng/common/templates-official/job/source-build.yml b/eng/common/templates-official/job/source-build.yml index f193dfbe2366..f983033bb028 100644 --- a/eng/common/templates-official/job/source-build.yml +++ b/eng/common/templates-official/job/source-build.yml @@ -31,6 +31,12 @@ parameters: # container and pool. platform: {} + # If set to true and running on a non-public project, + # Internal blob storage locations will be enabled. + # This is not enabled by default because many repositories do not need internal sources + # and do not need to have the required service connections approved in the pipeline. + enableInternalSources: false + jobs: - job: ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }} displayName: Source-Build (${{ parameters.platform.name }}) @@ -62,6 +68,8 @@ jobs: clean: all steps: + - ${{ if eq(parameters.enableInternalSources, true) }}: + - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml - template: /eng/common/templates-official/steps/source-build.yml parameters: platform: ${{ parameters.platform }} diff --git a/eng/common/templates-official/jobs/source-build.yml b/eng/common/templates-official/jobs/source-build.yml index 08e5db9bb116..5cf6a269c0b6 100644 --- a/eng/common/templates-official/jobs/source-build.yml +++ b/eng/common/templates-official/jobs/source-build.yml @@ -21,6 +21,12 @@ parameters: # one job runs on 'defaultManagedPlatform'. platforms: [] + # If set to true and running on a non-public project, + # Internal nuget and blob storage locations will be enabled. + # This is not enabled by default because many repositories do not need internal sources + # and do not need to have the required service connections approved in the pipeline. + enableInternalSources: false + jobs: - ${{ if ne(parameters.allCompletedJobId, '') }}: @@ -38,9 +44,11 @@ jobs: parameters: jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ platform }} + enableInternalSources: ${{ parameters.enableInternalSources }} - ${{ if eq(length(parameters.platforms), 0) }}: - template: /eng/common/templates-official/job/source-build.yml parameters: jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ parameters.defaultManagedPlatform }} + enableInternalSources: ${{ parameters.enableInternalSources }} diff --git a/eng/common/templates-official/steps/enable-internal-runtimes.yml b/eng/common/templates-official/steps/enable-internal-runtimes.yml new file mode 100644 index 000000000000..93a8394a666b --- /dev/null +++ b/eng/common/templates-official/steps/enable-internal-runtimes.yml @@ -0,0 +1,28 @@ +# Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' +# variable with the base64-encoded SAS token, by default + +parameters: +- name: federatedServiceConnection + type: string + default: 'dotnetbuilds-internal-read' +- name: outputVariableName + type: string + default: 'dotnetbuilds-internal-container-read-token-base64' +- name: expiryInHours + type: number + default: 1 +- name: base64Encode + type: boolean + default: true + +steps: +- ${{ if ne(variables['System.TeamProject'], 'public') }}: + - template: /eng/common/templates-official/steps/get-delegation-sas.yml + parameters: + federatedServiceConnection: ${{ parameters.federatedServiceConnection }} + outputVariableName: ${{ parameters.outputVariableName }} + expiryInHours: ${{ parameters.expiryInHours }} + base64Encode: ${{ parameters.base64Encode }} + storageAccount: dotnetbuilds + container: internal + permissions: rl diff --git a/eng/common/templates-official/steps/get-delegation-sas.yml b/eng/common/templates-official/steps/get-delegation-sas.yml new file mode 100644 index 000000000000..c0e8f91317f0 --- /dev/null +++ b/eng/common/templates-official/steps/get-delegation-sas.yml @@ -0,0 +1,43 @@ +parameters: +- name: federatedServiceConnection + type: string +- name: outputVariableName + type: string +- name: expiryInHours + type: number + default: 1 +- name: base64Encode + type: boolean + default: false +- name: storageAccount + type: string +- name: container + type: string +- name: permissions + type: string + default: 'rl' + +steps: +- task: AzureCLI@2 + displayName: 'Generate delegation SAS Token for ${{ parameters.storageAccount }}/${{ parameters.container }}' + inputs: + azureSubscription: ${{ parameters.federatedServiceConnection }} + scriptType: 'pscore' + scriptLocation: 'inlineScript' + inlineScript: | + # Calculate the expiration of the SAS token and convert to UTC + $expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") + + $sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv + + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to generate SAS token." + exit 1 + } + + if ('${{ parameters.base64Encode }}' -eq 'true') { + $sas = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($sas)) + } + + Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$sas" diff --git a/eng/common/templates-official/steps/get-federated-access-token.yml b/eng/common/templates-official/steps/get-federated-access-token.yml new file mode 100644 index 000000000000..e3786cef6dfd --- /dev/null +++ b/eng/common/templates-official/steps/get-federated-access-token.yml @@ -0,0 +1,28 @@ +parameters: +- name: federatedServiceConnection + type: string +- name: outputVariableName + type: string +# Resource to get a token for. Common values include: +# - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps +# - 'https://storage.azure.com/' for storage +# Defaults to Azure DevOps +- name: resource + type: string + default: '499b84ac-1321-427f-aa17-267ca6975798' + +steps: +- task: AzureCLI@2 + displayName: 'Getting federated access token for feeds' + inputs: + azureSubscription: ${{ parameters.federatedServiceConnection }} + scriptType: 'pscore' + scriptLocation: 'inlineScript' + inlineScript: | + $accessToken = az account get-access-token --query accessToken --resource ${{ parameters.resource }} --output tsv + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to get access token for resource '${{ parameters.resource }}'" + exit 1 + } + Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$accessToken" diff --git a/eng/common/templates/job/source-build.yml b/eng/common/templates/job/source-build.yml index 8a3deef2b727..c0ff472b697b 100644 --- a/eng/common/templates/job/source-build.yml +++ b/eng/common/templates/job/source-build.yml @@ -31,6 +31,12 @@ parameters: # container and pool. platform: {} + # If set to true and running on a non-public project, + # Internal blob storage locations will be enabled. + # This is not enabled by default because many repositories do not need internal sources + # and do not need to have the required service connections approved in the pipeline. + enableInternalSources: false + jobs: - job: ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }} displayName: Source-Build (${{ parameters.platform.name }}) @@ -61,6 +67,8 @@ jobs: clean: all steps: + - ${{ if eq(parameters.enableInternalSources, true) }}: + - template: /eng/common/templates/steps/enable-internal-runtimes.yml - template: /eng/common/templates/steps/source-build.yml parameters: platform: ${{ parameters.platform }} diff --git a/eng/common/templates/jobs/source-build.yml b/eng/common/templates/jobs/source-build.yml index a15b07eb51d9..5f46bfa895c1 100644 --- a/eng/common/templates/jobs/source-build.yml +++ b/eng/common/templates/jobs/source-build.yml @@ -21,6 +21,12 @@ parameters: # one job runs on 'defaultManagedPlatform'. platforms: [] + # If set to true and running on a non-public project, + # Internal nuget and blob storage locations will be enabled. + # This is not enabled by default because many repositories do not need internal sources + # and do not need to have the required service connections approved in the pipeline. + enableInternalSources: false + jobs: - ${{ if ne(parameters.allCompletedJobId, '') }}: @@ -38,9 +44,11 @@ jobs: parameters: jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ platform }} + enableInternalSources: ${{ parameters.enableInternalSources }} - ${{ if eq(length(parameters.platforms), 0) }}: - template: /eng/common/templates/job/source-build.yml parameters: jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ parameters.defaultManagedPlatform }} + enableInternalSources: ${{ parameters.enableInternalSources }} diff --git a/eng/common/templates/steps/enable-internal-runtimes.yml b/eng/common/templates/steps/enable-internal-runtimes.yml new file mode 100644 index 000000000000..54dc9416c519 --- /dev/null +++ b/eng/common/templates/steps/enable-internal-runtimes.yml @@ -0,0 +1,28 @@ +# Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' +# variable with the base64-encoded SAS token, by default + +parameters: +- name: federatedServiceConnection + type: string + default: 'dotnetbuilds-internal-read' +- name: outputVariableName + type: string + default: 'dotnetbuilds-internal-container-read-token-base64' +- name: expiryInHours + type: number + default: 1 +- name: base64Encode + type: boolean + default: true + +steps: +- ${{ if ne(variables['System.TeamProject'], 'public') }}: + - template: /eng/common/templates/steps/get-delegation-sas.yml + parameters: + federatedServiceConnection: ${{ parameters.federatedServiceConnection }} + outputVariableName: ${{ parameters.outputVariableName }} + expiryInHours: ${{ parameters.expiryInHours }} + base64Encode: ${{ parameters.base64Encode }} + storageAccount: dotnetbuilds + container: internal + permissions: rl diff --git a/eng/common/templates/steps/get-delegation-sas.yml b/eng/common/templates/steps/get-delegation-sas.yml new file mode 100644 index 000000000000..c0e8f91317f0 --- /dev/null +++ b/eng/common/templates/steps/get-delegation-sas.yml @@ -0,0 +1,43 @@ +parameters: +- name: federatedServiceConnection + type: string +- name: outputVariableName + type: string +- name: expiryInHours + type: number + default: 1 +- name: base64Encode + type: boolean + default: false +- name: storageAccount + type: string +- name: container + type: string +- name: permissions + type: string + default: 'rl' + +steps: +- task: AzureCLI@2 + displayName: 'Generate delegation SAS Token for ${{ parameters.storageAccount }}/${{ parameters.container }}' + inputs: + azureSubscription: ${{ parameters.federatedServiceConnection }} + scriptType: 'pscore' + scriptLocation: 'inlineScript' + inlineScript: | + # Calculate the expiration of the SAS token and convert to UTC + $expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") + + $sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv + + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to generate SAS token." + exit 1 + } + + if ('${{ parameters.base64Encode }}' -eq 'true') { + $sas = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($sas)) + } + + Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$sas" diff --git a/eng/common/templates/steps/get-federated-access-token.yml b/eng/common/templates/steps/get-federated-access-token.yml new file mode 100644 index 000000000000..c8c49cc0e8f0 --- /dev/null +++ b/eng/common/templates/steps/get-federated-access-token.yml @@ -0,0 +1,28 @@ +parameters: +- name: federatedServiceConnection + type: string +- name: outputVariableName + type: string +# Resource to get a token for. Common values include: +# - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps +# - 'https://storage.azure.com/' for storage +# Defaults to Azure DevOps +- name: resource + type: string + default: '499b84ac-1321-427f-aa17-267ca6975798' + +steps: +- task: AzureCLI@2 + displayName: 'Getting federated access token for feeds' + inputs: + azureSubscription: ${{ parameters.federatedServiceConnection }} + scriptType: 'pscore' + scriptLocation: 'inlineScript' + inlineScript: | + $accessToken = az account get-access-token --query accessToken --resource ${{ parameters.resource }} --output tsv + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to get access token for resource '${{ parameters.resource }}'" + exit 1 + } + Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$accessToken" \ No newline at end of file diff --git a/global.json b/global.json index d2af4d682074..2d6984391166 100644 --- a/global.json +++ b/global.json @@ -14,7 +14,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24311.3", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24311.3" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24321.3", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24321.3" } } From c4c1d28e1981124157ad9e315a8c4d93c4ab9fd1 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 23 Jun 2024 12:43:37 +0000 Subject: [PATCH 045/159] Update dependencies from https://github.com/microsoft/vstest build 20240617.2 Microsoft.NET.Test.Sdk , Microsoft.TestPlatform.Build , Microsoft.TestPlatform.CLI From Version 17.10.0-release-24272-11 -> To Version 17.10.0-release-24317-02 From 13f8609c462a2b2111dc0f9d0d1e07644803e080 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 23 Jun 2024 12:44:08 +0000 Subject: [PATCH 046/159] Update dependencies from https://github.com/dotnet/razor build 20240614.2 Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal , Microsoft.CodeAnalysis.Razor.Tooling.Internal , Microsoft.NET.Sdk.Razor.SourceGenerators.Transport From Version 7.0.0-preview.24312.2 -> To Version 7.0.0-preview.24314.2 From a49b31b29ffb370d7fef0d6cf76e55419a24405f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 23 Jun 2024 12:45:51 +0000 Subject: [PATCH 047/159] Update dependencies from https://github.com/dotnet/roslyn build 20240618.3 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.10.0-3.24312.19 -> To Version 4.10.0-3.24318.3 From cf83392073ed1437b2c006846cc26974f8d9f32a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 23 Jun 2024 12:46:29 +0000 Subject: [PATCH 048/159] Update dependencies from https://github.com/dotnet/templating build 20240614.2 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.303-servicing.24311.4 -> To Version 8.0.303-servicing.24314.2 From cc0c678d19bff28ae2001f235dba912bbaa51009 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 23 Jun 2024 12:50:16 +0000 Subject: [PATCH 049/159] Update dependencies from https://github.com/dotnet/arcade build 20240621.3 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 8.0.0-beta.24311.3 -> To Version 8.0.0-beta.24321.3 From 38ebdd4a8f4a680ddec2585244b29b1f8fa0f36b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 24 Jun 2024 12:35:49 +0000 Subject: [PATCH 050/159] Update dependencies from https://github.com/microsoft/vstest build 20240617.2 Microsoft.NET.Test.Sdk , Microsoft.TestPlatform.Build , Microsoft.TestPlatform.CLI From Version 17.10.0-release-24272-11 -> To Version 17.10.0-release-24317-02 From a01e3c59a793bf6136b17d314e5f8df0317e1b6a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 24 Jun 2024 12:36:24 +0000 Subject: [PATCH 051/159] Update dependencies from https://github.com/dotnet/razor build 20240614.2 Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal , Microsoft.CodeAnalysis.Razor.Tooling.Internal , Microsoft.NET.Sdk.Razor.SourceGenerators.Transport From Version 7.0.0-preview.24312.2 -> To Version 7.0.0-preview.24314.2 From 42d830b8f232c6db62169ac2cbd01614e1333c9a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 24 Jun 2024 12:38:18 +0000 Subject: [PATCH 052/159] Update dependencies from https://github.com/dotnet/roslyn build 20240624.2 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.10.0-3.24312.19 -> To Version 4.10.0-3.24324.2 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 88ab4fec9d77..69bf7a361001 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -82,34 +82,34 @@ d237e172b324021b97effa244af44d63d1a8bb7e - + https://github.com/dotnet/roslyn - 10c1f374ce445ebbcc17fe8b52564539591628a8 + f62997be6231928d10cfeeb061de003a4723930b - + https://github.com/dotnet/roslyn - 10c1f374ce445ebbcc17fe8b52564539591628a8 + f62997be6231928d10cfeeb061de003a4723930b - + https://github.com/dotnet/roslyn - 10c1f374ce445ebbcc17fe8b52564539591628a8 + f62997be6231928d10cfeeb061de003a4723930b - + https://github.com/dotnet/roslyn - 10c1f374ce445ebbcc17fe8b52564539591628a8 + f62997be6231928d10cfeeb061de003a4723930b - + https://github.com/dotnet/roslyn - 10c1f374ce445ebbcc17fe8b52564539591628a8 + f62997be6231928d10cfeeb061de003a4723930b - + https://github.com/dotnet/roslyn - 10c1f374ce445ebbcc17fe8b52564539591628a8 + f62997be6231928d10cfeeb061de003a4723930b - + https://github.com/dotnet/roslyn - 10c1f374ce445ebbcc17fe8b52564539591628a8 + f62997be6231928d10cfeeb061de003a4723930b https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index a3a2bc3d943b..a7361398c38d 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -155,13 +155,13 @@ - 4.10.0-3.24318.3 - 4.10.0-3.24318.3 - 4.10.0-3.24318.3 - 4.10.0-3.24318.3 - 4.10.0-3.24318.3 - 4.10.0-3.24318.3 - 4.10.0-3.24318.3 + 4.10.0-3.24324.2 + 4.10.0-3.24324.2 + 4.10.0-3.24324.2 + 4.10.0-3.24324.2 + 4.10.0-3.24324.2 + 4.10.0-3.24324.2 + 4.10.0-3.24324.2 $(MicrosoftNetCompilersToolsetPackageVersion) From 678ec8acdccb090ef98efbe50005514b8181b9d4 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 24 Jun 2024 12:38:51 +0000 Subject: [PATCH 053/159] Update dependencies from https://github.com/dotnet/templating build 20240614.2 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.303-servicing.24311.4 -> To Version 8.0.303-servicing.24314.2 From b48ab67e6a6f3a741e3f8270da454e00d5d7a886 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 24 Jun 2024 12:42:56 +0000 Subject: [PATCH 054/159] Update dependencies from https://github.com/dotnet/arcade build 20240624.1 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 8.0.0-beta.24311.3 -> To Version 8.0.0-beta.24324.1 --- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 4 ++-- global.json | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c5d071ecc34c..66bc53a272a4 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -483,22 +483,22 @@ - + https://github.com/dotnet/arcade - a95bcc256e9bdf47394e4dab04872811c16daaea + 748cd976bf8b0f69b809e569943635ab8be36dc8 - + https://github.com/dotnet/arcade - a95bcc256e9bdf47394e4dab04872811c16daaea + 748cd976bf8b0f69b809e569943635ab8be36dc8 - + https://github.com/dotnet/arcade - a95bcc256e9bdf47394e4dab04872811c16daaea + 748cd976bf8b0f69b809e569943635ab8be36dc8 - + https://github.com/dotnet/arcade - a95bcc256e9bdf47394e4dab04872811c16daaea + 748cd976bf8b0f69b809e569943635ab8be36dc8 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index e20ee169fdfc..20d93236329c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -35,7 +35,7 @@ 7.0.0 4.0.0 7.0.0 - 8.0.0-beta.24321.3 + 8.0.0-beta.24324.1 7.0.0-preview.22423.2 8.0.0 4.3.0 @@ -210,7 +210,7 @@ 6.12.0 6.1.0 - 8.0.0-beta.24321.3 + 8.0.0-beta.24324.1 4.18.4 1.3.2 8.0.0-beta.23607.1 diff --git a/global.json b/global.json index 2d6984391166..18a15064de9d 100644 --- a/global.json +++ b/global.json @@ -14,7 +14,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24321.3", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24321.3" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24324.1", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24324.1" } } From 4857c491290409b17ecb088f1e1a587572bc7fd3 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 25 Jun 2024 12:50:10 +0000 Subject: [PATCH 055/159] Update dependencies from https://github.com/microsoft/vstest build 20240617.2 Microsoft.NET.Test.Sdk , Microsoft.TestPlatform.Build , Microsoft.TestPlatform.CLI From Version 17.10.0-release-24272-11 -> To Version 17.10.0-release-24317-02 --- NuGet.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NuGet.config b/NuGet.config index 2fe66c7b93ed..dc29aad8cfa6 100644 --- a/NuGet.config +++ b/NuGet.config @@ -24,6 +24,8 @@ + + From dd083f765f554cba10f96fabe0dc5d667b451ce2 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 25 Jun 2024 12:50:46 +0000 Subject: [PATCH 056/159] Update dependencies from https://github.com/dotnet/razor build 20240614.2 Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal , Microsoft.CodeAnalysis.Razor.Tooling.Internal , Microsoft.NET.Sdk.Razor.SourceGenerators.Transport From Version 7.0.0-preview.24312.2 -> To Version 7.0.0-preview.24314.2 --- NuGet.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NuGet.config b/NuGet.config index 2fe66c7b93ed..dc29aad8cfa6 100644 --- a/NuGet.config +++ b/NuGet.config @@ -24,6 +24,8 @@ + + From 13df731b6509eafd2bc5d65bcc17f8c8e83d49dd Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 25 Jun 2024 12:52:42 +0000 Subject: [PATCH 057/159] Update dependencies from https://github.com/dotnet/roslyn build 20240624.8 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.10.0-3.24312.19 -> To Version 4.10.0-3.24324.8 --- NuGet.config | 2 ++ eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/NuGet.config b/NuGet.config index 2fe66c7b93ed..dc29aad8cfa6 100644 --- a/NuGet.config +++ b/NuGet.config @@ -24,6 +24,8 @@ + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 69bf7a361001..353e8a18f765 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -82,34 +82,34 @@ d237e172b324021b97effa244af44d63d1a8bb7e - + https://github.com/dotnet/roslyn - f62997be6231928d10cfeeb061de003a4723930b + 04fb39164c99c519832109f21b22630bc9246fce - + https://github.com/dotnet/roslyn - f62997be6231928d10cfeeb061de003a4723930b + 04fb39164c99c519832109f21b22630bc9246fce - + https://github.com/dotnet/roslyn - f62997be6231928d10cfeeb061de003a4723930b + 04fb39164c99c519832109f21b22630bc9246fce - + https://github.com/dotnet/roslyn - f62997be6231928d10cfeeb061de003a4723930b + 04fb39164c99c519832109f21b22630bc9246fce - + https://github.com/dotnet/roslyn - f62997be6231928d10cfeeb061de003a4723930b + 04fb39164c99c519832109f21b22630bc9246fce - + https://github.com/dotnet/roslyn - f62997be6231928d10cfeeb061de003a4723930b + 04fb39164c99c519832109f21b22630bc9246fce - + https://github.com/dotnet/roslyn - f62997be6231928d10cfeeb061de003a4723930b + 04fb39164c99c519832109f21b22630bc9246fce https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index a7361398c38d..0a2886f97bf2 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -155,13 +155,13 @@ - 4.10.0-3.24324.2 - 4.10.0-3.24324.2 - 4.10.0-3.24324.2 - 4.10.0-3.24324.2 - 4.10.0-3.24324.2 - 4.10.0-3.24324.2 - 4.10.0-3.24324.2 + 4.10.0-3.24324.8 + 4.10.0-3.24324.8 + 4.10.0-3.24324.8 + 4.10.0-3.24324.8 + 4.10.0-3.24324.8 + 4.10.0-3.24324.8 + 4.10.0-3.24324.8 $(MicrosoftNetCompilersToolsetPackageVersion) From 259d494d95b68b225d1248b0453de0a582323e4a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 25 Jun 2024 12:53:14 +0000 Subject: [PATCH 058/159] Update dependencies from https://github.com/dotnet/templating build 20240614.2 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.303-servicing.24311.4 -> To Version 8.0.303-servicing.24314.2 From f024a06f8f6e88ec813418248d0c0138c057631f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 25 Jun 2024 12:57:28 +0000 Subject: [PATCH 059/159] Update dependencies from https://github.com/dotnet/arcade build 20240624.7 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 8.0.0-beta.24311.3 -> To Version 8.0.0-beta.24324.7 --- NuGet.config | 2 ++ eng/Version.Details.xml | 16 +++++------ eng/Versions.props | 4 +-- eng/common/post-build/publish-using-darc.ps1 | 15 +++++----- .../job/publish-build-assets.yml | 12 ++++---- .../post-build/post-build.yml | 8 ++++-- .../templates/job/publish-build-assets.yml | 12 ++++---- .../templates/post-build/post-build.yml | 8 ++++-- .../post-build/setup-maestro-vars.yml | 28 +++++++++---------- global.json | 4 +-- 10 files changed, 59 insertions(+), 50 deletions(-) diff --git a/NuGet.config b/NuGet.config index 2fe66c7b93ed..dc29aad8cfa6 100644 --- a/NuGet.config +++ b/NuGet.config @@ -24,6 +24,8 @@ + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 66bc53a272a4..f5b905a2d433 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -483,22 +483,22 @@ - + https://github.com/dotnet/arcade - 748cd976bf8b0f69b809e569943635ab8be36dc8 + 3fe41d9e97519a4e9b48293906dbf58714ea9a0d - + https://github.com/dotnet/arcade - 748cd976bf8b0f69b809e569943635ab8be36dc8 + 3fe41d9e97519a4e9b48293906dbf58714ea9a0d - + https://github.com/dotnet/arcade - 748cd976bf8b0f69b809e569943635ab8be36dc8 + 3fe41d9e97519a4e9b48293906dbf58714ea9a0d - + https://github.com/dotnet/arcade - 748cd976bf8b0f69b809e569943635ab8be36dc8 + 3fe41d9e97519a4e9b48293906dbf58714ea9a0d https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 20d93236329c..3d33c3270349 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -35,7 +35,7 @@ 7.0.0 4.0.0 7.0.0 - 8.0.0-beta.24324.1 + 8.0.0-beta.24324.7 7.0.0-preview.22423.2 8.0.0 4.3.0 @@ -210,7 +210,7 @@ 6.12.0 6.1.0 - 8.0.0-beta.24324.1 + 8.0.0-beta.24324.7 4.18.4 1.3.2 8.0.0-beta.23607.1 diff --git a/eng/common/post-build/publish-using-darc.ps1 b/eng/common/post-build/publish-using-darc.ps1 index 5a3a32ea8d75..238945cb5ab4 100644 --- a/eng/common/post-build/publish-using-darc.ps1 +++ b/eng/common/post-build/publish-using-darc.ps1 @@ -2,7 +2,6 @@ param( [Parameter(Mandatory=$true)][int] $BuildId, [Parameter(Mandatory=$true)][int] $PublishingInfraVersion, [Parameter(Mandatory=$true)][string] $AzdoToken, - [Parameter(Mandatory=$true)][string] $MaestroToken, [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net', [Parameter(Mandatory=$true)][string] $WaitPublishingFinish, [Parameter(Mandatory=$false)][string] $ArtifactsPublishingAdditionalParameters, @@ -31,13 +30,13 @@ try { } & $darc add-build-to-channel ` - --id $buildId ` - --publishing-infra-version $PublishingInfraVersion ` - --default-channels ` - --source-branch main ` - --azdev-pat $AzdoToken ` - --bar-uri $MaestroApiEndPoint ` - --password $MaestroToken ` + --id $buildId ` + --publishing-infra-version $PublishingInfraVersion ` + --default-channels ` + --source-branch main ` + --azdev-pat "$AzdoToken" ` + --bar-uri "$MaestroApiEndPoint" ` + --ci ` @optionalParams if ($LastExitCode -ne 0) { diff --git a/eng/common/templates-official/job/publish-build-assets.yml b/eng/common/templates-official/job/publish-build-assets.yml index 589ac80a18b7..d01739c12857 100644 --- a/eng/common/templates-official/job/publish-build-assets.yml +++ b/eng/common/templates-official/job/publish-build-assets.yml @@ -76,13 +76,16 @@ jobs: - task: NuGetAuthenticate@1 - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Build Assets inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/sdk-task.ps1 + arguments: > + -task PublishBuildAssets -restore -msbuildEngine dotnet /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests' - /p:BuildAssetRegistryToken=$(MaestroAccessToken) /p:MaestroApiEndpoint=https://maestro-prod.westus2.cloudapp.azure.com /p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }} /p:OfficialBuildId=$(Build.BuildNumber) @@ -144,7 +147,6 @@ jobs: arguments: -BuildId $(BARBuildId) -PublishingInfraVersion 3 -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' - -MaestroToken '$(MaestroApiAccessToken)' -WaitPublishingFinish true -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/templates-official/post-build/post-build.yml b/eng/common/templates-official/post-build/post-build.yml index da1f40958b45..0dfa387e7b78 100644 --- a/eng/common/templates-official/post-build/post-build.yml +++ b/eng/common/templates-official/post-build/post-build.yml @@ -272,14 +272,16 @@ stages: - task: NuGetAuthenticate@1 - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Using Darc inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 arguments: -BuildId $(BARBuildId) -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' - -MaestroToken '$(MaestroApiAccessToken)' -WaitPublishingFinish true -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/templates/job/publish-build-assets.yml b/eng/common/templates/job/publish-build-assets.yml index 8ec0151def21..9fd69fa7c9b7 100644 --- a/eng/common/templates/job/publish-build-assets.yml +++ b/eng/common/templates/job/publish-build-assets.yml @@ -74,13 +74,16 @@ jobs: - task: NuGetAuthenticate@1 - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Build Assets inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/sdk-task.ps1 + arguments: > + -task PublishBuildAssets -restore -msbuildEngine dotnet /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests' - /p:BuildAssetRegistryToken=$(MaestroAccessToken) /p:MaestroApiEndpoint=https://maestro.dot.net /p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }} /p:OfficialBuildId=$(Build.BuildNumber) @@ -140,7 +143,6 @@ jobs: arguments: -BuildId $(BARBuildId) -PublishingInfraVersion 3 -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' - -MaestroToken '$(MaestroApiAccessToken)' -WaitPublishingFinish true -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index aba44a25a338..2db4933468fd 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -268,14 +268,16 @@ stages: - task: NuGetAuthenticate@1 - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Using Darc inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 arguments: -BuildId $(BARBuildId) -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' - -MaestroToken '$(MaestroApiAccessToken)' -WaitPublishingFinish true -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/templates/post-build/setup-maestro-vars.yml b/eng/common/templates/post-build/setup-maestro-vars.yml index 0c87f149a4ad..64b9abc68504 100644 --- a/eng/common/templates/post-build/setup-maestro-vars.yml +++ b/eng/common/templates/post-build/setup-maestro-vars.yml @@ -11,13 +11,14 @@ steps: artifactName: ReleaseConfigs checkDownloadedFiles: true - - task: PowerShell@2 + - task: AzureCLI@2 name: setReleaseVars displayName: Set Release Configs Vars inputs: - targetType: inline - pwsh: true - script: | + azureSubscription: "Darc: Maestro Production" + scriptType: pscore + scriptLocation: inlineScript + inlineScript: | try { if (!$Env:PromoteToMaestroChannels -or $Env:PromoteToMaestroChannels.Trim() -eq '') { $Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt @@ -31,15 +32,16 @@ steps: $AzureDevOpsBuildId = $Env:Build_BuildId } else { - $buildApiEndpoint = "${Env:MaestroApiEndPoint}/api/builds/${Env:BARBuildId}?api-version=${Env:MaestroApiVersion}" + . $(Build.SourcesDirectory)\eng\common\tools.ps1 + $darc = Get-Darc + $buildInfo = & $darc get-build ` + --id ${{ parameters.BARBuildId }} ` + --extended ` + --output-format json ` + --ci ` + | convertFrom-Json - $apiHeaders = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]' - $apiHeaders.Add('Accept', 'application/json') - $apiHeaders.Add('Authorization',"Bearer ${Env:MAESTRO_API_TOKEN}") - - $buildInfo = try { Invoke-WebRequest -Method Get -Uri $buildApiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" } - - $BarId = $Env:BARBuildId + $BarId = ${{ parameters.BARBuildId }} $Channels = $Env:PromoteToMaestroChannels -split "," $Channels = $Channels -join "][" $Channels = "[$Channels]" @@ -65,6 +67,4 @@ steps: exit 1 } env: - MAESTRO_API_TOKEN: $(MaestroApiAccessToken) - BARBuildId: ${{ parameters.BARBuildId }} PromoteToMaestroChannels: ${{ parameters.PromoteToChannelIds }} diff --git a/global.json b/global.json index 18a15064de9d..3299cf13efbd 100644 --- a/global.json +++ b/global.json @@ -14,7 +14,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24324.1", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24324.1" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24324.7", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24324.7" } } From 513a7442b64253e397db57262334024864e685e6 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Fri, 5 Apr 2024 17:52:20 -0400 Subject: [PATCH 060/159] Refactor workload update and install commands --- .../Microsoft.DotNet.Cli.Utils/PathUtility.cs | 8 +- .../commands/InstallingWorkloadCommand.cs | 129 +++++++--- .../install/FileBasedInstaller.cs | 229 +++++++++-------- .../dotnet-workload/install/IInstaller.cs | 5 +- .../install/IWorkloadManifestUpdater.cs | 5 +- .../install/NetSdkMsiInstallerClient.cs | 24 +- .../install/WorkloadInstallCommand.cs | 236 ++++++------------ .../install/WorkloadManifestUpdater.cs | 87 +++---- .../list/VisualStudioWorkloads.cs | 14 +- .../update/LocalizableStrings.resx | 3 + .../update/WorkloadUpdateCommand.cs | 135 ++-------- .../update/xlf/LocalizableStrings.cs.xlf | 5 + .../update/xlf/LocalizableStrings.de.xlf | 5 + .../update/xlf/LocalizableStrings.es.xlf | 5 + .../update/xlf/LocalizableStrings.fr.xlf | 5 + .../update/xlf/LocalizableStrings.it.xlf | 5 + .../update/xlf/LocalizableStrings.ja.xlf | 5 + .../update/xlf/LocalizableStrings.ko.xlf | 5 + .../update/xlf/LocalizableStrings.pl.xlf | 5 + .../update/xlf/LocalizableStrings.pt-BR.xlf | 5 + .../update/xlf/LocalizableStrings.ru.xlf | 5 + .../update/xlf/LocalizableStrings.tr.xlf | 5 + .../update/xlf/LocalizableStrings.zh-Hans.xlf | 5 + .../update/xlf/LocalizableStrings.zh-Hant.xlf | 5 + .../ManifestVersionUpdate.cs | 1 + .../SdkDirectoryWorkloadManifestProvider.cs | 30 +-- .../WorkloadSet.cs | 39 +++ ...kDirectoryWorkloadManifestProviderTests.cs | 2 +- .../WorkloadSetTests.cs | 16 ++ .../GivenDotnetWorkloadInstall.cs | 24 +- .../MockPackWorkloadInstaller.cs | 11 +- .../MockWorkloadManifestUpdater.cs | 10 +- .../GivenDotnetWorkloadUpdate.cs | 46 ++-- 33 files changed, 562 insertions(+), 557 deletions(-) diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/PathUtility.cs b/src/Cli/Microsoft.DotNet.Cli.Utils/PathUtility.cs index 1957a49a1739..9bbecf9b7ed1 100644 --- a/src/Cli/Microsoft.DotNet.Cli.Utils/PathUtility.cs +++ b/src/Cli/Microsoft.DotNet.Cli.Utils/PathUtility.cs @@ -102,7 +102,7 @@ public static bool TryDeleteDirectory(string directoryPath) /// and continues to its parent until it fails. Returns whether it succeeded /// in deleting the file it was intended to delete. /// - public static bool DeleteFileAndEmptyParents(string path) + public static bool DeleteFileAndEmptyParents(string path, int maxDirectoriesToDelete = int.MaxValue) { if (!File.Exists(path)) { @@ -112,9 +112,13 @@ public static bool DeleteFileAndEmptyParents(string path) File.Delete(path); var dir = Path.GetDirectoryName(path); - while (!Directory.EnumerateFileSystemEntries(dir).Any()) + int directoriesDeleted = 0; + + while (!Directory.EnumerateFileSystemEntries(dir).Any() && + directoriesDeleted < maxDirectoriesToDelete) { Directory.Delete(dir); + directoriesDeleted++; dir = Path.GetDirectoryName(dir); } diff --git a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs index c266ba56be2f..c586e83fc287 100644 --- a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs +++ b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs @@ -14,6 +14,7 @@ using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.ToolPackage; using Microsoft.DotNet.Workloads.Workload.Install; +using Microsoft.DotNet.Workloads.Workload.Update; using Microsoft.Extensions.EnvironmentAbstractions; using Microsoft.NET.Sdk.WorkloadManifestReader; using NuGet.Versioning; @@ -113,48 +114,107 @@ protected void ErrorIfGlobalJsonAndCommandLineMismatch(string globaljsonPath) } } - protected bool TryHandleWorkloadUpdateFromVersion(ITransactionContext context, DirectoryPath? offlineCache, out IEnumerable updates) + protected void UpdateWorkloads(ITransactionContext context, IEnumerable workloadsToUpdateOrInstall, DirectoryPath? offlineCache) { - // Ensure workload set mode is set to 'workloadset' - // Do not skip checking the mode first, as setting it triggers - // an admin authorization popup for MSI-based installs. - if (!ShouldUseWorkloadSetMode(_sdkFeatureBand, _dotnetPath)) + var useRollback = !string.IsNullOrWhiteSpace(_fromRollbackDefinition); + + bool specifiedWorkloadSetVersion = !string.IsNullOrEmpty(_workloadSetVersion); + if (specifiedWorkloadSetVersion && useRollback) { - _workloadInstaller.UpdateInstallMode(_sdkFeatureBand, true); + throw new GracefulException(string.Format(Update.LocalizableStrings.CannotCombineOptions, + InstallingWorkloadCommandParser.FromRollbackFileOption.Name, + InstallingWorkloadCommandParser.WorkloadSetVersionOption.Name), isUserError: true); } - _workloadManifestUpdater.DownloadWorkloadSet(_workloadSetVersionFromGlobalJson ?? _workloadSetVersion, offlineCache); - return TryInstallWorkloadSet(context, out updates, throwOnFailure: true); - } - - public bool TryInstallWorkloadSet(ITransactionContext context, out IEnumerable updates, bool throwOnFailure = false) - { - var advertisingPackagePath = Path.Combine(_userProfileDir, "sdk-advertising", _sdkFeatureBand.ToString(), "microsoft.net.workloads"); - if (File.Exists(Path.Combine(advertisingPackagePath, Constants.workloadSetVersionFileName))) + var useWorkloadSets = ShouldUseWorkloadSetMode(_sdkFeatureBand, _dotnetPath); + if (useRollback && useWorkloadSets) { - // This file isn't created in tests. - var version = File.ReadAllText(Path.Combine(advertisingPackagePath, Constants.workloadSetVersionFileName)); - PrintWorkloadSetTransition(version); + // Rollback files are only for loose manifests. Update the mode to be loose manifests. + Reporter.WriteLine(Update.LocalizableStrings.UpdateFromRollbackSwitchesModeToLooseManifests); + _workloadInstaller.UpdateInstallMode(_sdkFeatureBand, false); + useWorkloadSets = false; } - else if (_workloadInstaller is FileBasedInstaller || _workloadInstaller is NetSdkMsiInstallerClient) + + if (specifiedWorkloadSetVersion) { - // No workload sets found - if (throwOnFailure) + useWorkloadSets = true; + + // If a workload set version is specified, then switch to workload set update mode + // Check to make sure the value needs to be changed, as updating triggers a UAC prompt + // for MSI-based installs. + if (!ShouldUseWorkloadSetMode(_sdkFeatureBand, _dotnetPath)) { - throw new NuGetPackageNotFoundException(string.Format(Update.LocalizableStrings.WorkloadVersionRequestedNotFound, _workloadSetVersionFromGlobalJson ?? _workloadSetVersion)); + _workloadInstaller.UpdateInstallMode(_sdkFeatureBand, true); } - else + } + + string resolvedWorkloadSetVersion = _workloadSetVersionFromGlobalJson ??_workloadSetVersion; + if (string.IsNullOrWhiteSpace(_workloadSetVersion)) + { + _workloadManifestUpdater.UpdateAdvertisingManifestsAsync(_includePreviews, useWorkloadSets, offlineCache).Wait(); + if (useWorkloadSets) { - Reporter.WriteLine(Update.LocalizableStrings.NoWorkloadUpdateFound); + resolvedWorkloadSetVersion = _workloadManifestUpdater.GetAdvertisedWorkloadSetVersion(); } - updates = null; - return false; } - var workloadSetPath = _workloadInstaller.InstallWorkloadSet(context, advertisingPackagePath); - var files = Directory.EnumerateFiles(workloadSetPath, "*.workloadset.json"); - updates = _workloadManifestUpdater.ParseRollbackDefinitionFiles(files); - return true; + if (useWorkloadSets && resolvedWorkloadSetVersion == null) + { + Reporter.WriteLine(Update.LocalizableStrings.NoWorkloadUpdateFound); + return; + } + + IEnumerable manifestsToUpdate; + if (useWorkloadSets) + { + manifestsToUpdate = InstallWorkloadSet(context, resolvedWorkloadSetVersion); + } + else + { + manifestsToUpdate = useRollback ? _workloadManifestUpdater.CalculateManifestRollbacks(_fromRollbackDefinition) : + _workloadManifestUpdater.CalculateManifestUpdates().Select(m => m.ManifestUpdate); + } + + context.Run( + action: () => + { + foreach (var manifestUpdate in manifestsToUpdate) + { + _workloadInstaller.InstallWorkloadManifest(manifestUpdate, context, offlineCache, useRollback); + } + + if (useRollback) + { + _workloadInstaller.SaveInstallStateManifestVersions(_sdkFeatureBand, GetInstallStateContents(manifestsToUpdate)); + } + else if (this is WorkloadUpdateCommand) + { + // For workload updates, if you don't specify a rollback file, then we should update to a new version of the manifests or workload set, and + // should remove the install state that pins to the other version + // TODO: Do we need to do something similar if the workload set version is pinned in the install state? + _workloadInstaller.RemoveManifestsFromInstallState(_sdkFeatureBand); + } + + _workloadInstaller.AdjustWorkloadSetInInstallState(_sdkFeatureBand, string.IsNullOrWhiteSpace(_workloadSetVersion) ? null : _workloadSetVersion); + + _workloadResolver.RefreshWorkloadManifests(); + + _workloadInstaller.InstallWorkloads(workloadsToUpdateOrInstall, _sdkFeatureBand, context, offlineCache); + }, + rollback: () => + { + // Nothing to roll back at this level, InstallWorkloadManifest and InstallWorkloadPacks handle the transaction rollback + // We will refresh the workload manifests to make sure that the resolver has the updated state after the rollback + _workloadResolver.RefreshWorkloadManifests(); + }); + } + + private IEnumerable InstallWorkloadSet(ITransactionContext context, string workloadSetVersion) + { + PrintWorkloadSetTransition(workloadSetVersion); + var workloadSet = _workloadInstaller.InstallWorkloadSet(context, workloadSetVersion); + + return _workloadManifestUpdater.CalculateManifestUpdatesForWorkloadSet(workloadSet); } private void PrintWorkloadSetTransition(string newVersion) @@ -258,6 +318,17 @@ protected IEnumerable GetInstalledWorkloads(bool fromPreviousSdk) return workloads ?? Enumerable.Empty(); } } + + protected IEnumerable WriteSDKInstallRecordsForVSWorkloads(IEnumerable workloadsWithExistingInstallRecords) + { +#if !DOT_NET_BUILD_FROM_SOURCE + if (OperatingSystem.IsWindows()) + { + return VisualStudioWorkloads.WriteSDKInstallRecordsForVSWorkloads(_workloadInstaller, _workloadResolver, workloadsWithExistingInstallRecords, Reporter); + } +#endif + return workloadsWithExistingInstallRecords; + } } internal static class InstallingWorkloadCommandParser diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs b/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs index 800078f10e37..7106e1f8c4ee 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs @@ -23,6 +23,7 @@ internal class FileBasedInstaller : IInstaller private readonly string _workloadMetadataDir; private const string InstalledPacksDir = "InstalledPacks"; private const string InstalledManifestsDir = "InstalledManifests"; + private const string InstalledWorkloadSetsDir = "InstalledWorkloadSets"; protected readonly string _dotnetDir; protected readonly string _userProfileDir; protected readonly DirectoryPath _tempPackagesDir; @@ -85,29 +86,35 @@ IEnumerable GetPacksInWorkloads(IEnumerable workloadIds) return packs; } - public string InstallWorkloadSet(ITransactionContext context, string advertisingPackagePath) + public WorkloadSet InstallWorkloadSet(ITransactionContext context, string workloadSetVersion, DirectoryPath? offlineCache = null) { - var workloadVersion = File.ReadAllText(Path.Combine(advertisingPackagePath, Constants.workloadSetVersionFileName)); - var workloadSetPath = Path.Combine(_dotnetDir, "sdk-manifests", _sdkFeatureBand.ToString(), "workloadsets", workloadVersion); - context.Run( - action: () => - { - Directory.CreateDirectory(workloadSetPath); + SdkFeatureBand workloadSetFeatureBand; + string workloadSetPackageVersion = WorkloadManifestUpdater.WorkloadSetVersionToWorkloadSetPackageVersion(workloadSetVersion, out workloadSetFeatureBand); + var workloadSetPackageId = GetManifestPackageId(new ManifestId("Microsoft.NET.Workloads"), workloadSetFeatureBand); - foreach (var file in Directory.EnumerateFiles(advertisingPackagePath)) + var workloadSetPath = Path.Combine(_dotnetDir, "sdk-manifests", _sdkFeatureBand.ToString(), "workloadsets", workloadSetVersion); + + try + { + InstallPackage(workloadSetPackageId, workloadSetPackageVersion, workloadSetPath, context, offlineCache); + context.Run( + action: () => { - File.Copy(file, Path.Combine(workloadSetPath, Path.GetFileName(file)), overwrite: true); - } - }, - rollback: () => - { - foreach (var file in Directory.EnumerateFiles(workloadSetPath)) + WriteWorkloadSetInstallationRecord(workloadSetVersion, workloadSetFeatureBand, _sdkFeatureBand); + }, + rollback: () => { - PathUtility.DeleteFileAndEmptyParents(file); - } - }); + RemoveWorkloadSetInstallationRecord(workloadSetVersion, workloadSetFeatureBand, _sdkFeatureBand); + }); + } + catch (Exception) + { + // TODO: Add workload set specific message + throw; + //throw new Exception(string.Format(LocalizableStrings.FailedToInstallWorkloadManifest, manifestUpdate.ManifestId, manifestUpdate.NewVersion, e.Message), e); + } - return workloadSetPath; + return WorkloadSet.FromWorkloadSetFolder(workloadSetPath, workloadSetVersion, _sdkFeatureBand); } public void InstallWorkloads(IEnumerable workloadIds, SdkFeatureBand sdkFeatureBand, ITransactionContext transactionContext, DirectoryPath? offlineCache = null) @@ -228,84 +235,99 @@ string GetManifestInstallDirForFeatureBand(string sdkFeatureBand) public void InstallWorkloadManifest(ManifestVersionUpdate manifestUpdate, ITransactionContext transactionContext, DirectoryPath? offlineCache = null, bool isRollback = false) { - string packagePath = null; - string tempBackupDir = null; - var newManifestPath = Path.Combine(GetManifestInstallDirForFeatureBand(manifestUpdate.NewFeatureBand), manifestUpdate.ManifestId.ToString(), manifestUpdate.NewVersion.ToString()); _reporter.WriteLine(string.Format(LocalizableStrings.InstallingWorkloadManifest, manifestUpdate.ManifestId, manifestUpdate.NewVersion)); try { + var newManifestPackageId = GetManifestPackageId(manifestUpdate.ManifestId, new SdkFeatureBand(manifestUpdate.NewFeatureBand)); + + InstallPackage(newManifestPackageId, manifestUpdate.NewVersion.ToString(), newManifestPath, transactionContext, offlineCache); + transactionContext.Run( action: () => { - var newManifestPackageId = GetManifestPackageId(manifestUpdate.ManifestId, new SdkFeatureBand(manifestUpdate.NewFeatureBand)); - if (offlineCache == null || !offlineCache.HasValue) - { - packagePath = _nugetPackageDownloader.DownloadPackageAsync(newManifestPackageId, - new NuGetVersion(manifestUpdate.NewVersion.ToString()), _packageSourceLocation).GetAwaiter().GetResult(); - } - else - { - packagePath = Path.Combine(offlineCache.Value.Value, $"{newManifestPackageId}.{manifestUpdate.NewVersion}.nupkg"); - if (!File.Exists(packagePath)) - { - throw new Exception(string.Format(LocalizableStrings.CacheMissingPackage, newManifestPackageId, manifestUpdate.NewVersion, offlineCache)); - } - } - - // If target directory already exists, back it up in case we roll back - if (Directory.Exists(newManifestPath) && Directory.GetFileSystemEntries(newManifestPath).Any()) - { - tempBackupDir = Path.Combine(_tempPackagesDir.Value, $"{manifestUpdate.ManifestId}-{manifestUpdate.ExistingVersion}-backup"); - if (Directory.Exists(tempBackupDir)) - { - Directory.Delete(tempBackupDir, true); - } - FileAccessRetrier.RetryOnMoveAccessFailure(() => DirectoryPath.MoveDirectory(newManifestPath, tempBackupDir)); - } - - ExtractManifestAsync(packagePath, newManifestPath).GetAwaiter().GetResult(); - WriteManifestInstallationRecord(manifestUpdate.ManifestId, manifestUpdate.NewVersion, new SdkFeatureBand(manifestUpdate.NewFeatureBand), _sdkFeatureBand); }, rollback: () => { - if (!string.IsNullOrEmpty(tempBackupDir) && Directory.Exists(tempBackupDir)) - { - FileAccessRetrier.RetryOnMoveAccessFailure(() => DirectoryPath.MoveDirectory(tempBackupDir, newManifestPath)); - } - }, - cleanup: () => + RemoveManifestInstallationRecord(manifestUpdate.ManifestId, manifestUpdate.NewVersion, new SdkFeatureBand(manifestUpdate.NewFeatureBand), _sdkFeatureBand); + }); + } + catch (Exception e) + { + throw new Exception(string.Format(LocalizableStrings.FailedToInstallWorkloadManifest, manifestUpdate.ManifestId, manifestUpdate.NewVersion, e.Message), e); + } + } + + void InstallPackage(PackageId packageId, string packageVersion, string targetFolder, ITransactionContext transactionContext, DirectoryPath? offlineCache) + { + string packagePath = null; + string tempBackupDir = null; + + transactionContext.Run( + action: () => + { + if (offlineCache == null || !offlineCache.HasValue) { - // Delete leftover dirs and files - if (!string.IsNullOrEmpty(packagePath) && File.Exists(packagePath) && (offlineCache == null || !offlineCache.HasValue)) + packagePath = _nugetPackageDownloader.DownloadPackageAsync(packageId, + new NuGetVersion(packageVersion), _packageSourceLocation).GetAwaiter().GetResult(); + } + else + { + packagePath = Path.Combine(offlineCache.Value.Value, $"{packageId}.{packageVersion}.nupkg"); + if (!File.Exists(packagePath)) { - File.Delete(packagePath); + throw new Exception(string.Format(LocalizableStrings.CacheMissingPackage, packageId, packageVersion, offlineCache)); } + } - var versionDir = Path.GetDirectoryName(packagePath); - if (Directory.Exists(versionDir) && !Directory.GetFileSystemEntries(versionDir).Any()) + // If target directory already exists, back it up in case we roll back + if (Directory.Exists(targetFolder) && Directory.GetFileSystemEntries(targetFolder).Any()) + { + tempBackupDir = Path.Combine(_tempPackagesDir.Value, $"{packageId} - {packageVersion}-backup"); + if (Directory.Exists(tempBackupDir)) { - Directory.Delete(versionDir); - var idDir = Path.GetDirectoryName(versionDir); - if (Directory.Exists(idDir) && !Directory.GetFileSystemEntries(idDir).Any()) - { - Directory.Delete(idDir); - } + Directory.Delete(tempBackupDir, true); } + FileAccessRetrier.RetryOnMoveAccessFailure(() => DirectoryPath.MoveDirectory(targetFolder, tempBackupDir)); + } - if (!string.IsNullOrEmpty(tempBackupDir) && Directory.Exists(tempBackupDir)) + ExtractManifestAsync(packagePath, targetFolder).GetAwaiter().GetResult(); + + }, + rollback: () => + { + if (!string.IsNullOrEmpty(tempBackupDir) && Directory.Exists(tempBackupDir)) + { + FileAccessRetrier.RetryOnMoveAccessFailure(() => DirectoryPath.MoveDirectory(tempBackupDir, targetFolder)); + } + }, + cleanup: () => + { + // Delete leftover dirs and files + if (!string.IsNullOrEmpty(packagePath) && File.Exists(packagePath) && (offlineCache == null || !offlineCache.HasValue)) + { + File.Delete(packagePath); + } + + var versionDir = Path.GetDirectoryName(packagePath); + if (Directory.Exists(versionDir) && !Directory.GetFileSystemEntries(versionDir).Any()) + { + Directory.Delete(versionDir); + var idDir = Path.GetDirectoryName(versionDir); + if (Directory.Exists(idDir) && !Directory.GetFileSystemEntries(idDir).Any()) { - Directory.Delete(tempBackupDir, true); + Directory.Delete(idDir); } - }); - } - catch (Exception e) - { - throw new Exception(string.Format(LocalizableStrings.FailedToInstallWorkloadManifest, manifestUpdate.ManifestId, manifestUpdate.NewVersion, e.Message), e); - } + } + + if (!string.IsNullOrEmpty(tempBackupDir) && Directory.Exists(tempBackupDir)) + { + Directory.Delete(tempBackupDir, true); + } + }); } public IEnumerable GetDownloads(IEnumerable workloadIds, SdkFeatureBand sdkFeatureBand, bool includeInstalledItems) @@ -376,37 +398,17 @@ public void GarbageCollect(Func getResolverForWorkloa } } - string installationRecordPath = null; foreach (var featureBandToRemove in featureBandsToRemove) { - installationRecordPath = GetManifestInstallRecordPath(manifestId, manifestVersion, manifestFeatureBand, featureBandToRemove); - File.Delete(installationRecordPath); + RemoveManifestInstallationRecord(manifestId, manifestVersion, manifestFeatureBand, featureBandToRemove); } - if (installationRecordPath != null) + if (featureBandsToRemove.Count == manifestInstallRecords[(manifestId, manifestVersion, manifestFeatureBand)].Count) { - var installationRecordDirectory = Path.GetDirectoryName(installationRecordPath); - if (!Directory.GetFileSystemEntries(installationRecordDirectory).Any()) - { - // There are no installation records for the workload manifest anymore, so we can delete the manifest - _reporter.WriteLine(string.Format(LocalizableStrings.DeletingWorkloadManifest, manifestId, $"{manifestVersion}/{manifestFeatureBand}")); - var manifestPath = Path.Combine(GetManifestInstallDirForFeatureBand(manifestFeatureBand.ToString()), manifestId.ToString(), manifestVersion.ToString()); - Directory.Delete(manifestPath, true); - - // Delete empty manifest installation record directory, and walk up tree deleting empty directories to clean up - Directory.Delete(installationRecordDirectory); - - var manifestVersionDirectory = Path.GetDirectoryName(installationRecordDirectory); - if (!Directory.GetFileSystemEntries(manifestVersionDirectory).Any()) - { - Directory.Delete(manifestVersionDirectory); - var manifestIdDirectory = Path.GetDirectoryName(manifestVersionDirectory); - if (!Directory.GetFileSystemEntries(manifestIdDirectory).Any()) - { - Directory.Delete(manifestIdDirectory); - } - } - } + // All installation records for the manifest were removed, so we can delete the manifest + _reporter.WriteLine(string.Format(LocalizableStrings.DeletingWorkloadManifest, manifestId, $"{manifestVersion}/{manifestFeatureBand}")); + var manifestPath = Path.Combine(GetManifestInstallDirForFeatureBand(manifestFeatureBand.ToString()), manifestId.ToString(), manifestVersion.ToString()); + Directory.Delete(manifestPath, true); } } @@ -616,8 +618,25 @@ private void DeletePack(PackInfo packInfo) } - // Workload manifests have a feature band which is essentially part of their version, and may be installed by a later feature band of the SDK. So there are two potentially different - // Feature bands as part of the installation record + // Workload sets and workload manifests have a feature band which is essentially part of their version, and may be installed by a later feature band of the SDK. + // So there are two potentially different feature bands as part of the installation record + string GetWorkloadSetInstallRecordPath(string workloadSetVersion, SdkFeatureBand workloadSetFeatureBand, SdkFeatureBand referencingFeatureBand) => + Path.Combine(_workloadMetadataDir, InstalledWorkloadSetsDir, "v1", workloadSetVersion, workloadSetFeatureBand.ToString(), referencingFeatureBand.ToString()); + + void WriteWorkloadSetInstallationRecord(string workloadSetVersion, SdkFeatureBand workloadSetFeatureBand, SdkFeatureBand referencingFeatureBand) + { + var path = GetWorkloadSetInstallRecordPath(workloadSetVersion, workloadSetFeatureBand, referencingFeatureBand); + Directory.CreateDirectory(Path.GetDirectoryName(path)); + + using var _ = File.Create(path); + } + + void RemoveWorkloadSetInstallationRecord(string workloadSetVersion, SdkFeatureBand workloadSetFeatureBand, SdkFeatureBand referencingFeatureBand) + { + var path = GetWorkloadSetInstallRecordPath(workloadSetVersion, workloadSetFeatureBand, referencingFeatureBand); + PathUtility.DeleteFileAndEmptyParents(path, maxDirectoriesToDelete: 2); + } + private string GetManifestInstallRecordPath(ManifestId manifestId, ManifestVersion manifestVersion, SdkFeatureBand featureBand, SdkFeatureBand referencingFeatureBand) => Path.Combine(_workloadMetadataDir, InstalledManifestsDir, "v1", manifestId.ToString(), manifestVersion.ToString(), featureBand.ToString(), referencingFeatureBand.ToString()); @@ -629,6 +648,12 @@ void WriteManifestInstallationRecord(ManifestId manifestId, ManifestVersion mani using var _ = File.Create(path); } + void RemoveManifestInstallationRecord(ManifestId manifestId, ManifestVersion manifestVersion, SdkFeatureBand featureBand, SdkFeatureBand referencingFeatureBand) + { + var installationRecordPath = GetManifestInstallRecordPath(manifestId, manifestVersion, featureBand, referencingFeatureBand); + PathUtility.DeleteFileAndEmptyParents(installationRecordPath, maxDirectoriesToDelete: 3); + } + private Dictionary<(ManifestId manifestId, ManifestVersion manifestVersion, SdkFeatureBand manifestFeatureBand), List> GetAllManifestInstallRecords() { Dictionary<(ManifestId manifestId, ManifestVersion manifestVersion, SdkFeatureBand manifestFeatureBand), List> records = new(); diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs b/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs index 275d5ecbcdce..784cec3319bb 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs @@ -13,14 +13,15 @@ internal interface IInstaller : IWorkloadManifestInstaller { int ExitCode { get; } - string InstallWorkloadSet(ITransactionContext context, string advertisingPackagePath); - void InstallWorkloads(IEnumerable workloadIds, SdkFeatureBand sdkFeatureBand, ITransactionContext transactionContext, DirectoryPath? offlineCache = null); void RepairWorkloads(IEnumerable workloadIds, SdkFeatureBand sdkFeatureBand, DirectoryPath? offlineCache = null); void GarbageCollect(Func getResolverForWorkloadSet, DirectoryPath? offlineCache = null, bool cleanAllPacks = false); + WorkloadSet InstallWorkloadSet(ITransactionContext context, string workloadSetVersion, DirectoryPath? offlineCache = null); + + // TODO: isRollback parameter seems unused / unnecessary void InstallWorkloadManifest(ManifestVersionUpdate manifestUpdate, ITransactionContext transactionContext, DirectoryPath? offlineCache = null, bool isRollback = false); IWorkloadInstallationRecordRepository GetWorkloadInstallationRecordRepository(); diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/IWorkloadManifestUpdater.cs b/src/Cli/dotnet/commands/dotnet-workload/install/IWorkloadManifestUpdater.cs index 49af91545c87..e5b63a936b16 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/IWorkloadManifestUpdater.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/IWorkloadManifestUpdater.cs @@ -14,16 +14,15 @@ internal interface IWorkloadManifestUpdater IEnumerable CalculateManifestUpdates(); + string GetAdvertisedWorkloadSetVersion(); IEnumerable CalculateManifestRollbacks(string rollbackDefinitionFilePath); - IEnumerable ParseRollbackDefinitionFiles(IEnumerable files); + IEnumerable CalculateManifestUpdatesForWorkloadSet(WorkloadSet workloadSet); Task> GetManifestPackageDownloadsAsync(bool includePreviews, SdkFeatureBand providedSdkFeatureBand, SdkFeatureBand installedSdkFeatureBand); IEnumerable GetUpdatableWorkloadsToAdvertise(IEnumerable installedWorkloads); void DeleteUpdatableWorkloadsFile(); - - void DownloadWorkloadSet(string version, DirectoryPath? offlineCache); } internal record ManifestUpdateWithWorkloads(ManifestVersionUpdate ManifestUpdate, WorkloadCollection Workloads); diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs index 12fb761e7c29..155ddf655b45 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs @@ -259,36 +259,34 @@ public void GarbageCollect(Func getResolverForWorkloa } // advertisingPackagePath is the path to the workload set MSI nupkg in the advertising package. - public string InstallWorkloadSet(ITransactionContext context, string advertisingPackagePath) + public WorkloadSet InstallWorkloadSet(ITransactionContext context, string workloadSetVersion, DirectoryPath? offlineCache) { - var pathToReturn = string.Empty; + var workloadSetPath = string.Empty; context.Run( action: () => { - pathToReturn = ModifyWorkloadSet(advertisingPackagePath, InstallAction.Install); + workloadSetPath = ModifyWorkloadSet(workloadSetVersion, InstallAction.Install, offlineCache); }, rollback: () => { - ModifyWorkloadSet(advertisingPackagePath, InstallAction.Uninstall); + ModifyWorkloadSet(workloadSetVersion, InstallAction.Uninstall, offlineCache); }); - return pathToReturn; + return WorkloadSet.FromWorkloadSetFolder(workloadSetPath, workloadSetVersion, _sdkFeatureBand); } - private string ModifyWorkloadSet(string advertisingPackagePath, InstallAction requestedAction) + private string ModifyWorkloadSet(string workloadSetVersion, InstallAction requestedAction, DirectoryPath? offlineCache) { ReportPendingReboot(); - // Resolve the package ID for the manifest payload package - var featureBand = Path.GetFileName(Path.GetDirectoryName(advertisingPackagePath)); - var workloadSetVersion = File.ReadAllText(Path.Combine(advertisingPackagePath, Constants.workloadSetVersionFileName)); - string msiPackageId = GetManifestPackageId(new ManifestId("Microsoft.NET.Workloads"), new SdkFeatureBand(featureBand)).ToString(); - string msiPackageVersion = WorkloadManifestUpdater.WorkloadSetVersionToWorkloadSetPackageVersion(workloadSetVersion); + SdkFeatureBand workloadSetFeatureBand; + string msiPackageVersion = WorkloadManifestUpdater.WorkloadSetVersionToWorkloadSetPackageVersion(workloadSetVersion, out workloadSetFeatureBand); + string msiPackageId = GetManifestPackageId(new ManifestId("Microsoft.NET.Workloads"), workloadSetFeatureBand).ToString(); Log?.LogMessage($"Resolving Microsoft.NET.Workloads ({workloadSetVersion}) to {msiPackageId} ({msiPackageVersion})."); // Retrieve the payload from the MSI package cache. - MsiPayload msi = GetCachedMsiPayload(msiPackageId, msiPackageVersion, null); + MsiPayload msi = GetCachedMsiPayload(msiPackageId, msiPackageVersion, offlineCache); VerifyPackage(msi); DetectState state = DetectPackage(msi.ProductCode, out Version installedVersion); @@ -313,7 +311,7 @@ private string ModifyWorkloadSet(string advertisingPackagePath, InstallAction re UpdateDependent(InstallRequestType.AddDependent, msi.Manifest.ProviderKeyName, _dependent); } - return Path.Combine(DotNetHome, "sdk-manifests", _sdkFeatureBand.ToString(), "workloadsets", workloadSetVersion); + return Path.Combine(DotNetHome, "sdk-manifests", workloadSetFeatureBand.ToString(), "workloadsets", workloadSetVersion); } /// diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs index a03d3500e138..9ba43c1fe5b3 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs @@ -17,7 +17,7 @@ namespace Microsoft.DotNet.Workloads.Workload.Install { internal class WorkloadInstallCommand : InstallingWorkloadCommand { - private readonly bool _skipManifestUpdate; + private bool _skipManifestUpdate; private readonly IReadOnlyCollection _workloadIds; public WorkloadInstallCommand( @@ -112,56 +112,98 @@ public override int Execute() { var globaljsonPath = SdkDirectoryWorkloadManifestProvider.GetGlobalJsonPath(Environment.CurrentDirectory); _workloadSetVersionFromGlobalJson = SdkDirectoryWorkloadManifestProvider.GlobalJsonReader.GetWorkloadVersionFromGlobalJson(globaljsonPath); + ErrorIfGlobalJsonAndCommandLineMismatch(globaljsonPath); + + // Normally we want to validate that the workload IDs specified were valid. However, if there is a global.json file with a workload + // set version specified, and we might update the workload version, then we don't do that check here, because we might not have the right + // workload set installed yet, and trying to list the available workloads would throw an error + if (_skipManifestUpdate || string.IsNullOrEmpty(_workloadSetVersionFromGlobalJson)) + { + ValidateWorkloadIdsInput(); + } + + if (string.IsNullOrWhiteSpace(_workloadSetVersion) && string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson)) + { + var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkFeatureBand, _dotnetPath), "default.json"); + if (File.Exists(installStateFilePath)) + { + var installStateContents = InstallStateContents.FromPath(installStateFilePath); + _workloadSetVersion = installStateContents.WorkloadVersion; + } + } try { - ErrorIfGlobalJsonAndCommandLineMismatch(globaljsonPath); + Reporter.WriteLine(); + + DirectoryPath? offlineCache = string.IsNullOrWhiteSpace(_fromCacheOption) ? null : new DirectoryPath(_fromCacheOption); + var workloadIds = _workloadIds.Select(id => new WorkloadId(id)); - // Normally we want to validate that the workload IDs specified were valid. However, if there is a global.json file with a workload - // set version specified, and we might update the workload version, then we don't do that check here, because we might not have the right - // workload set installed yet, and trying to list the available workloads would throw an error - if (_skipManifestUpdate || string.IsNullOrEmpty(_workloadSetVersionFromGlobalJson)) + // Add workload Ids that already exist to our collection to later trigger an update in those installed workloads + var installedWorkloads = _workloadInstaller.GetWorkloadInstallationRecordRepository().GetInstalledWorkloads(_sdkFeatureBand); + var previouslyInstalledWorkloads = installedWorkloads.Intersect(workloadIds); + if (previouslyInstalledWorkloads.Any()) { - ValidateWorkloadIdsInput(); + Reporter.WriteLine(string.Format(LocalizableStrings.WorkloadAlreadyInstalled, string.Join(" ", previouslyInstalledWorkloads)).Yellow()); } + workloadIds = workloadIds.Concat(installedWorkloads).Distinct(); + workloadIds = WriteSDKInstallRecordsForVSWorkloads(workloadIds); - if (string.IsNullOrWhiteSpace(_workloadSetVersion) && string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson)) + if (!_skipManifestUpdate) { var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkFeatureBand, _dotnetPath), "default.json"); - if (File.Exists(installStateFilePath)) + if (string.IsNullOrWhiteSpace(_fromRollbackDefinition) && File.Exists(installStateFilePath) && InstallStateContents.FromString(File.ReadAllText(installStateFilePath)).Manifests is not null) { - var installStateContents = InstallStateContents.FromPath(installStateFilePath); - _workloadSetVersion = installStateContents.WorkloadVersion; + // If there is a rollback state file, then we don't want to automatically update workloads when a workload is installed + // To update to a new version, the user would need to run "dotnet workload update" + // TODO: We should also skip the update if a workload set version is pinned in install state or in global.json + _skipManifestUpdate = true; } } - DirectoryPath? offlineCache = string.IsNullOrWhiteSpace(_fromCacheOption) ? null : new DirectoryPath(_fromCacheOption); - var workloadIds = _workloadIds.Select(id => new WorkloadId(id)); - if (string.IsNullOrWhiteSpace(_workloadSetVersion) && string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson)) - { - InstallWorkloads( - workloadIds, - _skipManifestUpdate, - _includePreviews, - offlineCache); - } - else + RunInNewTransaction(context => { - RunInNewTransaction(context => + if (_skipManifestUpdate) { - if (!TryHandleWorkloadUpdateFromVersion(context, offlineCache, out var manifests)) + _workloadInstaller.InstallWorkloads(workloadIds, _sdkFeatureBand, context, offlineCache); + } + else + { + if (Verbosity != VerbosityOptions.quiet && Verbosity != VerbosityOptions.q) { - return; + // TODO: Change this message to account for workload set wording + Reporter.WriteLine(LocalizableStrings.CheckForUpdatedWorkloadManifests); } - InstallWorkloadsWithInstallRecord(context, _workloadInstaller, workloadIds, _sdkFeatureBand, manifests, offlineCache, false); - }); + UpdateWorkloads(context, workloadIds, offlineCache); + } + + // Write workload installation records + var recordRepo = _workloadInstaller.GetWorkloadInstallationRecordRepository(); + var newWorkloadInstallRecords = workloadIds.Except(recordRepo.GetInstalledWorkloads(_sdkFeatureBand)); + context.Run( + action: () => + { + foreach (var workloadId in newWorkloadInstallRecords) + { + recordRepo.WriteWorkloadInstallationRecord(workloadId, _sdkFeatureBand); + } + }, + rollback: () => + { + foreach (var workloadId in newWorkloadInstallRecords) + { + recordRepo.DeleteWorkloadInstallationRecord(workloadId, _sdkFeatureBand); + } + }); TryRunGarbageCollection(_workloadInstaller, Reporter, Verbosity, workloadSetVersion => _workloadResolverFactory.CreateForWorkloadSet(_dotnetPath, _sdkVersion.ToString(), _userProfileDir, workloadSetVersion), offlineCache); + // TODO: Update this to only print the newly installed workload IDs? Reporter.WriteLine(); Reporter.WriteLine(string.Format(LocalizableStrings.InstallationSucceeded, string.Join(" ", workloadIds))); Reporter.WriteLine(); - } + + }); } catch (Exception e) { @@ -174,74 +216,6 @@ public override int Execute() return _workloadInstaller.ExitCode; } - public void InstallWorkloads(IEnumerable workloadIds, bool skipManifestUpdate = false, bool includePreviews = false, DirectoryPath? offlineCache = null) - { - Reporter.WriteLine(); - - var manifestsToUpdate = Enumerable.Empty(); - var useRollback = false; - - WriteSDKInstallRecordsForVSWorkloads(); - - if (!skipManifestUpdate) - { - var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkFeatureBand, _dotnetPath), "default.json"); - var installState = InstallStateContents.FromPath(installStateFilePath); - if (string.IsNullOrWhiteSpace(_fromRollbackDefinition) && string.IsNullOrWhiteSpace(_workloadSetVersion) && string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson) && - (installState?.Manifests is not null || installState?.WorkloadVersion is not null)) - { - // If there is a rollback state file, then we don't want to automatically update workloads when a workload is installed - // To update to a new version, the user would need to run "dotnet workload update" - skipManifestUpdate = true; - } - } - - RunInNewTransaction(context => - { - if (!skipManifestUpdate) - { - if (Verbosity != VerbosityOptions.quiet && Verbosity != VerbosityOptions.q) - { - Reporter.WriteLine(LocalizableStrings.CheckForUpdatedWorkloadManifests); - } - // Add workload Ids that already exist to our collection to later trigger an update in those installed workloads - var installedWorkloads = _workloadInstaller.GetWorkloadInstallationRecordRepository().GetInstalledWorkloads(_sdkFeatureBand); - var previouslyInstalledWorkloads = installedWorkloads.Intersect(workloadIds); - if (previouslyInstalledWorkloads.Any()) - { - Reporter.WriteLine(string.Format(LocalizableStrings.WorkloadAlreadyInstalled, string.Join(" ", previouslyInstalledWorkloads)).Yellow()); - } - workloadIds = workloadIds.Concat(installedWorkloads).Distinct(); - - var useWorkloadSets = ShouldUseWorkloadSetMode(_sdkFeatureBand, _dotnetPath); - useRollback = !string.IsNullOrWhiteSpace(_fromRollbackDefinition); - - _workloadManifestUpdater.UpdateAdvertisingManifestsAsync(includePreviews, useWorkloadSets, offlineCache).Wait(); - - if (useWorkloadSets) - { - if (!TryInstallWorkloadSet(context, out manifestsToUpdate)) - { - return; - } - } - else - { - manifestsToUpdate = useRollback ? _workloadManifestUpdater.CalculateManifestRollbacks(_fromRollbackDefinition) : - _workloadManifestUpdater.CalculateManifestUpdates().Select(m => m.ManifestUpdate); - } - } - - InstallWorkloadsWithInstallRecord(context, _workloadInstaller, workloadIds, _sdkFeatureBand, manifestsToUpdate, offlineCache, useRollback); - }); - - TryRunGarbageCollection(_workloadInstaller, Reporter, Verbosity, workloadSetVersion => _workloadResolverFactory.CreateForWorkloadSet(_dotnetPath, _sdkVersion.ToString(), _userProfileDir, workloadSetVersion), offlineCache); - - Reporter.WriteLine(); - Reporter.WriteLine(string.Format(LocalizableStrings.InstallationSucceeded, string.Join(" ", workloadIds))); - Reporter.WriteLine(); - } - internal static void TryRunGarbageCollection(IInstaller workloadInstaller, IReporter reporter, VerbosityOptions verbosity, Func getResolverForWorkloadSet, DirectoryPath? offlineCache = null) { try @@ -256,76 +230,6 @@ internal static void TryRunGarbageCollection(IInstaller workloadInstaller, IRepo } } - private void WriteSDKInstallRecordsForVSWorkloads() - { -#if !DOT_NET_BUILD_FROM_SOURCE - if (OperatingSystem.IsWindows()) - { - // The 'workload restore' command relies on this happening through the existing chain of logic, if this is massively refactored please ensure this is called. - VisualStudioWorkloads.WriteSDKInstallRecordsForVSWorkloads(_workloadInstaller, _workloadResolver, GetInstalledWorkloads(false), Reporter); - } -#endif - } - - private void InstallWorkloadsWithInstallRecord( - ITransactionContext context, - IInstaller installer, - IEnumerable workloadIds, - SdkFeatureBand sdkFeatureBand, - IEnumerable manifestsToUpdate, - DirectoryPath? offlineCache, - bool usingRollback) - { - IEnumerable workloadPackToInstall = new List(); - IEnumerable newWorkloadInstallRecords = new List(); - - context.Run( - action: () => - { - bool rollback = !string.IsNullOrWhiteSpace(_fromRollbackDefinition); - - foreach (var manifestUpdate in manifestsToUpdate) - { - installer.InstallWorkloadManifest(manifestUpdate, context, offlineCache, rollback); - } - - if (usingRollback) - { - installer.SaveInstallStateManifestVersions(sdkFeatureBand, GetInstallStateContents(manifestsToUpdate)); - } - - if (string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson)) - { - installer.AdjustWorkloadSetInInstallState(sdkFeatureBand, string.IsNullOrWhiteSpace(_workloadSetVersion) ? null : _workloadSetVersion); - } - - _workloadResolver.RefreshWorkloadManifests(); - - installer.InstallWorkloads(workloadIds, sdkFeatureBand, context, offlineCache); - - var recordRepo = installer.GetWorkloadInstallationRecordRepository(); - newWorkloadInstallRecords = workloadIds.Except(recordRepo.GetInstalledWorkloads(sdkFeatureBand)); - foreach (var workloadId in newWorkloadInstallRecords) - { - recordRepo.WriteWorkloadInstallationRecord(workloadId, sdkFeatureBand); - } - }, - rollback: () => - { - // InstallWorkloadManifest and InstallWorkloadPacks already handle rolling back their actions, so here we only - // need to delete the installation records - foreach (var workloadId in newWorkloadInstallRecords) - { - installer.GetWorkloadInstallationRecordRepository() - .DeleteWorkloadInstallationRecord(workloadId, sdkFeatureBand); - } - - // Refresh the workload manifests to make sure that the resolver has the updated state after the rollback - _workloadResolver.RefreshWorkloadManifests(); - }); - - } - private async Task> GetPackageDownloadUrlsAsync(IEnumerable workloadIds, bool skipManifestUpdate, bool includePreview) { var downloads = await GetDownloads(workloadIds, skipManifestUpdate, includePreview); diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs index e2a311ac7d96..338b2882a878 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs @@ -19,6 +19,8 @@ namespace Microsoft.DotNet.Workloads.Workload.Install { internal class WorkloadManifestUpdater : IWorkloadManifestUpdater { + readonly string WorkloadSetManifestId = "Microsoft.NET.Workloads"; + private readonly IReporter _reporter; private readonly IWorkloadResolver _workloadResolver; private readonly INuGetPackageDownloader _nugetPackageDownloader; @@ -89,12 +91,6 @@ public async Task UpdateAdvertisingManifestsAsync(bool includePreviews, bool use } } - public void DownloadWorkloadSet(string version, DirectoryPath? offlineCache = null) - { - var correctedVersion = WorkloadSetVersionToWorkloadSetPackageVersion(version); - Task.Run(() => UpdateManifestWithVersionAsync("Microsoft.NET.Workloads", includePreviews: true, _sdkFeatureBand, new NuGetVersion(correctedVersion), offlineCache)).Wait(); - } - public async static Task BackgroundUpdateAdvertisingManifestsAsync(string userProfileDir) { try @@ -156,12 +152,36 @@ public void DeleteUpdatableWorkloadsFile() } } - public static string WorkloadSetVersionToWorkloadSetPackageVersion(string setVersion) + public static string WorkloadSetVersionToWorkloadSetPackageVersion(string setVersion, out SdkFeatureBand sdkFeatureBand) { - var nugetVersion = new NuGetVersion(setVersion); - var patch = nugetVersion.Revision; - var release = string.IsNullOrWhiteSpace(nugetVersion.Release) ? string.Empty : $"-{nugetVersion.Release}"; - return $"{nugetVersion.Major}.{nugetVersion.Patch}.{patch}{release}"; + string[] sections = setVersion.Split(new char[] { '-', '+' }, 2); + string versionCore = sections[0]; + string preReleaseOrBuild = sections.Length > 1 ? sections[1] : null; + + string[] coreComponents = versionCore.Split('.'); + string major = coreComponents[0]; + string minor = coreComponents[1]; + string patch = coreComponents[2]; + + string packageVersion = $"{major}.{patch}."; + if (coreComponents.Length == 3) + { + // No workload set patch version + packageVersion += "0"; + + // Use preview specifier (if any) from workload set version as part of SDK feature band + sdkFeatureBand = new SdkFeatureBand(setVersion); + } + else + { + // Workload set version has workload patch version (ie 4 components) + packageVersion += coreComponents[3]; + + // Don't include any preview specifiers in SDK feature band + sdkFeatureBand = new SdkFeatureBand($"{major}.{minor}.{patch}"); + } + + return packageVersion; } public static string WorkloadSetPackageVersionToWorkloadSetVersion(SdkFeatureBand sdkFeatureBand, string packageVersion) @@ -195,6 +215,17 @@ public static void AdvertiseWorkloadUpdates() } } + public string GetAdvertisedWorkloadSetVersion() + { + var advertisedPath = GetAdvertisingManifestPath(_sdkFeatureBand, new ManifestId(WorkloadSetManifestId)); + var workloadSetVersionFilePath = Path.Combine(advertisedPath, Constants.workloadSetVersionFileName); + if (File.Exists(workloadSetVersionFilePath)) + { + return File.ReadAllText(workloadSetVersionFilePath); + } + return null; + } + public IEnumerable CalculateManifestUpdates() { var currentManifestIds = GetInstalledManifestIds(); @@ -346,7 +377,7 @@ private async Task UpdateManifestWithVersionAsync(string id, bool includeP // add file that contains the advertised manifest feature band so GetAdvertisingManifestVersionAndWorkloads will use correct feature band, regardless of if rollback occurred or not File.WriteAllText(Path.Combine(adManifestPath, "AdvertisedManifestFeatureBand.txt"), band.ToString()); - if (id.Equals("Microsoft.NET.Workloads")) + if (id.Equals(WorkloadSetManifestId)) { // Create version file later used as part of installing the workload set in the file-based installer and in the msi-based installer using PackageArchiveReader packageReader = new(packagePath); @@ -487,37 +518,9 @@ private async Task NewerManifestPackageExists(ManifestId manifest) } } - public IEnumerable ParseRollbackDefinitionFiles(IEnumerable rollbackFilePaths) + public IEnumerable CalculateManifestUpdatesForWorkloadSet(WorkloadSet workloadSet) { - var zeroVersion = new ManifestVersion("0.0.0"); - if (rollbackFilePaths.Count() == 1) - { - return ParseRollbackDefinitionFile(rollbackFilePaths.Single(), _sdkFeatureBand).Select(manifest => - { - var (id, (version, band)) = manifest; - return new ManifestVersionUpdate(id, zeroVersion, band.ToString(), version, band.ToString()); - }); - } - - // Create a single workload set that includes all the others - List<(ManifestId, ManifestVersionWithBand)> fullSet = new(); - foreach (var rollbackFile in rollbackFilePaths) - { - fullSet.AddRange(ParseRollbackDefinitionFile(rollbackFile, _sdkFeatureBand)); - } - - var reducedFullSet = fullSet.DistinctBy<(ManifestId, ManifestVersionWithBand), ManifestId>(update => update.Item1).ToList(); - if (fullSet.Count != reducedFullSet.Count) - { - var duplicates = reducedFullSet.Where(manifest => fullSet.Where(m => m.Item1.Equals(manifest.Item1)).Count() > 1); - throw new ArgumentException("There were duplicates of the following manifests between the workload set files: " + string.Join(", ", duplicates)); - } - - return fullSet.Select(manifest => - { - var (id, (version, band)) = manifest; - return new ManifestVersionUpdate(id, zeroVersion, band.ToString(), version, band.ToString()); - }); + return CalculateManifestRollbacks(workloadSet.ManifestVersions.Select(kvp => (kvp.Key, new ManifestVersionWithBand(kvp.Value.Version, kvp.Value.FeatureBand)))); } private static IEnumerable<(ManifestId Id, ManifestVersionWithBand ManifestWithBand)> ParseRollbackDefinitionFile(string rollbackDefinitionFilePath, SdkFeatureBand featureBand) diff --git a/src/Cli/dotnet/commands/dotnet-workload/list/VisualStudioWorkloads.cs b/src/Cli/dotnet/commands/dotnet-workload/list/VisualStudioWorkloads.cs index fe7415bdac98..2c3bc306405a 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/list/VisualStudioWorkloads.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/list/VisualStudioWorkloads.cs @@ -127,11 +127,12 @@ internal static void GetInstalledWorkloads(IWorkloadResolver workloadResolver, /// This is to fix a bug where updating the manifests in the CLI will cause VS to also be told to use these newer workloads via the workload resolver. /// ... but these workloads don't have their corresponding packs installed as VS doesn't update its workloads as the CLI does. /// - internal static void WriteSDKInstallRecordsForVSWorkloads(IInstaller workloadInstaller, IWorkloadResolver workloadResolver, + /// Updated list of workloads including any that may have had new install records written + internal static IEnumerable WriteSDKInstallRecordsForVSWorkloads(IInstaller workloadInstaller, IWorkloadResolver workloadResolver, IEnumerable workloadsWithExistingInstallRecords, IReporter reporter) { // Do this check to avoid adding an unused & unnecessary method to FileBasedInstallers - if (OperatingSystem.IsWindows() && typeof(NetSdkMsiInstallerClient) == workloadInstaller.GetType()) + if (OperatingSystem.IsWindows() && workloadInstaller is NetSdkMsiInstallerClient) { InstalledWorkloadsCollection vsWorkloads = new(); GetInstalledWorkloads(workloadResolver, vsWorkloads); @@ -146,10 +147,15 @@ internal static void WriteSDKInstallRecordsForVSWorkloads(IInstaller workloadIns string.Format(LocalizableStrings.WriteCLIRecordForVisualStudioWorkloadMessage, string.Join(", ", workloadsToWriteRecordsFor.Select(w => w.ToString()).ToArray())) ); - } - ((NetSdkMsiInstallerClient)workloadInstaller).WriteWorkloadInstallRecords(workloadsToWriteRecordsFor); + ((NetSdkMsiInstallerClient)workloadInstaller).WriteWorkloadInstallRecords(workloadsToWriteRecordsFor); + + return workloadsWithExistingInstallRecords.Concat(workloadsToWriteRecordsFor).ToList(); + } } + + return workloadsWithExistingInstallRecords; + } /// diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-workload/update/LocalizableStrings.resx index 5aff919c0705..70e6a66a8df3 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/LocalizableStrings.resx +++ b/src/Cli/dotnet/commands/dotnet-workload/update/LocalizableStrings.resx @@ -156,6 +156,9 @@ Updating to a rollback file is not compatible with workload sets. Install and Update will now use loose manifests. To update to a specific workload version, use --version. + + Cannot use the {0} and {1} options together. + No workload update found. diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs index 7bd8614085c9..8ca4d838966d 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs @@ -97,22 +97,22 @@ public override int Execute() try { ErrorIfGlobalJsonAndCommandLineMismatch(globaljsonPath); + var workloadIds = WriteSDKInstallRecordsForVSWorkloads(GetUpdatableWorkloads()); + DirectoryPath? offlineCache = string.IsNullOrWhiteSpace(_fromCacheOption) ? null : new DirectoryPath(_fromCacheOption); - if (string.IsNullOrWhiteSpace(_workloadSetVersion) && string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson)) - { - CalculateManifestUpdatesAndUpdateWorkloads(_includePreviews, offlineCache); - } - else + + RunInNewTransaction(context => { - RunInNewTransaction(context => - { - if (!TryHandleWorkloadUpdateFromVersion(context, offlineCache, out var manifestUpdates)) - { - return; - } - UpdateWorkloads(false, manifestUpdates, offlineCache, context); - }); - } + UpdateWorkloads(context, workloadIds, offlineCache); + }); + + WorkloadInstallCommand.TryRunGarbageCollection(_workloadInstaller, Reporter, Verbosity, workloadSetVersion => _workloadResolverFactory.CreateForWorkloadSet(_dotnetPath, _sdkVersion.ToString(), _userProfileDir, workloadSetVersion), offlineCache); + + _workloadManifestUpdater.DeleteUpdatableWorkloadsFile(); + + Reporter.WriteLine(); + Reporter.WriteLine(string.Format(LocalizableStrings.UpdateSucceeded, string.Join(" ", workloadIds))); + Reporter.WriteLine(); } catch (Exception e) { @@ -125,113 +125,6 @@ public override int Execute() return _workloadInstaller.ExitCode; } - public void CalculateManifestUpdatesAndUpdateWorkloads(bool includePreviews = false, DirectoryPath? offlineCache = null) - { - Reporter.WriteLine(); - - var useRollback = !string.IsNullOrWhiteSpace(_fromRollbackDefinition); - var useWorkloadSets = ShouldUseWorkloadSetMode(_sdkFeatureBand, _dotnetPath); - - if (useRollback && useWorkloadSets) - { - // Rollback files are only for loose manifests. Update the mode to be loose manifests. - Reporter.WriteLine(LocalizableStrings.UpdateFromRollbackSwitchesModeToLooseManifests); - _workloadInstaller.UpdateInstallMode(_sdkFeatureBand, false); - useWorkloadSets = false; - } - - var workloadIds = GetUpdatableWorkloads(); - WriteSDKInstallRecordsForVSWorkloads(workloadIds); - _workloadManifestUpdater.UpdateAdvertisingManifestsAsync(includePreviews, useWorkloadSets, offlineCache).Wait(); - - IEnumerable manifestsToUpdate; - RunInNewTransaction(context => - { - if (useWorkloadSets) - { - if (!TryInstallWorkloadSet(context, out manifestsToUpdate)) - { - return; - } - } - else - { - manifestsToUpdate = useRollback ? _workloadManifestUpdater.CalculateManifestRollbacks(_fromRollbackDefinition) : - _workloadManifestUpdater.CalculateManifestUpdates().Select(m => m.ManifestUpdate); - } - - UpdateWorkloads(useRollback, manifestsToUpdate, offlineCache, context); - }); - - WorkloadInstallCommand.TryRunGarbageCollection(_workloadInstaller, Reporter, Verbosity, workloadSetVersion => _workloadResolverFactory.CreateForWorkloadSet(_dotnetPath, _sdkVersion.ToString(), _userProfileDir, workloadSetVersion), offlineCache); - - _workloadManifestUpdater.DeleteUpdatableWorkloadsFile(); - - Reporter.WriteLine(); - Reporter.WriteLine(string.Format(LocalizableStrings.UpdateSucceeded, string.Join(" ", workloadIds))); - Reporter.WriteLine(); - } - - private void UpdateWorkloads(bool useRollback, IEnumerable manifestsToUpdate, DirectoryPath? offlineCache, ITransactionContext context) - { - var workloadIds = GetUpdatableWorkloads(); - - UpdateWorkloadsWithInstallRecord(_sdkFeatureBand, manifestsToUpdate, useRollback, context, offlineCache); - } - - private void WriteSDKInstallRecordsForVSWorkloads(IEnumerable updateableWorkloads) - { -#if !DOT_NET_BUILD_FROM_SOURCE - if (OperatingSystem.IsWindows()) - { - VisualStudioWorkloads.WriteSDKInstallRecordsForVSWorkloads(_workloadInstaller, _workloadResolver, updateableWorkloads, Reporter); - } -#endif - } - - private void UpdateWorkloadsWithInstallRecord( - SdkFeatureBand sdkFeatureBand, - IEnumerable manifestsToUpdate, - bool useRollback, - ITransactionContext context, - DirectoryPath? offlineCache = null) - { - context.Run( - action: () => - { - foreach (var manifestUpdate in manifestsToUpdate) - { - _workloadInstaller.InstallWorkloadManifest(manifestUpdate, context, offlineCache, useRollback); - } - - if (useRollback) - { - _workloadInstaller.SaveInstallStateManifestVersions(sdkFeatureBand, GetInstallStateContents(manifestsToUpdate)); - } - else - { - _workloadInstaller.RemoveManifestsFromInstallState(sdkFeatureBand); - } - - if (string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson)) - { - _workloadInstaller.AdjustWorkloadSetInInstallState(sdkFeatureBand, string.IsNullOrWhiteSpace(_workloadSetVersion) ? null : _workloadSetVersion); - } - - _workloadResolver.RefreshWorkloadManifests(); - - var workloads = GetUpdatableWorkloads(); - - _workloadInstaller.InstallWorkloads(workloads, sdkFeatureBand, context, offlineCache); - }, - rollback: () => - { - // Nothing to roll back at this level, InstallWorkloadManifest and InstallWorkloadPacks handle the transaction rollback - // We will refresh the workload manifests to make sure that the resolver has the updated state after the rollback - _workloadResolver.RefreshWorkloadManifests(); - }); - } - private async Task DownloadToOfflineCacheAsync(DirectoryPath offlineCache, bool includePreviews) { await GetDownloads(GetUpdatableWorkloads(), skipManifestUpdate: false, includePreviews, offlineCache.Value); diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.cs.xlf index 4228a8117c0a..7a941608bc97 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.cs.xlf @@ -7,6 +7,11 @@ Aktualizujte jenom manifesty reklamy. + + Cannot use the {0} and {1} options together. + Cannot use the {0} and {1} options together. + + Update all installed workloads. Aktualizace všech nainstalovaných úloh. diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.de.xlf index e740d3b5fdda..5fdaa06d47c6 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.de.xlf @@ -7,6 +7,11 @@ Aktualisieren Sie nur Werbemanifeste. + + Cannot use the {0} and {1} options together. + Cannot use the {0} and {1} options together. + + Update all installed workloads. Aktualisieren Sie alle installierten Workloads. diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.es.xlf index 5519d360b888..2e55fea4eda7 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.es.xlf @@ -7,6 +7,11 @@ Actualizar solo los manifiestos de publicidad. + + Cannot use the {0} and {1} options together. + Cannot use the {0} and {1} options together. + + Update all installed workloads. Actualice todas las cargas de trabajo instaladas. diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.fr.xlf index 0df26d1c4936..16cda2250592 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.fr.xlf @@ -7,6 +7,11 @@ Mettre à jour uniquement les manifestes de publicité + + Cannot use the {0} and {1} options together. + Cannot use the {0} and {1} options together. + + Update all installed workloads. Mettez à jour toutes les charges de travail installées. diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.it.xlf index f8a853bab73c..e1bc8b2b1a15 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.it.xlf @@ -7,6 +7,11 @@ Aggiornare solo i manifesti pubblicitari. + + Cannot use the {0} and {1} options together. + Cannot use the {0} and {1} options together. + + Update all installed workloads. Aggiornare tutti i carichi di lavoro installati. diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ja.xlf index fdaf954d5f0d..52017d86e0f0 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ja.xlf @@ -7,6 +7,11 @@ 広告マニフェストのみを更新します。 + + Cannot use the {0} and {1} options together. + Cannot use the {0} and {1} options together. + + Update all installed workloads. インストールされたすべてのワークロードを更新します。 diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ko.xlf index 44bb501b1579..14dbe43d77b3 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ko.xlf @@ -7,6 +7,11 @@ 광고 매니페스트만 업데이트합니다. + + Cannot use the {0} and {1} options together. + Cannot use the {0} and {1} options together. + + Update all installed workloads. 설치된 모든 워크로드를 업데이트합니다. diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pl.xlf index de69fac76dc2..c1afdb678235 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pl.xlf @@ -7,6 +7,11 @@ Aktualizuj tylko manifesty reklam. + + Cannot use the {0} and {1} options together. + Cannot use the {0} and {1} options together. + + Update all installed workloads. Aktualizuj wszystkie zainstalowane obciążenia. diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pt-BR.xlf index e3bdb7df5f71..65214c95a716 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pt-BR.xlf @@ -7,6 +7,11 @@ Atualizar somente manifestos de anúncio. + + Cannot use the {0} and {1} options together. + Cannot use the {0} and {1} options together. + + Update all installed workloads. Atualizar todas as cargas de trabalho instaladas. diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ru.xlf index 687aca812e9e..90cd22087b89 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ru.xlf @@ -7,6 +7,11 @@ Обновляются только манифесты рекламы. + + Cannot use the {0} and {1} options together. + Cannot use the {0} and {1} options together. + + Update all installed workloads. Обновление всех установленных рабочих нагрузок. diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.tr.xlf index 5ab2d025566b..5e06983f765d 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.tr.xlf @@ -7,6 +7,11 @@ Yalnızca reklam bildirimlerini güncelleştirin. + + Cannot use the {0} and {1} options together. + Cannot use the {0} and {1} options together. + + Update all installed workloads. Tüm yüklü iş yüklerini güncelleştirin. diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hans.xlf index 8e99dc9984ff..bea532aa56b1 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hans.xlf @@ -7,6 +7,11 @@ 仅更新广告清单。 + + Cannot use the {0} and {1} options together. + Cannot use the {0} and {1} options together. + + Update all installed workloads. 更新所有已安装的工作负载。 diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hant.xlf index 9eef806d2028..6aeb8cff4d01 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hant.xlf @@ -7,6 +7,11 @@ 只更新廣告資訊清單。 + + Cannot use the {0} and {1} options together. + Cannot use the {0} and {1} options together. + + Update all installed workloads. 更新所有已安裝的工作負載。 diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/ManifestVersionUpdate.cs b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/ManifestVersionUpdate.cs index 0d32c472c394..7c9d1883ee5d 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/ManifestVersionUpdate.cs +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/ManifestVersionUpdate.cs @@ -3,6 +3,7 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader { + // TODO: Do we need this class, or the existing version information anymore now that workload manifest are side by side? public class ManifestVersionUpdate : IEquatable, IComparable { public ManifestVersionUpdate(ManifestId manifestId, ManifestVersion? existingVersion, string? existingFeatureBand, ManifestVersion? newVersion, string? newFeatureBand) diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs index 167197fcf94d..5a44e0d3c1db 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs @@ -479,33 +479,9 @@ public Dictionary GetAvailableWorkloadSets() { foreach (var workloadSetDirectory in Directory.GetDirectories(workloadSetsRoot)) { - WorkloadSet? workloadSet = null; - foreach (var jsonFile in Directory.GetFiles(workloadSetDirectory, "*.workloadset.json")) - { - var newWorkloadSet = WorkloadSet.FromJson(File.ReadAllText(jsonFile), _sdkVersionBand); - if (workloadSet == null) - { - workloadSet = newWorkloadSet; - } - else - { - // If there are multiple workloadset.json files, merge them - foreach (var kvp in newWorkloadSet.ManifestVersions) - { - workloadSet.ManifestVersions.Add(kvp.Key, kvp.Value); - } - } - } - if (workloadSet != null) - { - if (File.Exists(Path.Combine(workloadSetDirectory, "baseline.workloadset.json"))) - { - workloadSet.IsBaselineWorkloadSet = true; - } - - workloadSet.Version = Path.GetFileName(workloadSetDirectory); - availableWorkloadSets[workloadSet.Version] = workloadSet; - } + var workloadSetVersion = Path.GetFileName(workloadSetDirectory); + var workloadSet = WorkloadSet.FromWorkloadSetFolder(workloadSetDirectory, workloadSetVersion, _sdkVersionBand); + availableWorkloadSets[workloadSet.Version!] = workloadSet; } } } diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadSet.cs b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadSet.cs index 09e8ad4cfffa..53cf9663cb30 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadSet.cs +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadSet.cs @@ -81,6 +81,45 @@ public static WorkloadSet FromJson(string json, SdkFeatureBand defaultFeatureBan #endif } + public static WorkloadSet FromWorkloadSetFolder(string path, string workloadSetVersion, SdkFeatureBand defaultFeatureBand) + { + WorkloadSet? workloadSet = null; + foreach (var jsonFile in Directory.GetFiles(path, "*.workloadset.json")) + { + var newWorkloadSet = WorkloadSet.FromJson(File.ReadAllText(jsonFile), defaultFeatureBand); + if (workloadSet == null) + { + workloadSet = newWorkloadSet; + } + else + { + // If there are multiple workloadset.json files, merge them + foreach (var kvp in newWorkloadSet.ManifestVersions) + { + if (workloadSet.ManifestVersions.ContainsKey(kvp.Key)) + { + throw new InvalidOperationException($"Workload set files in {path} defined the same manifest ({kvp.Key}) multiple times"); + } + workloadSet.ManifestVersions.Add(kvp.Key, kvp.Value); + } + } + } + + if (workloadSet == null) + { + throw new InvalidOperationException("No workload set information found in: " + path); + } + + if (File.Exists(Path.Combine(path, "baseline.workloadset.json"))) + { + workloadSet.IsBaselineWorkloadSet = true; + } + + workloadSet.Version = workloadSetVersion; + + return workloadSet; + } + public Dictionary ToDictionaryForJson() { var dictionary = ManifestVersions.ToDictionary(kvp => kvp.Key.ToString(), kvp => kvp.Value.Version + "/" + kvp.Value.FeatureBand, StringComparer.OrdinalIgnoreCase); diff --git a/src/Tests/Microsoft.NET.Sdk.WorkloadManifestReader.Tests/SdkDirectoryWorkloadManifestProviderTests.cs b/src/Tests/Microsoft.NET.Sdk.WorkloadManifestReader.Tests/SdkDirectoryWorkloadManifestProviderTests.cs index 3316a7d0a3ea..081d8c260a61 100644 --- a/src/Tests/Microsoft.NET.Sdk.WorkloadManifestReader.Tests/SdkDirectoryWorkloadManifestProviderTests.cs +++ b/src/Tests/Microsoft.NET.Sdk.WorkloadManifestReader.Tests/SdkDirectoryWorkloadManifestProviderTests.cs @@ -468,7 +468,7 @@ public void ItThrowsExceptionIfWorkloadSetJsonFilesHaveDuplicateManifests() } """); - Assert.Throws(() => + Assert.Throws(() => new SdkDirectoryWorkloadManifestProvider(sdkRootPath: _fakeDotnetRootDirectory, sdkVersion: "8.0.200", userProfileDir: null, globalJsonPath: null)); } diff --git a/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs b/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs index e7157a0b7da5..930ac79e4054 100644 --- a/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs +++ b/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs @@ -257,6 +257,22 @@ string GetWorkloadVersion(string workingDirectory = null) return result.StdOut; } + + [Fact] + public void WorkloadSetInstallationRecordIsWrittenCorrectly() + { + // Should the workload set version or the package version be used in the registry? + throw new NotImplementedException(); + } + + [Fact] + public void TurnOffWorkloadSetUpdateMode() + { + // If you have a workload set installed and then turn off workload set update mode, what should happen? + // - Update should update individual manifests + // - Resolver should ignore workload sets that are installed + throw new NotImplementedException(); + } string GetUpdateMode() { diff --git a/src/Tests/dotnet-workload-install.Tests/GivenDotnetWorkloadInstall.cs b/src/Tests/dotnet-workload-install.Tests/GivenDotnetWorkloadInstall.cs index ac2f2c199f50..cb9537d497af 100644 --- a/src/Tests/dotnet-workload-install.Tests/GivenDotnetWorkloadInstall.cs +++ b/src/Tests/dotnet-workload-install.Tests/GivenDotnetWorkloadInstall.cs @@ -67,7 +67,8 @@ public void GivenWorkloadInstallItCanInstallPacks(bool userLocal, string sdkVers var parseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", "xamarin-android", "--skip-manifest-update" }); (_, var installManager, var installer, _, _, _) = GetTestInstallers(parseResult, userLocal, sdkVersion, installedFeatureBand: sdkVersion); - installManager.InstallWorkloads(mockWorkloadIds, true); + installManager.Execute() + .Should().Be(0); installer.GarbageCollectionCalled.Should().BeTrue(); installer.CachePath.Should().BeNull(); @@ -87,8 +88,9 @@ public void GivenWorkloadInstallItCanRollBackPackInstallation(bool userLocal, st var parseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", "xamarin-android", "xamarin-android-build", "--skip-manifest-update" }); (_, var installManager, var installer, var workloadResolver, _, _) = GetTestInstallers(parseResult, userLocal, sdkVersion, failingWorkload: "xamarin-android-build", installedFeatureBand: sdkVersion); - var exceptionThrown = Assert.Throws(() => installManager.InstallWorkloads(mockWorkloadIds, true)); - exceptionThrown.Message.Should().Be("Failing workload: xamarin-android-build"); + var exceptionThrown = Assert.Throws(() => installManager.Execute()); + exceptionThrown.Message.Should().Contain("Failing workload: xamarin-android-build"); + var expectedPacks = mockWorkloadIds .SelectMany(workloadId => workloadResolver.GetPacksInWorkload(workloadId)) .Distinct() @@ -111,8 +113,8 @@ public void GivenWorkloadInstallOnFailingRollbackItDisplaysTopLevelError() var installManager = new WorkloadInstallCommand(parseResult, reporter: _reporter, workloadResolverFactory, workloadInstaller: installer); - var exceptionThrown = Assert.Throws(() => installManager.InstallWorkloads(mockWorkloadIds, true)); - exceptionThrown.Message.Should().Be("Failing workload: xamarin-android-build"); + var exceptionThrown = Assert.Throws(() => installManager.Execute()); + exceptionThrown.Message.Should().Contain("Failing workload: xamarin-android-build"); string.Join(" ", _reporter.Lines).Should().Contain("Rollback failure"); } @@ -126,7 +128,8 @@ public void GivenWorkloadInstallItCanUpdateAdvertisingManifests(bool userLocal, var parseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", "xamarin-android" }); (_, var installManager, var installer, _, var manifestUpdater, _) = GetTestInstallers(parseResult, userLocal, sdkVersion, installedFeatureBand: sdkVersion); - installManager.InstallWorkloads(new List(), false); // Don't actually do any installs, just update manifests + installManager.Execute() + .Should().Be(0); installer.InstalledManifests.Should().BeEmpty(); // Didn't try to alter any installed manifests manifestUpdater.CalculateManifestUpdatesCallCount.Should().Be(1); @@ -146,7 +149,9 @@ public void GivenWorkloadInstallItWarnsOnGarbageCollectionFailure() var workloadResolverFactory = new MockWorkloadResolverFactory(dotnetRoot, "6.0.100", workloadResolver); var installManager = new WorkloadInstallCommand(parseResult, reporter: _reporter, workloadResolverFactory, workloadInstaller: installer); - installManager.InstallWorkloads(mockWorkloadIds, true); + installManager.Execute() + .Should() + .Be(0); string.Join(" ", _reporter.Lines).Should().Contain("Failing garbage collection"); } @@ -212,7 +217,8 @@ public void GivenWorkloadInstallItCanUpdateInstalledManifests(bool userLocal, st (_, var installManager, var installer, _, _, _) = GetTestInstallers(parseResult, userLocal, sdkVersion, manifestUpdates: manifestsToUpdate, installedFeatureBand: sdkVersion); - installManager.InstallWorkloads(new List(), false); // Don't actually do any installs, just update manifests + installManager.Execute() + .Should().Be(0); installer.InstalledManifests[0].manifestUpdate.ManifestId.Should().Be(manifestsToUpdate[0].ManifestUpdate.ManifestId); installer.InstalledManifests[0].manifestUpdate.NewVersion.Should().Be(manifestsToUpdate[0].ManifestUpdate.NewVersion); @@ -597,7 +603,7 @@ public void ShowManifestUpdatesWhenVerbosityIsDetailedOrDiagnostic(string verbos (_, var installManager, _, _, _, _) = GetTestInstallers(parseResult, true, sdkFeatureBand, manifestUpdates: manifestsToUpdate); - installManager.InstallWorkloads(new List(), false); // Don't actually do any installs, just update manifests + installManager.Execute().Should().Be(0); string.Join(" ", _reporter.Lines).Should().Contain(Workloads.Workload.Install.LocalizableStrings.CheckForUpdatedWorkloadManifests); string.Join(" ", _reporter.Lines).Should().Contain(String.Format(Workloads.Workload.Install.LocalizableStrings.CheckForUpdatedWorkloadManifests, "mock-manifest")); diff --git a/src/Tests/dotnet-workload-install.Tests/MockPackWorkloadInstaller.cs b/src/Tests/dotnet-workload-install.Tests/MockPackWorkloadInstaller.cs index fb4b3924dea5..9ecd4d2e0201 100644 --- a/src/Tests/dotnet-workload-install.Tests/MockPackWorkloadInstaller.cs +++ b/src/Tests/dotnet-workload-install.Tests/MockPackWorkloadInstaller.cs @@ -20,6 +20,7 @@ internal class MockPackWorkloadInstaller : IInstaller new List<(ManifestVersionUpdate manifestUpdate, DirectoryPath?)>(); public string CachePath; public bool GarbageCollectionCalled = false; + public bool InstallWorkloadSetCalled = false; public MockInstallationRecordRepository InstallationRecordRepository; public bool FailingRollback; public bool FailingGarbageCollection; @@ -105,12 +106,12 @@ public void InstallWorkloads(IEnumerable workloadIds, SdkFeatureBand }); } - public string InstallWorkloadSet(ITransactionContext context, string advertisingPackagePath) + public WorkloadSet InstallWorkloadSet(ITransactionContext context, string workloadSetVersion, DirectoryPath? offlineCache = null) { - var version = Path.GetFileName(Path.GetDirectoryName(advertisingPackagePath ?? string.Empty)); - Directory.CreateDirectory(advertisingPackagePath); - File.WriteAllText(Path.Combine(advertisingPackagePath, Constants.workloadSetVersionFileName), version); - return Path.GetDirectoryName(advertisingPackagePath ?? string.Empty); + InstallWorkloadSetCalled = true; + var workloadSet = WorkloadSet.FromJson(workloadSetContents, new SdkFeatureBand("6.0.100")); + workloadSet.Version = workloadSetVersion; + return workloadSet; } public void RepairWorkloads(IEnumerable workloadIds, SdkFeatureBand sdkFeatureBand, DirectoryPath? offlineCache = null) => throw new NotImplementedException(); diff --git a/src/Tests/dotnet-workload-install.Tests/MockWorkloadManifestUpdater.cs b/src/Tests/dotnet-workload-install.Tests/MockWorkloadManifestUpdater.cs index 3b7a0275a2e6..609cb9b6bb52 100644 --- a/src/Tests/dotnet-workload-install.Tests/MockWorkloadManifestUpdater.cs +++ b/src/Tests/dotnet-workload-install.Tests/MockWorkloadManifestUpdater.cs @@ -14,11 +14,13 @@ internal class MockWorkloadManifestUpdater : IWorkloadManifestUpdater public int GetManifestPackageDownloadsCallCount = 0; private readonly IEnumerable _manifestUpdates; private bool _fromWorkloadSet; + private string _workloadSetVersion; - public MockWorkloadManifestUpdater(IEnumerable manifestUpdates = null, bool fromWorkloadSet = false) + public MockWorkloadManifestUpdater(IEnumerable manifestUpdates = null, bool fromWorkloadSet = false, string workloadSetVersion = null) { _manifestUpdates = manifestUpdates ?? new List(); _fromWorkloadSet = fromWorkloadSet; + _workloadSetVersion = workloadSetVersion; } public Task UpdateAdvertisingManifestsAsync(bool includePreview, bool useWorkloadSets = false, DirectoryPath? cachePath = null) @@ -56,7 +58,9 @@ public IEnumerable CalculateManifestRollbacks(string roll public IEnumerable GetUpdatableWorkloadsToAdvertise(IEnumerable installedWorkloads) => throw new NotImplementedException(); public void DeleteUpdatableWorkloadsFile() { } - public void DownloadWorkloadSet(string version, DirectoryPath? offlineCache) => throw new NotImplementedException(); - public IEnumerable ParseRollbackDefinitionFiles(IEnumerable files) => _manifestUpdates.Select(t => t.ManifestUpdate); + public IEnumerable CalculateManifestUpdatesForWorkloadSet(WorkloadSet workloadSet) => _manifestUpdates.Select(t => t.ManifestUpdate); + + public string GetAdvertisedWorkloadSetVersion() => _workloadSetVersion; + } } diff --git a/src/Tests/dotnet-workload-update.Tests/GivenDotnetWorkloadUpdate.cs b/src/Tests/dotnet-workload-update.Tests/GivenDotnetWorkloadUpdate.cs index 4535a63ef971..e78d31494510 100644 --- a/src/Tests/dotnet-workload-update.Tests/GivenDotnetWorkloadUpdate.cs +++ b/src/Tests/dotnet-workload-update.Tests/GivenDotnetWorkloadUpdate.cs @@ -196,7 +196,12 @@ public void GivenWorkloadUpdateItUpdatesOutOfDatePacks() [InlineData(false)] public void UpdateViaWorkloadSet(bool upgrade) { - var versionNumber = "8.0.0"; + var testDir = _testAssetsManager.CreateTestDirectory(identifier: upgrade.ToString()); + string dotnetDir = Path.Combine(testDir.Path, "dotnet"); + string userProfileDir = Path.Combine(testDir.Path, "userProfileDir"); + + var sdkVersion = "8.0.300"; + var workloadSetVersion = "8.0.302"; var workloadSetContents = @" { ""android"": ""2.3.4/8.0.200"" @@ -205,7 +210,7 @@ public void UpdateViaWorkloadSet(bool upgrade) var nugetPackageDownloader = new MockNuGetPackageDownloader(); var workloadResolver = new MockWorkloadResolver(new WorkloadInfo[] { new WorkloadInfo(new WorkloadId("android"), string.Empty) }); var workloadInstaller = new MockPackWorkloadInstaller( - Path.Combine(Path.GetTempPath(), "dotnetTestPat", "userProfileDir"), + dotnetDir, installedWorkloads: new List() { new WorkloadId("android")}, workloadSetContents: workloadSetContents) { @@ -216,34 +221,17 @@ public void UpdateViaWorkloadSet(bool upgrade) manifestUpdates: new ManifestUpdateWithWorkloads[] { new ManifestUpdateWithWorkloads(new ManifestVersionUpdate(new ManifestId("android"), new ManifestVersion(oldVersion), "8.0.200", new ManifestVersion("2.3.4"), "8.0.200"), Enumerable.Empty>().ToDictionary()) }, - fromWorkloadSet: true); - var resolverFactory = new MockWorkloadResolverFactory(Path.Combine(Path.GetTempPath(), "dotnetTestPath"), versionNumber, workloadResolver, "userProfileDir"); + fromWorkloadSet: true, workloadSetVersion: workloadSetVersion); + var resolverFactory = new MockWorkloadResolverFactory(dotnetDir, sdkVersion, workloadResolver, userProfileDir); var updateCommand = new WorkloadUpdateCommand(Parser.Instance.Parse("dotnet workload update"), Reporter.Output, resolverFactory, workloadInstaller, nugetPackageDownloader, workloadManifestUpdater); - var installStatePath = Path.Combine(Path.GetTempPath(), "dotnetTestPath", "metadata", "workloads", RuntimeInformation.ProcessArchitecture.ToString(), versionNumber, "InstallState", "default.json"); + var installStatePath = Path.Combine(dotnetDir, "metadata", "workloads", RuntimeInformation.ProcessArchitecture.ToString(), sdkVersion, "InstallState", "default.json"); var contents = new InstallStateContents(); contents.UseWorkloadSets = true; - var versionFile = Path.Combine("userProfileDir", "sdk-advertising", "8.0.0", "microsoft.net.workloads", Constants.workloadSetVersionFileName); - try - { - Directory.CreateDirectory(Path.GetDirectoryName(installStatePath)); - File.WriteAllText(installStatePath, contents.ToString()); - updateCommand.Execute(); - File.Exists(versionFile).Should().BeTrue(); - File.ReadAllText(versionFile).Should().Be("8.0.0"); - } - finally - { - if (File.Exists(versionFile)) - { - File.Delete(versionFile); - } - - if (File.Exists(installStatePath)) - { - File.Delete(installStatePath); - } - } + + Directory.CreateDirectory(Path.GetDirectoryName(installStatePath)); + File.WriteAllText(installStatePath, contents.ToString()); + updateCommand.Execute(); workloadInstaller.InstalledManifests.Count.Should().Be(1); workloadInstaller.InstalledManifests[0].manifestUpdate.NewVersion.ToString().Should().Be("2.3.4"); @@ -391,7 +379,8 @@ public void ApplyRollbackAcrossFeatureBand(string existingSdkFeatureBand, string }; (var dotnetPath, var updateCommand, var packInstaller, _, _, _) = GetTestInstallers(parseResult, manifestUpdates: manifestsToUpdate, sdkVersion: "6.0.300", identifier: existingSdkFeatureBand + newSdkFeatureBand, installedFeatureBand: existingSdkFeatureBand); - updateCommand.CalculateManifestUpdatesAndUpdateWorkloads(); + updateCommand.Execute() + .Should().Be(0); packInstaller.InstalledManifests[0].manifestUpdate.ManifestId.Should().Be(manifestsToUpdate[0].ManifestUpdate.ManifestId); packInstaller.InstalledManifests[0].manifestUpdate.NewVersion.Should().Be(manifestsToUpdate[0].ManifestUpdate.NewVersion); @@ -421,7 +410,8 @@ public void ApplyRollbackWithMultipleManifestsAcrossFeatureBand() }; (_, var updateCommand, var packInstaller, _, _, _) = GetTestInstallers(parseResult, manifestUpdates: manifestsToUpdate, sdkVersion: "6.0.300", installedFeatureBand: "6.0.300"); - updateCommand.CalculateManifestUpdatesAndUpdateWorkloads(); + updateCommand.Execute() + .Should().Be(0); packInstaller.InstalledManifests[0].manifestUpdate.ManifestId.Should().Be(manifestsToUpdate[0].ManifestUpdate.ManifestId); packInstaller.InstalledManifests[0].manifestUpdate.NewVersion.Should().Be(manifestsToUpdate[0].ManifestUpdate.NewVersion); From a571bba5ee8399944862d4473631720b64eb0f19 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Wed, 10 Apr 2024 10:50:43 -0400 Subject: [PATCH 061/159] Handle different workload update / install scenarios --- .../commands/InstallingWorkloadCommand.cs | 99 ++++++++++--------- .../install/WorkloadInstallCommand.cs | 21 ++-- .../install/WorkloadManifestUpdater.cs | 2 + .../update/WorkloadUpdateCommand.cs | 10 +- 4 files changed, 74 insertions(+), 58 deletions(-) diff --git a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs index c586e83fc287..fd0b2eba8c04 100644 --- a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs +++ b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs @@ -35,7 +35,7 @@ internal abstract class InstallingWorkloadCommand : WorkloadCommandBase protected readonly SdkFeatureBand _sdkFeatureBand; protected readonly ReleaseVersion _targetSdkVersion; protected readonly string _fromRollbackDefinition; - protected string _workloadSetVersion; + protected string _workloadSetVersionFromCommandLine; protected string _workloadSetVersionFromGlobalJson; protected readonly PackageSourceLocation _packageSourceLocation; protected readonly IWorkloadResolverFactory _workloadResolverFactory; @@ -45,6 +45,10 @@ internal abstract class InstallingWorkloadCommand : WorkloadCommandBase protected IInstaller _workloadInstaller; protected IWorkloadManifestUpdater _workloadManifestUpdater; + protected bool UseRollback => !string.IsNullOrWhiteSpace(_fromRollbackDefinition); + protected bool SpecifiedWorkloadSetVersionOnCommandLine => !string.IsNullOrEmpty(_workloadSetVersionFromCommandLine); + protected bool SpecifiedWorkloadSetVersionInGlobalJson => !string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson); + public InstallingWorkloadCommand( ParseResult parseResult, IReporter reporter, @@ -61,6 +65,8 @@ public InstallingWorkloadCommand( _downloadToCacheOption = parseResult.GetValue(InstallingWorkloadCommandParser.DownloadToCacheOption); _fromRollbackDefinition = parseResult.GetValue(InstallingWorkloadCommandParser.FromRollbackFileOption); + _workloadSetVersionFromCommandLine = parseResult.GetValue(InstallingWorkloadCommandParser.WorkloadSetVersionOption); + var configOption = parseResult.GetValue(InstallingWorkloadCommandParser.ConfigOption); var sourceOption = parseResult.GetValue(InstallingWorkloadCommandParser.SourceOption); _packageSourceLocation = string.IsNullOrEmpty(configOption) && (sourceOption == null || !sourceOption.Any()) ? null : @@ -92,6 +98,26 @@ public InstallingWorkloadCommand( _workloadInstallerFromConstructor = workloadInstaller; _workloadManifestUpdaterFromConstructor = workloadManifestUpdater; + + var globaljsonPath = SdkDirectoryWorkloadManifestProvider.GetGlobalJsonPath(Environment.CurrentDirectory); + _workloadSetVersionFromGlobalJson = SdkDirectoryWorkloadManifestProvider.GlobalJsonReader.GetWorkloadVersionFromGlobalJson(globaljsonPath); + + //bool specifiedWorkloadSetVersionInGlobalJson = !string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson); + + if (SpecifiedWorkloadSetVersionInGlobalJson && (SpecifiedWorkloadSetVersionOnCommandLine || UseRollback)) + { + throw new GracefulException(string.Format(Strings.CannotSpecifyVersionOnCommandLineAndInGlobalJson, globaljsonPath), isUserError: true); + } + + if (SpecifiedWorkloadSetVersionOnCommandLine && UseRollback) + { + throw new GracefulException(string.Format(Update.LocalizableStrings.CannotCombineOptions, + InstallingWorkloadCommandParser.FromRollbackFileOption.Name, + InstallingWorkloadCommandParser.WorkloadSetVersionOption.Name), isUserError: true); + } + + // At this point, at most one of specifiedWorkloadSetVersionOnCommandLine, useRollback, and specifiedWorkloadSetVersionInGlobalJson is true + } protected static Dictionary GetInstallStateContents(IEnumerable manifestVersionUpdates) => @@ -106,38 +132,20 @@ public static bool ShouldUseWorkloadSetMode(SdkFeatureBand sdkFeatureBand, strin return installStateContents.UseWorkloadSets ?? false; } - protected void ErrorIfGlobalJsonAndCommandLineMismatch(string globaljsonPath) + protected void InstallWorkloads(ITransactionContext context, IEnumerable workloadsToUpdateOrInstall, bool shouldUpdateManifests, DirectoryPath? offlineCache) { - if (!string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson) && !string.IsNullOrWhiteSpace(_workloadSetVersion) && !_workloadSetVersion.Equals(_workloadSetVersionFromGlobalJson)) - { - throw new Exception(string.Format(Strings.CannotSpecifyVersionOnCommandLineAndInGlobalJson, globaljsonPath)); - } - } - - protected void UpdateWorkloads(ITransactionContext context, IEnumerable workloadsToUpdateOrInstall, DirectoryPath? offlineCache) - { - var useRollback = !string.IsNullOrWhiteSpace(_fromRollbackDefinition); - - bool specifiedWorkloadSetVersion = !string.IsNullOrEmpty(_workloadSetVersion); - if (specifiedWorkloadSetVersion && useRollback) - { - throw new GracefulException(string.Format(Update.LocalizableStrings.CannotCombineOptions, - InstallingWorkloadCommandParser.FromRollbackFileOption.Name, - InstallingWorkloadCommandParser.WorkloadSetVersionOption.Name), isUserError: true); - } - - var useWorkloadSets = ShouldUseWorkloadSetMode(_sdkFeatureBand, _dotnetPath); - if (useRollback && useWorkloadSets) + var updateUsingWorkloadSets = ShouldUseWorkloadSetMode(_sdkFeatureBand, _dotnetPath); + if (UseRollback && updateUsingWorkloadSets) { // Rollback files are only for loose manifests. Update the mode to be loose manifests. Reporter.WriteLine(Update.LocalizableStrings.UpdateFromRollbackSwitchesModeToLooseManifests); _workloadInstaller.UpdateInstallMode(_sdkFeatureBand, false); - useWorkloadSets = false; + updateUsingWorkloadSets = false; } - if (specifiedWorkloadSetVersion) + if (SpecifiedWorkloadSetVersionOnCommandLine) { - useWorkloadSets = true; + updateUsingWorkloadSets = false; // If a workload set version is specified, then switch to workload set update mode // Check to make sure the value needs to be changed, as updating triggers a UAC prompt @@ -148,30 +156,30 @@ protected void UpdateWorkloads(ITransactionContext context, IEnumerable manifestsToUpdate; - if (useWorkloadSets) + if (resolvedWorkloadSetVersion != null) { manifestsToUpdate = InstallWorkloadSet(context, resolvedWorkloadSetVersion); } else { - manifestsToUpdate = useRollback ? _workloadManifestUpdater.CalculateManifestRollbacks(_fromRollbackDefinition) : + manifestsToUpdate = UseRollback ? _workloadManifestUpdater.CalculateManifestRollbacks(_fromRollbackDefinition) : _workloadManifestUpdater.CalculateManifestUpdates().Select(m => m.ManifestUpdate); } @@ -180,22 +188,25 @@ protected void UpdateWorkloads(ITransactionContext context, IEnumerable { if (_skipManifestUpdate) @@ -174,7 +179,7 @@ public override int Execute() // TODO: Change this message to account for workload set wording Reporter.WriteLine(LocalizableStrings.CheckForUpdatedWorkloadManifests); } - UpdateWorkloads(context, workloadIds, offlineCache); + InstallWorkloads(context, workloadIds, shouldUpdateManifests: true, offlineCache); } // Write workload installation records diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs index 338b2882a878..e8dd64d7eda5 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs @@ -520,6 +520,8 @@ private async Task NewerManifestPackageExists(ManifestId manifest) public IEnumerable CalculateManifestUpdatesForWorkloadSet(WorkloadSet workloadSet) { + // TODO: Don't look up previous manifest versions (since we may be in the mode where there's a global.json with a workload set + // that's not installed, and trying to get the current manifests will throw an exception) return CalculateManifestRollbacks(workloadSet.ManifestVersions.Select(kvp => (kvp.Key, new ManifestVersionWithBand(kvp.Value.Version, kvp.Value.FeatureBand)))); } diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs index 8ca4d838966d..bd7fc4f447f0 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs @@ -35,7 +35,7 @@ public WorkloadUpdateCommand( tempDirPath: tempDirPath) { - _workloadSetVersion = parseResult.GetValue(InstallingWorkloadCommandParser.WorkloadSetVersionOption); + _fromPreviousSdk = parseResult.GetValue(WorkloadUpdateCommandParser.FromPreviousSdkOption); _adManifestOnlyOption = parseResult.GetValue(WorkloadUpdateCommandParser.AdManifestOnlyOption); _printRollbackDefinitionOnly = parseResult.GetValue(WorkloadUpdateCommandParser.PrintRollbackOption); @@ -91,23 +91,21 @@ public override int Execute() } else { - var globaljsonPath = SdkDirectoryWorkloadManifestProvider.GetGlobalJsonPath(Environment.CurrentDirectory); - _workloadSetVersionFromGlobalJson = SdkDirectoryWorkloadManifestProvider.GlobalJsonReader.GetWorkloadVersionFromGlobalJson(globaljsonPath); - + Reporter.WriteLine(); try { - ErrorIfGlobalJsonAndCommandLineMismatch(globaljsonPath); var workloadIds = WriteSDKInstallRecordsForVSWorkloads(GetUpdatableWorkloads()); DirectoryPath? offlineCache = string.IsNullOrWhiteSpace(_fromCacheOption) ? null : new DirectoryPath(_fromCacheOption); RunInNewTransaction(context => { - UpdateWorkloads(context, workloadIds, offlineCache); + InstallWorkloads(context, workloadIds, shouldUpdateManifests: true, offlineCache); }); WorkloadInstallCommand.TryRunGarbageCollection(_workloadInstaller, Reporter, Verbosity, workloadSetVersion => _workloadResolverFactory.CreateForWorkloadSet(_dotnetPath, _sdkVersion.ToString(), _userProfileDir, workloadSetVersion), offlineCache); + // TODO: potentially only do this in some cases (ie not if global.json specifies workload set) _workloadManifestUpdater.DeleteUpdatableWorkloadsFile(); Reporter.WriteLine(); From c10f8dfc5061e66b230b969286b6fd5c162c305f Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Mon, 13 May 2024 13:37:54 -0400 Subject: [PATCH 062/159] Add Aspire test --- .../Framework/VMStateTree.cs | 2 +- .../MsiInstallerTests.cs | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/Tests/dotnet-MsiInstallation.Tests/Framework/VMStateTree.cs b/src/Tests/dotnet-MsiInstallation.Tests/Framework/VMStateTree.cs index ca5d69017f64..7e683a67c5c1 100644 --- a/src/Tests/dotnet-MsiInstallation.Tests/Framework/VMStateTree.cs +++ b/src/Tests/dotnet-MsiInstallation.Tests/Framework/VMStateTree.cs @@ -103,7 +103,7 @@ internal class SerializableVMState { public string DefaultRootState { get; set; } - public List VMStates { get; set; } + public List VMStates { get; set; } = new(); public VMState ToVMState() { diff --git a/src/Tests/dotnet-MsiInstallation.Tests/MsiInstallerTests.cs b/src/Tests/dotnet-MsiInstallation.Tests/MsiInstallerTests.cs index 2b4129f6db41..a8de1c6e30c6 100644 --- a/src/Tests/dotnet-MsiInstallation.Tests/MsiInstallerTests.cs +++ b/src/Tests/dotnet-MsiInstallation.Tests/MsiInstallerTests.cs @@ -259,6 +259,26 @@ public void ApplyRollbackShouldNotUpdateAdvertisingManifests() throw new NotImplementedException(); } + [Fact] + public void TestAspire() + { + InstallSdk(); + + //AddNuGetSource("https://pkgs.dev.azure.com/dnceng/internal/_packaging/8.0.300-rtm.24224.15-shipping/nuget/v3/index.json"); + //AddNuGetSource("https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-aspire-d215c528/nuget/v3/index.json"); + + //VM.CreateRunCommand("powershell", "-Command", "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) }") + // .Execute().Should().Pass(); + + InstallWorkload("aspire"); + + VM.CreateRunCommand("dotnet", "new", "aspire-starter", "-o", "Aspire-StarterApp01") + .WithWorkingDirectory(@"c:\SdkTesting") + .Execute() + .Should() + .Pass(); + } + void TestWasmWorkload() { From 5c6bf0909dcbd41d1c82af9470c5bbee1dcea217 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 14 May 2024 11:02:09 -0400 Subject: [PATCH 063/159] Roll back install state changes on workload install / update failures --- .../Windows/InstallMessageDispatcher.cs | 2 +- .../Windows/InstallRequestMessage.cs | 2 +- .../commands/InstallingWorkloadCommand.cs | 31 ++++++++++++++++++- .../install/FileBasedInstaller.cs | 6 ++-- .../dotnet-workload/install/IInstaller.cs | 2 +- .../install/MsiInstallerBase.cs | 2 +- .../install/NetSdkMsiInstallerClient.cs | 5 +-- .../install/NetSdkMsiInstallerServer.cs | 2 +- .../MockPackWorkloadInstaller.cs | 2 +- 9 files changed, 43 insertions(+), 11 deletions(-) diff --git a/src/Cli/dotnet/Installer/Windows/InstallMessageDispatcher.cs b/src/Cli/dotnet/Installer/Windows/InstallMessageDispatcher.cs index 538bae6d1a46..4a06ca945d13 100644 --- a/src/Cli/dotnet/Installer/Windows/InstallMessageDispatcher.cs +++ b/src/Cli/dotnet/Installer/Windows/InstallMessageDispatcher.cs @@ -183,7 +183,7 @@ public InstallResponseMessage SendSaveInstallStateManifestVersions(SdkFeatureBan /// The SDK feature band of the install state file to write /// Whether to use workload sets or not /// - public InstallResponseMessage SendUpdateWorkloadModeRequest(SdkFeatureBand sdkFeatureBand, bool newMode) + public InstallResponseMessage SendUpdateWorkloadModeRequest(SdkFeatureBand sdkFeatureBand, bool? newMode) { return Send(new InstallRequestMessage { diff --git a/src/Cli/dotnet/Installer/Windows/InstallRequestMessage.cs b/src/Cli/dotnet/Installer/Windows/InstallRequestMessage.cs index 962bdd90dd9f..7a074df68614 100644 --- a/src/Cli/dotnet/Installer/Windows/InstallRequestMessage.cs +++ b/src/Cli/dotnet/Installer/Windows/InstallRequestMessage.cs @@ -123,7 +123,7 @@ public string WorkloadId /// /// The new mode to use: workloadset or loosemanifests /// - public bool UseWorkloadSets + public bool? UseWorkloadSets { get; set; } diff --git a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs index fd0b2eba8c04..213d8904b4f4 100644 --- a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs +++ b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs @@ -125,6 +125,13 @@ protected static Dictionary GetInstallStateContents(IEnumerable< manifestVersionUpdates.Select(update => new WorkloadManifestInfo(update.ManifestId.ToString(), update.NewVersion.ToString(), /* We don't actually use the directory here */ string.Empty, update.NewFeatureBand)) ).ToDictionaryForJson(); + InstallStateContents GetCurrentInstallState() + { + string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkFeatureBand, _dotnetPath), "default.json"); + var installStateContents = File.Exists(path) ? InstallStateContents.FromString(File.ReadAllText(path)) : new InstallStateContents(); + return installStateContents; + } + public static bool ShouldUseWorkloadSetMode(SdkFeatureBand sdkFeatureBand, string dotnetDir) { string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(sdkFeatureBand, dotnetDir), "default.json"); @@ -183,6 +190,8 @@ protected void InstallWorkloads(ITransactionContext context, IEnumerable m.ManifestUpdate); } + InstallStateContents oldInstallState = GetCurrentInstallState(); + context.Run( action: () => { @@ -214,7 +223,27 @@ protected void InstallWorkloads(ITransactionContext context, IEnumerable { - // Nothing to roll back at this level, InstallWorkloadManifest and InstallWorkloadPacks handle the transaction rollback + // Reset install state + var currentInstallState = GetCurrentInstallState(); + if (currentInstallState.UseWorkloadSets != oldInstallState.UseWorkloadSets) + { + _workloadInstaller.UpdateInstallMode(_sdkFeatureBand, oldInstallState.UseWorkloadSets); + } + + if ((currentInstallState.Manifests == null && oldInstallState.Manifests != null) || + (currentInstallState.Manifests != null && oldInstallState.Manifests == null) || + (currentInstallState.Manifests != null && oldInstallState.Manifests != null && + (currentInstallState.Manifests.Count != oldInstallState.Manifests.Count || + !currentInstallState.Manifests.All(m => oldInstallState.Manifests.TryGetValue(m.Key, out var val) && val.Equals(m.Value))))) + { + _workloadInstaller.SaveInstallStateManifestVersions(_sdkFeatureBand, oldInstallState.Manifests); + } + + if (currentInstallState.WorkloadVersion != oldInstallState.WorkloadVersion) + { + _workloadInstaller.AdjustWorkloadSetInInstallState(_sdkFeatureBand, oldInstallState.WorkloadVersion); + } + // We will refresh the workload manifests to make sure that the resolver has the updated state after the rollback _workloadResolver.RefreshWorkloadManifests(); }); diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs b/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs index 7106e1f8c4ee..4d7673cc4269 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs @@ -509,14 +509,16 @@ public void SaveInstallStateManifestVersions(SdkFeatureBand sdkFeatureBand, Dict File.WriteAllText(path, installStateContents.ToString()); } - public void UpdateInstallMode(SdkFeatureBand sdkFeatureBand, bool newMode) + public void UpdateInstallMode(SdkFeatureBand sdkFeatureBand, bool? newMode) { string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(sdkFeatureBand, _dotnetDir), "default.json"); Directory.CreateDirectory(Path.GetDirectoryName(path)); var installStateContents = InstallStateContents.FromPath(path); installStateContents.UseWorkloadSets = newMode; File.WriteAllText(path, installStateContents.ToString()); - _reporter.WriteLine(string.Format(LocalizableStrings.UpdatedWorkloadMode, newMode ? WorkloadConfigCommandParser.UpdateMode_WorkloadSet : WorkloadConfigCommandParser.UpdateMode_Manifests)); + + var newModeString = newMode == null ? "" : (newMode.Value ? WorkloadConfigCommandParser.UpdateMode_WorkloadSet : WorkloadConfigCommandParser.UpdateMode_Manifests); + _reporter.WriteLine(string.Format(LocalizableStrings.UpdatedWorkloadMode, newModeString)); } /// diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs b/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs index 784cec3319bb..b8d6bad7e427 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs @@ -52,7 +52,7 @@ internal interface IInstaller : IWorkloadManifestInstaller /// The JSON contents describing the install state. void SaveInstallStateManifestVersions(SdkFeatureBand sdkFeatureBand, Dictionary manifestContents); - void UpdateInstallMode(SdkFeatureBand sdkFeatureBand, bool newMode); + void UpdateInstallMode(SdkFeatureBand sdkFeatureBand, bool? newMode); } // Interface to pass to workload manifest updater diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/MsiInstallerBase.cs b/src/Cli/dotnet/commands/dotnet-workload/install/MsiInstallerBase.cs index 8f3b0ca4d4e2..cec0aec9e08b 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/MsiInstallerBase.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/MsiInstallerBase.cs @@ -198,7 +198,7 @@ protected uint RepairMsi(string productCode, string logFile) /// Full path of the log file /// Error code indicating the result of the operation /// - protected void UpdateInstallMode(SdkFeatureBand sdkFeatureBand, bool newMode) + protected void UpdateInstallMode(SdkFeatureBand sdkFeatureBand, bool? newMode) { string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(sdkFeatureBand, DotNetHome), "default.json"); var installStateContents = InstallStateContents.FromPath(path); diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs index 155ddf655b45..a6f7a0c41ead 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs @@ -1083,10 +1083,11 @@ private void OnProcessExit(object sender, EventArgs e) } } - void IInstaller.UpdateInstallMode(SdkFeatureBand sdkFeatureBand, bool newMode) + void IInstaller.UpdateInstallMode(SdkFeatureBand sdkFeatureBand, bool? newMode) { UpdateInstallMode(sdkFeatureBand, newMode); - Reporter.WriteLine(string.Format(LocalizableStrings.UpdatedWorkloadMode, newMode ? WorkloadConfigCommandParser.UpdateMode_WorkloadSet : WorkloadConfigCommandParser.UpdateMode_Manifests)); + string newModeString = newMode == null ? "" : newMode.Value ? WorkloadConfigCommandParser.UpdateMode_WorkloadSet : WorkloadConfigCommandParser.UpdateMode_Manifests; + Reporter.WriteLine(string.Format(LocalizableStrings.UpdatedWorkloadMode, newModeString)); } } } diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerServer.cs b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerServer.cs index b2522e50e2d6..36fa7c397d56 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerServer.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerServer.cs @@ -105,7 +105,7 @@ public void Run() case InstallRequestType.AdjustWorkloadMode: UpdateInstallMode(new SdkFeatureBand(request.SdkFeatureBand), request.UseWorkloadSets); - string newMode = request.UseWorkloadSets ? "workload sets" : "loose manifests"; + string newMode = request.UseWorkloadSets == null ? "" : request.UseWorkloadSets.Value ? "workload sets" : "loose manifests"; Dispatcher.ReplySuccess($"Updated install mode to use {newMode}."); break; diff --git a/src/Tests/dotnet-workload-install.Tests/MockPackWorkloadInstaller.cs b/src/Tests/dotnet-workload-install.Tests/MockPackWorkloadInstaller.cs index 9ecd4d2e0201..732f4b9b50a9 100644 --- a/src/Tests/dotnet-workload-install.Tests/MockPackWorkloadInstaller.cs +++ b/src/Tests/dotnet-workload-install.Tests/MockPackWorkloadInstaller.cs @@ -60,7 +60,7 @@ IEnumerable GetPacksForWorkloads(IEnumerable workloadIds) } } - public void UpdateInstallMode(SdkFeatureBand sdkFeatureBand, bool newMode) + public void UpdateInstallMode(SdkFeatureBand sdkFeatureBand, bool? newMode) { throw new NotImplementedException(); } From b2ed34cdbb828c38862f0de6baa5df4781a68876 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 14 May 2024 11:02:33 -0400 Subject: [PATCH 064/159] Fix workload set version prerelease handling --- .../dotnet-workload/install/WorkloadManifestUpdater.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs index e8dd64d7eda5..a9aa95ebf382 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs @@ -181,6 +181,11 @@ public static string WorkloadSetVersionToWorkloadSetPackageVersion(string setVer sdkFeatureBand = new SdkFeatureBand($"{major}.{minor}.{patch}"); } + if (preReleaseOrBuild != null) + { + packageVersion += '-' + preReleaseOrBuild; + } + return packageVersion; } From 80557a66b17d86e0e7422c71098b22bc861252e2 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 14 May 2024 11:29:02 -0400 Subject: [PATCH 065/159] Move WorkloadSetVersionToWorkloadSetPackageVersion to WorkloadSet class --- .../install/FileBasedInstaller.cs | 2 +- .../install/NetSdkMsiInstallerClient.cs | 2 +- .../install/WorkloadManifestUpdater.cs | 39 +------------------ .../WorkloadSet.cs | 38 ++++++++++++++++++ 4 files changed, 42 insertions(+), 39 deletions(-) diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs b/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs index 4d7673cc4269..3fa5e42aa5b4 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs @@ -89,7 +89,7 @@ IEnumerable GetPacksInWorkloads(IEnumerable workloadIds) public WorkloadSet InstallWorkloadSet(ITransactionContext context, string workloadSetVersion, DirectoryPath? offlineCache = null) { SdkFeatureBand workloadSetFeatureBand; - string workloadSetPackageVersion = WorkloadManifestUpdater.WorkloadSetVersionToWorkloadSetPackageVersion(workloadSetVersion, out workloadSetFeatureBand); + string workloadSetPackageVersion = WorkloadSet.WorkloadSetVersionToWorkloadSetPackageVersion(workloadSetVersion, out workloadSetFeatureBand); var workloadSetPackageId = GetManifestPackageId(new ManifestId("Microsoft.NET.Workloads"), workloadSetFeatureBand); var workloadSetPath = Path.Combine(_dotnetDir, "sdk-manifests", _sdkFeatureBand.ToString(), "workloadsets", workloadSetVersion); diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs index a6f7a0c41ead..b6ba40880cb9 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs @@ -280,7 +280,7 @@ private string ModifyWorkloadSet(string workloadSetVersion, InstallAction reques ReportPendingReboot(); SdkFeatureBand workloadSetFeatureBand; - string msiPackageVersion = WorkloadManifestUpdater.WorkloadSetVersionToWorkloadSetPackageVersion(workloadSetVersion, out workloadSetFeatureBand); + string msiPackageVersion = WorkloadSet.WorkloadSetVersionToWorkloadSetPackageVersion(workloadSetVersion, out workloadSetFeatureBand); string msiPackageId = GetManifestPackageId(new ManifestId("Microsoft.NET.Workloads"), workloadSetFeatureBand).ToString(); Log?.LogMessage($"Resolving Microsoft.NET.Workloads ({workloadSetVersion}) to {msiPackageId} ({msiPackageVersion})."); diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs index a9aa95ebf382..041ad4a63e93 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs @@ -152,43 +152,8 @@ public void DeleteUpdatableWorkloadsFile() } } - public static string WorkloadSetVersionToWorkloadSetPackageVersion(string setVersion, out SdkFeatureBand sdkFeatureBand) - { - string[] sections = setVersion.Split(new char[] { '-', '+' }, 2); - string versionCore = sections[0]; - string preReleaseOrBuild = sections.Length > 1 ? sections[1] : null; - - string[] coreComponents = versionCore.Split('.'); - string major = coreComponents[0]; - string minor = coreComponents[1]; - string patch = coreComponents[2]; - - string packageVersion = $"{major}.{patch}."; - if (coreComponents.Length == 3) - { - // No workload set patch version - packageVersion += "0"; - - // Use preview specifier (if any) from workload set version as part of SDK feature band - sdkFeatureBand = new SdkFeatureBand(setVersion); - } - else - { - // Workload set version has workload patch version (ie 4 components) - packageVersion += coreComponents[3]; - - // Don't include any preview specifiers in SDK feature band - sdkFeatureBand = new SdkFeatureBand($"{major}.{minor}.{patch}"); - } - - if (preReleaseOrBuild != null) - { - packageVersion += '-' + preReleaseOrBuild; - } - - return packageVersion; - } - + // Corresponding method for opposite direction is in WorkloadSet class. This version is kept here as implementation + // depends on NuGetVersion public static string WorkloadSetPackageVersionToWorkloadSetVersion(SdkFeatureBand sdkFeatureBand, string packageVersion) { var nugetVersion = new NuGetVersion(packageVersion); diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadSet.cs b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadSet.cs index 53cf9663cb30..0c69d9d28b31 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadSet.cs +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadSet.cs @@ -136,5 +136,43 @@ public string ToJson() return json; } + // Corresponding method for opposite direction is in WorkloadManifestUpdater, as its implementation depends on NuGetVersion, + // which we'd like to avoid adding as a dependency here. + public static string WorkloadSetVersionToWorkloadSetPackageVersion(string setVersion, out SdkFeatureBand sdkFeatureBand) + { + string[] sections = setVersion.Split(new char[] { '-', '+' }, 2); + string versionCore = sections[0]; + string? preReleaseOrBuild = sections.Length > 1 ? sections[1] : null; + + string[] coreComponents = versionCore.Split('.'); + string major = coreComponents[0]; + string minor = coreComponents[1]; + string patch = coreComponents[2]; + + string packageVersion = $"{major}.{patch}."; + if (coreComponents.Length == 3) + { + // No workload set patch version + packageVersion += "0"; + + // Use preview specifier (if any) from workload set version as part of SDK feature band + sdkFeatureBand = new SdkFeatureBand(setVersion); + } + else + { + // Workload set version has workload patch version (ie 4 components) + packageVersion += coreComponents[3]; + + // Don't include any preview specifiers in SDK feature band + sdkFeatureBand = new SdkFeatureBand($"{major}.{minor}.{patch}"); + } + + if (preReleaseOrBuild != null) + { + packageVersion += '-' + preReleaseOrBuild; + } + + return packageVersion; + } } } From 45d2e5bd1f386e1c0544584c47c0d037ec4a0525 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 14 May 2024 11:43:14 -0400 Subject: [PATCH 066/159] Support loading workload sets from different feature bands --- .../install/WorkloadManifestUpdater.cs | 2 +- .../SdkDirectoryWorkloadManifestProvider.cs | 40 ++++++++++++++++--- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs index 041ad4a63e93..0da7916b1ce4 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs @@ -264,7 +264,7 @@ private IEnumerable CalculateManifestRollbacks(IEnumerabl var (id, (version, band)) = manifest; var (installedVersion, installedBand) = GetInstalledManifestVersion(id); return new ManifestVersionUpdate(id, installedVersion, installedBand.ToString(), version, band.ToString()); - }); + }).ToList(); // Call ToList() so that GetInstalledManifestVersion call isn't delayed until the result is iterated over } public async Task> GetManifestPackageDownloadsAsync(bool includePreviews, SdkFeatureBand providedSdkFeatureBand, SdkFeatureBand installedSdkFeatureBand) diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs index 5a44e0d3c1db..482efcdb9333 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs @@ -124,10 +124,32 @@ public void RefreshWorkloadManifests() _useManifestsFromInstallState = true; var availableWorkloadSets = GetAvailableWorkloadSets(); + bool TryGetWorkloadSet(string workloadSetVersion, out WorkloadSet? workloadSet) + { + if (availableWorkloadSets.TryGetValue(workloadSetVersion, out workloadSet)) + { + return true; + } + + // Check to see if workload set is from a different feature band + WorkloadSet.WorkloadSetVersionToWorkloadSetPackageVersion(workloadSetVersion, out SdkFeatureBand workloadSetFeatureBand); + if (!workloadSetFeatureBand.Equals(_sdkVersionBand)) + { + var featureBandWorkloadSets = GetAvailableWorkloadSets(workloadSetFeatureBand); + if (featureBandWorkloadSets.TryGetValue(workloadSetVersion, out workloadSet)) + { + return true; + } + } + + workloadSet = null; + return false; + } + if (_workloadSetVersionFromConstructor != null) { _useManifestsFromInstallState = false; - if (!availableWorkloadSets.TryGetValue(_workloadSetVersionFromConstructor, out _workloadSet)) + if (!TryGetWorkloadSet(_workloadSetVersionFromConstructor, out _workloadSet)) { throw new FileNotFoundException(string.Format(Strings.WorkloadVersionNotFound, _workloadSetVersionFromConstructor)); } @@ -139,7 +161,7 @@ public void RefreshWorkloadManifests() if (_globalJsonWorkloadSetVersion != null) { _useManifestsFromInstallState = false; - if (!availableWorkloadSets.TryGetValue(_globalJsonWorkloadSetVersion, out _workloadSet)) + if (!TryGetWorkloadSet(_globalJsonWorkloadSetVersion, out _workloadSet)) { _exceptionToThrow = new FileNotFoundException(string.Format(Strings.WorkloadVersionFromGlobalJsonNotFound, _globalJsonWorkloadSetVersion, _globalJsonPathFromConstructor)); return; @@ -155,7 +177,7 @@ public void RefreshWorkloadManifests() var installState = InstallStateContents.FromPath(installStateFilePath); if (!string.IsNullOrEmpty(installState.WorkloadVersion)) { - if (!availableWorkloadSets.TryGetValue(installState.WorkloadVersion!, out _workloadSet)) + if (!TryGetWorkloadSet(installState.WorkloadVersion!, out _workloadSet)) { throw new FileNotFoundException(string.Format(Strings.WorkloadVersionFromInstallStateNotFound, installState.WorkloadVersion, installStateFilePath)); } @@ -469,18 +491,24 @@ void ProbeDirectory(string manifestDirectory, string featureBand) /// public Dictionary GetAvailableWorkloadSets() { + return GetAvailableWorkloadSets(_sdkVersionBand); + } + + public Dictionary GetAvailableWorkloadSets(SdkFeatureBand workloadSetFeatureBand) + { + // How to deal with cross-band workload sets? Dictionary availableWorkloadSets = new Dictionary(); foreach (var manifestRoot in _manifestRoots.Reverse()) { - // Workload sets must match the SDK feature band, we don't support any fallback to a previous band - var workloadSetsRoot = Path.Combine(manifestRoot, _sdkVersionBand.ToString(), WorkloadSetsFolderName); + // We don't automatically fall back to a previous band + var workloadSetsRoot = Path.Combine(manifestRoot, workloadSetFeatureBand.ToString(), WorkloadSetsFolderName); if (Directory.Exists(workloadSetsRoot)) { foreach (var workloadSetDirectory in Directory.GetDirectories(workloadSetsRoot)) { var workloadSetVersion = Path.GetFileName(workloadSetDirectory); - var workloadSet = WorkloadSet.FromWorkloadSetFolder(workloadSetDirectory, workloadSetVersion, _sdkVersionBand); + var workloadSet = WorkloadSet.FromWorkloadSetFolder(workloadSetDirectory, workloadSetVersion, workloadSetFeatureBand); availableWorkloadSets[workloadSet.Version!] = workloadSet; } } From 22452a2f50d348dc3c287aad6282480f24ee3314 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Mon, 20 May 2024 22:14:25 -0400 Subject: [PATCH 067/159] Fix issue where on some machines, VM snapshots couldn't be found --- src/Tests/dotnet-MsiInstallation.Tests/Framework/VMControl.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Tests/dotnet-MsiInstallation.Tests/Framework/VMControl.cs b/src/Tests/dotnet-MsiInstallation.Tests/Framework/VMControl.cs index b619124f24e8..a7dfc17b9438 100644 --- a/src/Tests/dotnet-MsiInstallation.Tests/Framework/VMControl.cs +++ b/src/Tests/dotnet-MsiInstallation.Tests/Framework/VMControl.cs @@ -94,7 +94,8 @@ public CommandResult RunCommandOnVM(string[] args, string workingDirectory = nul private IEnumerable GetSnapshotInstances() { - var snapshots = _session.QueryInstances(virtNamespace, "WQL", $"SELECT * FROM Msvm_VirtualSystemSettingData WHERE VirtualSystemIdentifier='{VMInstance.CimInstanceProperties["Name"].Value}' And IsSaved='True'").ToList(); + // Note: Not querying for IsSaved='True' here, as this value was false for snapshots in at least one case + var snapshots = _session.QueryInstances(virtNamespace, "WQL", $"SELECT * FROM Msvm_VirtualSystemSettingData WHERE VirtualSystemIdentifier='{VMInstance.CimInstanceProperties["Name"].Value}'").ToList(); return snapshots; } From e47104b9aff5afdcfbbcc24cbdd82cbaf8c99cd2 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Mon, 20 May 2024 22:19:11 -0400 Subject: [PATCH 068/159] Fix some tests not to skip manifest updates when installing workloads --- .../Framework/VMTestBase.cs | 10 ++++++++-- .../MsiInstallerTests.cs | 18 +++++++++--------- .../WorkloadSetTests.cs | 13 ++++++++++--- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/src/Tests/dotnet-MsiInstallation.Tests/Framework/VMTestBase.cs b/src/Tests/dotnet-MsiInstallation.Tests/Framework/VMTestBase.cs index 87b4b13a8577..91f49bce6520 100644 --- a/src/Tests/dotnet-MsiInstallation.Tests/Framework/VMTestBase.cs +++ b/src/Tests/dotnet-MsiInstallation.Tests/Framework/VMTestBase.cs @@ -157,9 +157,15 @@ protected string GetInstalledSdkVersion() return result.StdOut; } - protected CommandResult InstallWorkload(string workloadName) + protected CommandResult InstallWorkload(string workloadName, bool skipManifestUpdate) { - var result = VM.CreateRunCommand("dotnet", "workload", "install", workloadName, "--skip-manifest-update") + string [] args = { "dotnet", "workload", "install", workloadName}; + if (skipManifestUpdate) + { + args = [.. args, "--skip-manifest-update"]; + } + + var result = VM.CreateRunCommand(args) .WithDescription($"Install {workloadName} workload") .Execute(); diff --git a/src/Tests/dotnet-MsiInstallation.Tests/MsiInstallerTests.cs b/src/Tests/dotnet-MsiInstallation.Tests/MsiInstallerTests.cs index a8de1c6e30c6..c557ba6ed856 100644 --- a/src/Tests/dotnet-MsiInstallation.Tests/MsiInstallerTests.cs +++ b/src/Tests/dotnet-MsiInstallation.Tests/MsiInstallerTests.cs @@ -75,7 +75,7 @@ public void InstallWasm() ApplyRC1Manifests(); - InstallWorkload("wasm-tools"); + InstallWorkload("wasm-tools", skipManifestUpdate: true); } [Fact] @@ -85,7 +85,7 @@ public void InstallAndroid() ApplyRC1Manifests(); - InstallWorkload("android"); + InstallWorkload("android", skipManifestUpdate: true); } [Fact] @@ -95,9 +95,9 @@ public void InstallAndroidAndWasm() ApplyRC1Manifests(); - InstallWorkload("android"); + InstallWorkload("android", skipManifestUpdate: true); - InstallWorkload("wasm-tools"); + InstallWorkload("wasm-tools", skipManifestUpdate: true); } [Fact] @@ -151,7 +151,7 @@ public void WorkloadInstallationAndGarbageCollection() var originalManifests = GetRollback(); - InstallWorkload("wasm-tools"); + InstallWorkload("wasm-tools", skipManifestUpdate: true); ListWorkloads().Should().Contain("wasm-tools"); @@ -182,7 +182,7 @@ public void WorkloadInstallationAndGarbageCollection() public void InstallStateShouldBeRemovedOnSdkUninstall() { InstallSdk(); - InstallWorkload("wasm-tools"); + InstallWorkload("wasm-tools", skipManifestUpdate: true); ApplyRC1Manifests(); var featureBand = new SdkFeatureBand(SdkInstallerVersion); var installStatePath = $@"c:\ProgramData\dotnet\workloads\x64\{featureBand}\InstallState\default.json"; @@ -195,7 +195,7 @@ public void InstallStateShouldBeRemovedOnSdkUninstall() public void UpdateWithRollback() { InstallSdk(); - InstallWorkload("wasm-tools"); + InstallWorkload("wasm-tools", skipManifestUpdate: true); ApplyRC1Manifests(); TestWasmWorkload(); @@ -227,7 +227,7 @@ public void InstallShouldNotUpdatePinnedRollback() ApplyRC1Manifests(); var workloadVersion = GetWorkloadVersion(); - InstallWorkload("aspire"); + InstallWorkload("aspire", skipManifestUpdate: false); GetWorkloadVersion().Should().Be(workloadVersion); } @@ -270,7 +270,7 @@ public void TestAspire() //VM.CreateRunCommand("powershell", "-Command", "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) }") // .Execute().Should().Pass(); - InstallWorkload("aspire"); + InstallWorkload("aspire", skipManifestUpdate: true); VM.CreateRunCommand("dotnet", "new", "aspire-starter", "-o", "Aspire-StarterApp01") .WithWorkingDirectory(@"c:\SdkTesting") diff --git a/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs b/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs index 930ac79e4054..4d8da2cfbe40 100644 --- a/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs +++ b/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs @@ -137,9 +137,16 @@ public void UpdateToSpecificWorkloadSetVersion(string versionToInstall) GetWorkloadVersion().Should().Be(versionToInstall); // Installing a workload shouldn't update workload version - InstallWorkload("aspire"); + InstallWorkload("aspire", skipManifestUpdate: false); GetWorkloadVersion().Should().Be(versionToInstall); + + VM.CreateRunCommand("dotnet", "workload", "update") + .Execute() + .Should() + .Pass(); + + GetWorkloadVersion().Should().Be("8.0.300-preview.0.24217.2"); } [Fact] @@ -155,8 +162,8 @@ public void UpdateToUnavailableWorkloadSetVersion() .Execute() .Should() .Fail() - .And - .HaveStdErrContaining(unavailableWorkloadSetVersion); + .And.HaveStdErrContaining(unavailableWorkloadSetVersion) + .And.NotHaveStdOutContaining("Installation rollback failed"); VM.CreateRunCommand("dotnet", "workload", "search") .WithIsReadOnly(true) From e2b177f9e533ade5740b0de2b6d463bd8258a3b3 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 21 May 2024 09:40:44 -0400 Subject: [PATCH 069/159] Don't try to roll back installation of workload set package that wasn't found --- .../install/NetSdkMsiInstallerClient.cs | 69 +++++++++++-------- 1 file changed, 40 insertions(+), 29 deletions(-) diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs index b6ba40880cb9..56f1f106dffa 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs @@ -258,27 +258,49 @@ public void GarbageCollect(Func getResolverForWorkloa } } - // advertisingPackagePath is the path to the workload set MSI nupkg in the advertising package. public WorkloadSet InstallWorkloadSet(ITransactionContext context, string workloadSetVersion, DirectoryPath? offlineCache) { - var workloadSetPath = string.Empty; + ReportPendingReboot(); + + var (msi, msiPackageId, installationFolder) = GetWorkloadSetPayload(workloadSetVersion, offlineCache); + context.Run( action: () => { - workloadSetPath = ModifyWorkloadSet(workloadSetVersion, InstallAction.Install, offlineCache); + Elevate(); + + DetectState state = DetectPackage(msi.ProductCode, out Version installedVersion); + InstallAction plannedAction = PlanPackage(msi, state, InstallAction.Install, installedVersion); + + if (plannedAction == InstallAction.Install) + { + ExecutePackage(msi, plannedAction, msiPackageId); + + // Update the reference count against the MSI. + UpdateDependent(InstallRequestType.AddDependent, msi.Manifest.ProviderKeyName, _dependent); + } }, rollback: () => { - ModifyWorkloadSet(workloadSetVersion, InstallAction.Uninstall, offlineCache); + DetectState state = DetectPackage(msi.ProductCode, out Version installedVersion); + InstallAction plannedAction = PlanPackage(msi, state, InstallAction.Uninstall, installedVersion); + + if (plannedAction == InstallAction.Uninstall) + { + Elevate(); + + // Update the reference count against the MSI. + UpdateDependent(InstallRequestType.RemoveDependent, msi.Manifest.ProviderKeyName, _dependent); + + ExecutePackage(msi, plannedAction, msiPackageId); + } }); - return WorkloadSet.FromWorkloadSetFolder(workloadSetPath, workloadSetVersion, _sdkFeatureBand); + return WorkloadSet.FromWorkloadSetFolder(installationFolder, workloadSetVersion, _sdkFeatureBand); } - private string ModifyWorkloadSet(string workloadSetVersion, InstallAction requestedAction, DirectoryPath? offlineCache) + (MsiPayload msi, string msiPackageId, string installationFolder) GetWorkloadSetPayload(string workloadSetVersion, DirectoryPath? offlineCache) { - ReportPendingReboot(); - SdkFeatureBand workloadSetFeatureBand; string msiPackageVersion = WorkloadSet.WorkloadSetVersionToWorkloadSetPackageVersion(workloadSetVersion, out workloadSetFeatureBand); string msiPackageId = GetManifestPackageId(new ManifestId("Microsoft.NET.Workloads"), workloadSetFeatureBand).ToString(); @@ -286,32 +308,21 @@ private string ModifyWorkloadSet(string workloadSetVersion, InstallAction reques Log?.LogMessage($"Resolving Microsoft.NET.Workloads ({workloadSetVersion}) to {msiPackageId} ({msiPackageVersion})."); // Retrieve the payload from the MSI package cache. - MsiPayload msi = GetCachedMsiPayload(msiPackageId, msiPackageVersion, offlineCache); - VerifyPackage(msi); - DetectState state = DetectPackage(msi.ProductCode, out Version installedVersion); - - InstallAction plannedAction = PlanPackage(msi, state, requestedAction, installedVersion); - - if (plannedAction == InstallAction.Uninstall) + MsiPayload msi; + try { - Elevate(); - - // Update the reference count against the MSI. - UpdateDependent(InstallRequestType.RemoveDependent, msi.Manifest.ProviderKeyName, _dependent); - - ExecutePackage(msi, plannedAction, msiPackageId); + msi = GetCachedMsiPayload(msiPackageId, msiPackageVersion, offlineCache); } - else if (plannedAction != InstallAction.None) + // Unwrap AggregateException caused by switch from async to sync + catch (Exception ex) when (ex is NuGetPackageNotFoundException || ex.InnerException is NuGetPackageNotFoundException) { - Elevate(); - - ExecutePackage(msi, plannedAction, msiPackageId); - - // Update the reference count against the MSI. - UpdateDependent(InstallRequestType.AddDependent, msi.Manifest.ProviderKeyName, _dependent); + throw new GracefulException(string.Format(Update.LocalizableStrings.WorkloadVersionRequestedNotFound, workloadSetVersion), ex); } + VerifyPackage(msi); + + string installationFolder = Path.Combine(DotNetHome, "sdk-manifests", workloadSetFeatureBand.ToString(), "workloadsets", workloadSetVersion); - return Path.Combine(DotNetHome, "sdk-manifests", workloadSetFeatureBand.ToString(), "workloadsets", workloadSetVersion); + return (msi, msiPackageId, installationFolder); } /// From d316d967227a26ae4879eb46d8728a8dd644cf2e Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 21 May 2024 09:44:20 -0400 Subject: [PATCH 070/159] Don't update pinned workload set on install, refactor InstallingWorkloadCommand --- .../commands/InstallingWorkloadCommand.cs | 19 +++++++++---------- .../install/WorkloadInstallCommand.cs | 16 ++++++++-------- .../update/WorkloadUpdateCommand.cs | 3 ++- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs index 213d8904b4f4..bd92e0ffa621 100644 --- a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs +++ b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs @@ -102,8 +102,6 @@ public InstallingWorkloadCommand( var globaljsonPath = SdkDirectoryWorkloadManifestProvider.GetGlobalJsonPath(Environment.CurrentDirectory); _workloadSetVersionFromGlobalJson = SdkDirectoryWorkloadManifestProvider.GlobalJsonReader.GetWorkloadVersionFromGlobalJson(globaljsonPath); - //bool specifiedWorkloadSetVersionInGlobalJson = !string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson); - if (SpecifiedWorkloadSetVersionInGlobalJson && (SpecifiedWorkloadSetVersionOnCommandLine || UseRollback)) { throw new GracefulException(string.Format(Strings.CannotSpecifyVersionOnCommandLineAndInGlobalJson, globaljsonPath), isUserError: true); @@ -116,7 +114,7 @@ public InstallingWorkloadCommand( InstallingWorkloadCommandParser.WorkloadSetVersionOption.Name), isUserError: true); } - // At this point, at most one of specifiedWorkloadSetVersionOnCommandLine, useRollback, and specifiedWorkloadSetVersionInGlobalJson is true + // At this point, at most one of SpecifiedWorkloadSetVersionOnCommandLine, UseRollback, and SpecifiedWorkloadSetVersionInGlobalJson is true } @@ -127,19 +125,22 @@ protected static Dictionary GetInstallStateContents(IEnumerable< InstallStateContents GetCurrentInstallState() { - string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkFeatureBand, _dotnetPath), "default.json"); + return GetCurrentInstallState(_sdkFeatureBand, _dotnetPath); + } + + static InstallStateContents GetCurrentInstallState(SdkFeatureBand sdkFeatureBand, string dotnetDir) + { + string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(sdkFeatureBand, dotnetDir), "default.json"); var installStateContents = File.Exists(path) ? InstallStateContents.FromString(File.ReadAllText(path)) : new InstallStateContents(); return installStateContents; } public static bool ShouldUseWorkloadSetMode(SdkFeatureBand sdkFeatureBand, string dotnetDir) { - string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(sdkFeatureBand, dotnetDir), "default.json"); - var installStateContents = File.Exists(path) ? InstallStateContents.FromString(File.ReadAllText(path)) : new InstallStateContents(); - return installStateContents.UseWorkloadSets ?? false; + return GetCurrentInstallState(sdkFeatureBand, dotnetDir).UseWorkloadSets ?? false; } - protected void InstallWorkloads(ITransactionContext context, IEnumerable workloadsToUpdateOrInstall, bool shouldUpdateManifests, DirectoryPath? offlineCache) + protected void UpdateWorkloadManifests(ITransactionContext context, DirectoryPath? offlineCache) { var updateUsingWorkloadSets = ShouldUseWorkloadSetMode(_sdkFeatureBand, _dotnetPath); if (UseRollback && updateUsingWorkloadSets) @@ -218,8 +219,6 @@ protected void InstallWorkloads(ITransactionContext context, IEnumerable { diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs index 382bbc2d2ad4..4e443b25c923 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs @@ -155,7 +155,10 @@ public override int Execute() if (!_skipManifestUpdate) { var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkFeatureBand, _dotnetPath), "default.json"); - if (string.IsNullOrWhiteSpace(_fromRollbackDefinition) && File.Exists(installStateFilePath) && InstallStateContents.FromString(File.ReadAllText(installStateFilePath)).Manifests is not null) + if (string.IsNullOrWhiteSpace(_fromRollbackDefinition) && + File.Exists(installStateFilePath) && + InstallStateContents.FromString(File.ReadAllText(installStateFilePath)) is InstallStateContents installState && + (installState.Manifests != null || installState.WorkloadVersion != null)) { // If there is a rollback state file, then we don't want to automatically update workloads when a workload is installed // To update to a new version, the user would need to run "dotnet workload update" @@ -168,19 +171,16 @@ public override int Execute() RunInNewTransaction(context => { - if (_skipManifestUpdate) - { - _workloadInstaller.InstallWorkloads(workloadIds, _sdkFeatureBand, context, offlineCache); - } - else - { + if (!_skipManifestUpdate) + { if (Verbosity != VerbosityOptions.quiet && Verbosity != VerbosityOptions.q) { // TODO: Change this message to account for workload set wording Reporter.WriteLine(LocalizableStrings.CheckForUpdatedWorkloadManifests); } - InstallWorkloads(context, workloadIds, shouldUpdateManifests: true, offlineCache); + UpdateWorkloadManifests(context, offlineCache); } + _workloadInstaller.InstallWorkloads(workloadIds, _sdkFeatureBand, context, offlineCache); // Write workload installation records var recordRepo = _workloadInstaller.GetWorkloadInstallationRecordRepository(); diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs index bd7fc4f447f0..f340dcc83136 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs @@ -100,7 +100,8 @@ public override int Execute() RunInNewTransaction(context => { - InstallWorkloads(context, workloadIds, shouldUpdateManifests: true, offlineCache); + UpdateWorkloadManifests(context, offlineCache); + _workloadInstaller.InstallWorkloads(workloadIds, _sdkFeatureBand, context, offlineCache); }); WorkloadInstallCommand.TryRunGarbageCollection(_workloadInstaller, Reporter, Verbosity, workloadSetVersion => _workloadResolverFactory.CreateForWorkloadSet(_dotnetPath, _sdkVersion.ToString(), _userProfileDir, workloadSetVersion), offlineCache); From 768ec444b4ca3a6be30d6c5a04b9060ea7a61d5f Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 28 May 2024 18:37:29 -0400 Subject: [PATCH 071/159] Fix some cases of pinning / unpinning workload version in global install state --- .../commands/InstallingWorkloadCommand.cs | 12 ++++---- .../WorkloadSetTests.cs | 29 +++++++++++++++++-- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs index bd92e0ffa621..4cf100207339 100644 --- a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs +++ b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs @@ -165,7 +165,7 @@ protected void UpdateWorkloadManifests(ITransactionContext context, DirectoryPat } string resolvedWorkloadSetVersion = _workloadSetVersionFromGlobalJson ??_workloadSetVersionFromCommandLine; - if (string.IsNullOrWhiteSpace(resolvedWorkloadSetVersion) && !UseRollback /* TODO && !specifiedWorkloadManifestsInInstallState */) + if (string.IsNullOrWhiteSpace(resolvedWorkloadSetVersion) && !UseRollback) { _workloadManifestUpdater.UpdateAdvertisingManifestsAsync(_includePreviews, updateUsingWorkloadSets, offlineCache).Wait(); if (updateUsingWorkloadSets) @@ -207,15 +207,17 @@ protected void UpdateWorkloadManifests(ITransactionContext context, DirectoryPat { _workloadInstaller.SaveInstallStateManifestVersions(_sdkFeatureBand, GetInstallStateContents(manifestsToUpdate)); } + else if (SpecifiedWorkloadSetVersionOnCommandLine) + { + _workloadInstaller.AdjustWorkloadSetInInstallState(_sdkFeatureBand, resolvedWorkloadSetVersion); + } else if (this is WorkloadUpdateCommand) { - // For workload updates, if you don't specify a rollback file, then we should update to a new version of the manifests or workload set, and + // For workload updates, if you don't specify a rollback file, or a workload version then we should update to a new version of the manifests or workload set, and // should remove the install state that pins to the other version - // TODO: Do we need to do something similar if the workload set version is pinned in the install state? _workloadInstaller.RemoveManifestsFromInstallState(_sdkFeatureBand); + _workloadInstaller.AdjustWorkloadSetInInstallState(_sdkFeatureBand, null); } - - _workloadInstaller.AdjustWorkloadSetInInstallState(_sdkFeatureBand, resolvedWorkloadSetVersion); } _workloadResolver.RefreshWorkloadManifests(); diff --git a/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs b/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs index 4d8da2cfbe40..64c8f03676ec 100644 --- a/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs +++ b/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs @@ -81,9 +81,7 @@ public void UpdateWithWorkloadSets() AddNuGetSource(@"c:\SdkTesting\WorkloadSets"); VM.CreateRunCommand("dotnet", "workload", "update") - .Execute() - .Should() - .Pass(); + .Execute().Should().Pass(); var newRollback = GetRollback(); @@ -265,6 +263,31 @@ string GetWorkloadVersion(string workingDirectory = null) return result.StdOut; } + public void UpdateShouldNotPinWorkloadSet() + { + InstallSdk(); + UpdateAndSwitchToWorkloadSetMode(out _, out _); + + AddNuGetSource(@"c:\SdkTesting\WorkloadSets"); + + // Rename latest workload set so it won't be installed + VM.CreateRunCommand("cmd", "/c", "ren", @$"c:\SdkTesting\WorkloadSets\Microsoft.NET.Workloads.8.0.300-preview.*.24217.2.nupkg", $"Microsoft.NET.Workloads.8.0.300-preview.*.24217.2.bak") + .Execute().Should().Pass(); + + VM.CreateRunCommand("dotnet", "workload", "update") + .Execute().Should().Pass(); + + GetWorkloadVersion().Should().Be("8.0.300-preview.0.24178.1"); + + // Bring latest workload set version back, so installing workload should update to it + VM.CreateRunCommand("cmd", "/c", "ren", @$"c:\SdkTesting\WorkloadSets\Microsoft.NET.Workloads.8.0.300-preview.*.24217.2.bak", $"Microsoft.NET.Workloads.8.0.300-preview.*.24217.2.nupkg") + .Execute().Should().Pass(); + + InstallWorkload("aspire", skipManifestUpdate: false); + + GetWorkloadVersion().Should().Be("8.0.300-preview.0.24217.2"); + } + [Fact] public void WorkloadSetInstallationRecordIsWrittenCorrectly() { From 42019de71bf9aa5d96812de572c887beca781e47 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 28 May 2024 18:44:14 -0400 Subject: [PATCH 072/159] Add message for workload set installation failure --- .../commands/dotnet-workload/install/FileBasedInstaller.cs | 6 ++---- .../dotnet-workload/install/LocalizableStrings.resx | 5 ++++- .../dotnet-workload/install/xlf/LocalizableStrings.cs.xlf | 5 +++++ .../dotnet-workload/install/xlf/LocalizableStrings.de.xlf | 5 +++++ .../dotnet-workload/install/xlf/LocalizableStrings.es.xlf | 5 +++++ .../dotnet-workload/install/xlf/LocalizableStrings.fr.xlf | 5 +++++ .../dotnet-workload/install/xlf/LocalizableStrings.it.xlf | 5 +++++ .../dotnet-workload/install/xlf/LocalizableStrings.ja.xlf | 5 +++++ .../dotnet-workload/install/xlf/LocalizableStrings.ko.xlf | 5 +++++ .../dotnet-workload/install/xlf/LocalizableStrings.pl.xlf | 5 +++++ .../install/xlf/LocalizableStrings.pt-BR.xlf | 5 +++++ .../dotnet-workload/install/xlf/LocalizableStrings.ru.xlf | 5 +++++ .../dotnet-workload/install/xlf/LocalizableStrings.tr.xlf | 5 +++++ .../install/xlf/LocalizableStrings.zh-Hans.xlf | 5 +++++ .../install/xlf/LocalizableStrings.zh-Hant.xlf | 5 +++++ 15 files changed, 71 insertions(+), 5 deletions(-) diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs b/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs index 3fa5e42aa5b4..0874fce1bc16 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs @@ -107,11 +107,9 @@ public WorkloadSet InstallWorkloadSet(ITransactionContext context, string worklo RemoveWorkloadSetInstallationRecord(workloadSetVersion, workloadSetFeatureBand, _sdkFeatureBand); }); } - catch (Exception) + catch (Exception ex) { - // TODO: Add workload set specific message - throw; - //throw new Exception(string.Format(LocalizableStrings.FailedToInstallWorkloadManifest, manifestUpdate.ManifestId, manifestUpdate.NewVersion, e.Message), e); + throw new Exception(string.Format(LocalizableStrings.FailedToInstallWorkloadSet, workloadSetVersion, ex.Message), ex); } return WorkloadSet.FromWorkloadSetFolder(workloadSetPath, workloadSetVersion, _sdkFeatureBand); diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx index a0d9a26d1129..faa1427a1a09 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx +++ b/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx @@ -355,4 +355,7 @@ Successfully updated workload install mode to use {0}. - + + Failed to install workload set version {0}: {1} + + \ No newline at end of file diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf index 7340264b19d8..fecc8733de60 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf @@ -82,6 +82,11 @@ Nepodařilo se nainstalovat manifest {0} verze {1}: {2}. + + Failed to install workload set version {0}: {1} + Failed to install workload set version {0}: {1} + + DIRECTORY ADRESÁŘ diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf index 69347ea91ace..cc20a340230e 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf @@ -82,6 +82,11 @@ Fehler beim Installieren des Manifests "{0}", Version {1}: {2}. + + Failed to install workload set version {0}: {1} + Failed to install workload set version {0}: {1} + + DIRECTORY VERZEICHNIS diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf index 044a776d23c3..ed2fa6c54c26 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf @@ -82,6 +82,11 @@ No se pudo instalar el manifiesto {0}, versión {1}: {2}. + + Failed to install workload set version {0}: {1} + Failed to install workload set version {0}: {1} + + DIRECTORY DIRECTORIO diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf index 487850c153ea..fc3dff7e086e 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf @@ -82,6 +82,11 @@ Impossible d'installer la {0} version de manifeste {1}: {2} + + Failed to install workload set version {0}: {1} + Failed to install workload set version {0}: {1} + + DIRECTORY RÉPERTOIRE diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf index 98347b10c943..8d28693d19ae 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf @@ -82,6 +82,11 @@ Non è stato possibile installare il manifesto {0}, versione {1}: {2}. + + Failed to install workload set version {0}: {1} + Failed to install workload set version {0}: {1} + + DIRECTORY DIRECTORY diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf index d53564fc72e0..3fd7011ba4ae 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf @@ -82,6 +82,11 @@ マニフェスト {0} のバージョン {1} をインストールできませんでした: {2}。 + + Failed to install workload set version {0}: {1} + Failed to install workload set version {0}: {1} + + DIRECTORY ディレクトリ diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf index 32603d599221..30f121566912 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf @@ -82,6 +82,11 @@ 매니페스트 {0} 버전 {1}: {2}을 설치하지 못했습니다. + + Failed to install workload set version {0}: {1} + Failed to install workload set version {0}: {1} + + DIRECTORY 디렉터리 diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf index 739bb0ad5089..985bb4b94fcb 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf @@ -82,6 +82,11 @@ Instalowanie manifestu {0} w wersji {1} nie powiodło się: {2}. + + Failed to install workload set version {0}: {1} + Failed to install workload set version {0}: {1} + + DIRECTORY KATALOG diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf index 7174a379ecbf..3db04ff3c8d6 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf @@ -82,6 +82,11 @@ Falha ao instalar o manifesto {0} versão {1}: {2}. + + Failed to install workload set version {0}: {1} + Failed to install workload set version {0}: {1} + + DIRECTORY DIRETÓRIO diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf index a03ffba5378e..504921005c57 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf @@ -82,6 +82,11 @@ Не удалось установить манифест {0} версии {1}: {2}. + + Failed to install workload set version {0}: {1} + Failed to install workload set version {0}: {1} + + DIRECTORY КАТАЛОГ diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf index 47a1c30dbf18..132d221f7996 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf @@ -82,6 +82,11 @@ {0} bildirimi sürüm {1} yüklenemedi:{2}. + + Failed to install workload set version {0}: {1} + Failed to install workload set version {0}: {1} + + DIRECTORY DİZİN diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf index be821166b151..c1abc0801d10 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf @@ -82,6 +82,11 @@ 未能安装清单 {0} 版本 {1}: {2}。 + + Failed to install workload set version {0}: {1} + Failed to install workload set version {0}: {1} + + DIRECTORY 目录 diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf index dcade7263146..0733687a1c0b 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf @@ -82,6 +82,11 @@ 無法安裝資訊清單 {0} 版本 {1}: {2}。 + + Failed to install workload set version {0}: {1} + Failed to install workload set version {0}: {1} + + DIRECTORY 目錄 From 1d87f961102a7faaac52494527e51bc7541dc02b Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 28 May 2024 18:52:55 -0400 Subject: [PATCH 073/159] Remove unused isRollback parameter --- src/Cli/dotnet/commands/InstallingWorkloadCommand.cs | 2 +- .../dotnet-workload/install/FileBasedInstaller.cs | 2 +- .../commands/dotnet-workload/install/IInstaller.cs | 3 +-- .../install/NetSdkMsiInstallerClient.cs | 10 +++++----- .../MockPackWorkloadInstaller.cs | 2 +- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs index 4cf100207339..e180289f65f2 100644 --- a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs +++ b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs @@ -198,7 +198,7 @@ protected void UpdateWorkloadManifests(ITransactionContext context, DirectoryPat { foreach (var manifestUpdate in manifestsToUpdate) { - _workloadInstaller.InstallWorkloadManifest(manifestUpdate, context, offlineCache, UseRollback); + _workloadInstaller.InstallWorkloadManifest(manifestUpdate, context, offlineCache); } if (!SpecifiedWorkloadSetVersionInGlobalJson) diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs b/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs index 0874fce1bc16..caeb77562da4 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs @@ -231,7 +231,7 @@ string GetManifestInstallDirForFeatureBand(string sdkFeatureBand) return manifestInstallDir; } - public void InstallWorkloadManifest(ManifestVersionUpdate manifestUpdate, ITransactionContext transactionContext, DirectoryPath? offlineCache = null, bool isRollback = false) + public void InstallWorkloadManifest(ManifestVersionUpdate manifestUpdate, ITransactionContext transactionContext, DirectoryPath? offlineCache = null) { var newManifestPath = Path.Combine(GetManifestInstallDirForFeatureBand(manifestUpdate.NewFeatureBand), manifestUpdate.ManifestId.ToString(), manifestUpdate.NewVersion.ToString()); diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs b/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs index b8d6bad7e427..d6d13a21d0fb 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/IInstaller.cs @@ -21,8 +21,7 @@ internal interface IInstaller : IWorkloadManifestInstaller WorkloadSet InstallWorkloadSet(ITransactionContext context, string workloadSetVersion, DirectoryPath? offlineCache = null); - // TODO: isRollback parameter seems unused / unnecessary - void InstallWorkloadManifest(ManifestVersionUpdate manifestUpdate, ITransactionContext transactionContext, DirectoryPath? offlineCache = null, bool isRollback = false); + void InstallWorkloadManifest(ManifestVersionUpdate manifestUpdate, ITransactionContext transactionContext, DirectoryPath? offlineCache = null); IWorkloadInstallationRecordRepository GetWorkloadInstallationRecordRepository(); diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs index 56f1f106dffa..af516106529f 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs @@ -464,18 +464,18 @@ private void DeleteAllWorkloadInstallationRecords() public IWorkloadInstallationRecordRepository GetWorkloadInstallationRecordRepository() => RecordRepository; - public void InstallWorkloadManifest(ManifestVersionUpdate manifestUpdate, ITransactionContext transactionContext, DirectoryPath? offlineCache = null, bool isRollback = false) + public void InstallWorkloadManifest(ManifestVersionUpdate manifestUpdate, ITransactionContext transactionContext, DirectoryPath? offlineCache = null) { try { transactionContext.Run( action: () => { - InstallWorkloadManifestImplementation(manifestUpdate, offlineCache, isRollback); + InstallWorkloadManifestImplementation(manifestUpdate, offlineCache); }, rollback: () => { - InstallWorkloadManifestImplementation(manifestUpdate, offlineCache: null, isRollback: true, action: InstallAction.Uninstall); + InstallWorkloadManifestImplementation(manifestUpdate, offlineCache: null, action: InstallAction.Uninstall); }); } catch (Exception e) @@ -485,14 +485,14 @@ public void InstallWorkloadManifest(ManifestVersionUpdate manifestUpdate, ITrans } } - void InstallWorkloadManifestImplementation(ManifestVersionUpdate manifestUpdate, DirectoryPath? offlineCache = null, bool isRollback = false, InstallAction action = InstallAction.Install) + void InstallWorkloadManifestImplementation(ManifestVersionUpdate manifestUpdate, DirectoryPath? offlineCache = null, InstallAction action = InstallAction.Install) { ReportPendingReboot(); // Rolling back a manifest update after a successful install is essentially a downgrade, which is blocked so we have to // treat it as a special case and is different from the install failing and rolling that back, though depending where the install // failed, it may have removed the old product already. - Log?.LogMessage($"Installing manifest: Id: {manifestUpdate.ManifestId}, version: {manifestUpdate.NewVersion}, feature band: {manifestUpdate.NewFeatureBand}, rollback: {isRollback}."); + Log?.LogMessage($"Installing manifest: Id: {manifestUpdate.ManifestId}, version: {manifestUpdate.NewVersion}, feature band: {manifestUpdate.NewFeatureBand}."); // Resolve the package ID for the manifest payload package string msiPackageId = GetManifestPackageId(manifestUpdate.ManifestId, new SdkFeatureBand(manifestUpdate.NewFeatureBand)).ToString(); diff --git a/src/Tests/dotnet-workload-install.Tests/MockPackWorkloadInstaller.cs b/src/Tests/dotnet-workload-install.Tests/MockPackWorkloadInstaller.cs index 732f4b9b50a9..ebd336c20e54 100644 --- a/src/Tests/dotnet-workload-install.Tests/MockPackWorkloadInstaller.cs +++ b/src/Tests/dotnet-workload-install.Tests/MockPackWorkloadInstaller.cs @@ -130,7 +130,7 @@ public IWorkloadInstallationRecordRepository GetWorkloadInstallationRecordReposi return InstallationRecordRepository; } - public void InstallWorkloadManifest(ManifestVersionUpdate manifestUpdate, ITransactionContext transactionContext, DirectoryPath? offlineCache = null, bool isRollback = false) + public void InstallWorkloadManifest(ManifestVersionUpdate manifestUpdate, ITransactionContext transactionContext, DirectoryPath? offlineCache = null) { InstalledManifests.Add((manifestUpdate, offlineCache)); } From 515544cb4687a94f15dedd5bb45404d6b123784f Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Thu, 30 May 2024 07:46:15 -0400 Subject: [PATCH 074/159] Resolve TODOs in WorkloadInstallCommand --- .../dotnet-workload/install/LocalizableStrings.resx | 2 +- .../install/WorkloadInstallCommand.cs | 12 +++--------- .../install/xlf/LocalizableStrings.cs.xlf | 4 ++-- .../install/xlf/LocalizableStrings.de.xlf | 4 ++-- .../install/xlf/LocalizableStrings.es.xlf | 4 ++-- .../install/xlf/LocalizableStrings.fr.xlf | 4 ++-- .../install/xlf/LocalizableStrings.it.xlf | 4 ++-- .../install/xlf/LocalizableStrings.ja.xlf | 4 ++-- .../install/xlf/LocalizableStrings.ko.xlf | 4 ++-- .../install/xlf/LocalizableStrings.pl.xlf | 4 ++-- .../install/xlf/LocalizableStrings.pt-BR.xlf | 4 ++-- .../install/xlf/LocalizableStrings.ru.xlf | 4 ++-- .../install/xlf/LocalizableStrings.tr.xlf | 4 ++-- .../install/xlf/LocalizableStrings.zh-Hans.xlf | 4 ++-- .../install/xlf/LocalizableStrings.zh-Hant.xlf | 4 ++-- 15 files changed, 30 insertions(+), 36 deletions(-) diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx index faa1427a1a09..e7cef8934482 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx +++ b/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx @@ -329,7 +329,7 @@ Skip signature verification of workload packages and installers. - Checking for updated workload manifests. + Checking for updated workload version. Error parsing version '{1}' for workload manifest ID '{0}' diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs index 4e443b25c923..80827fcf3d16 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs @@ -156,26 +156,21 @@ public override int Execute() { var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkFeatureBand, _dotnetPath), "default.json"); if (string.IsNullOrWhiteSpace(_fromRollbackDefinition) && - File.Exists(installStateFilePath) && - InstallStateContents.FromString(File.ReadAllText(installStateFilePath)) is InstallStateContents installState && + InstallStateContents.FromPath(installStateFilePath) is InstallStateContents installState && (installState.Manifests != null || installState.WorkloadVersion != null)) { - // If there is a rollback state file, then we don't want to automatically update workloads when a workload is installed + // If the workload version is pinned in the install state, then we don't want to automatically update workloads when a workload is installed // To update to a new version, the user would need to run "dotnet workload update" - // TODO: We should also skip the update if a workload set version is pinned in install state or in global.json _skipManifestUpdate = true; } } - // TODO: Should we still install a workload specified in global.json even if we are skipping updates? - RunInNewTransaction(context => { if (!_skipManifestUpdate) { if (Verbosity != VerbosityOptions.quiet && Verbosity != VerbosityOptions.q) { - // TODO: Change this message to account for workload set wording Reporter.WriteLine(LocalizableStrings.CheckForUpdatedWorkloadManifests); } UpdateWorkloadManifests(context, offlineCache); @@ -203,9 +198,8 @@ public override int Execute() TryRunGarbageCollection(_workloadInstaller, Reporter, Verbosity, workloadSetVersion => _workloadResolverFactory.CreateForWorkloadSet(_dotnetPath, _sdkVersion.ToString(), _userProfileDir, workloadSetVersion), offlineCache); - // TODO: Update this to only print the newly installed workload IDs? Reporter.WriteLine(); - Reporter.WriteLine(string.Format(LocalizableStrings.InstallationSucceeded, string.Join(" ", workloadIds))); + Reporter.WriteLine(string.Format(LocalizableStrings.InstallationSucceeded, string.Join(" ", newWorkloadInstallRecords))); Reporter.WriteLine(); }); diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf index fecc8733de60..4d678d44c2b8 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf @@ -28,8 +28,8 @@ - Checking for updated workload manifests. - Kontrolují se aktualizované manifesty úloh. + Checking for updated workload version. + Kontrolují se aktualizované manifesty úloh. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf index cc20a340230e..d059d6b733cc 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf @@ -28,8 +28,8 @@ - Checking for updated workload manifests. - Es wird nach aktualisierten Workloadmanifesten gesucht. + Checking for updated workload version. + Es wird nach aktualisierten Workloadmanifesten gesucht. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf index ed2fa6c54c26..2db6571c0a10 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf @@ -28,8 +28,8 @@ - Checking for updated workload manifests. - Comprobando si hay manifiestos de carga de trabajo actualizados. + Checking for updated workload version. + Comprobando si hay manifiestos de carga de trabajo actualizados. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf index fc3dff7e086e..3f0fd4d95927 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf @@ -28,8 +28,8 @@ - Checking for updated workload manifests. - Recherche de manifestes de charge de travail mis à jour + Checking for updated workload version. + Recherche de manifestes de charge de travail mis à jour diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf index 8d28693d19ae..54f460a7eaf3 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf @@ -28,8 +28,8 @@ - Checking for updated workload manifests. - Verifica della disponibilità di manifesti del carico di lavoro aggiornati. + Checking for updated workload version. + Verifica della disponibilità di manifesti del carico di lavoro aggiornati. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf index 3fd7011ba4ae..9396528e4228 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf @@ -28,8 +28,8 @@ - Checking for updated workload manifests. - 更新されたワークロード マニフェストを確認しています。 + Checking for updated workload version. + 更新されたワークロード マニフェストを確認しています。 diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf index 30f121566912..e089726dd02c 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf @@ -28,8 +28,8 @@ - Checking for updated workload manifests. - 업데이트된 워크로드 매니페스트를 확인하는 중입니다. + Checking for updated workload version. + 업데이트된 워크로드 매니페스트를 확인하는 중입니다. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf index 985bb4b94fcb..25d718b4f5f9 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf @@ -28,8 +28,8 @@ - Checking for updated workload manifests. - Sprawdzanie zaktualizowanych manifestów obciążenia. + Checking for updated workload version. + Sprawdzanie zaktualizowanych manifestów obciążenia. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf index 3db04ff3c8d6..4ae7ba35c26a 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf @@ -28,8 +28,8 @@ - Checking for updated workload manifests. - Verificando manifestos de carga de trabalho atualizados. + Checking for updated workload version. + Verificando manifestos de carga de trabalho atualizados. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf index 504921005c57..7972ff7ff134 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf @@ -28,8 +28,8 @@ - Checking for updated workload manifests. - Проверка обновленных манифестов рабочей нагрузки. + Checking for updated workload version. + Проверка обновленных манифестов рабочей нагрузки. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf index 132d221f7996..ad27e72db6ed 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf @@ -28,8 +28,8 @@ - Checking for updated workload manifests. - Güncelleştirilmiş iş yükü bildirimleri denetleniyor. + Checking for updated workload version. + Güncelleştirilmiş iş yükü bildirimleri denetleniyor. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf index c1abc0801d10..70f61e00b1a1 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf @@ -28,8 +28,8 @@ - Checking for updated workload manifests. - 正在检查更新的工作负载清单。 + Checking for updated workload version. + 正在检查更新的工作负载清单。 diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf index 0733687a1c0b..23c91739e5b0 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf @@ -28,8 +28,8 @@ - Checking for updated workload manifests. - 正在檢查更新的工作負載資訊清單。 + Checking for updated workload version. + 正在檢查更新的工作負載資訊清單。 From 4bb9d50e3329f0f170d17614eba0411cf542e016 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Thu, 13 Jun 2024 08:36:26 -0400 Subject: [PATCH 075/159] Refactor ManifestVersionUpdate --- .../install/LocalizableStrings.resx | 5 +- .../install/WorkloadManifestUpdater.cs | 15 +-- .../install/xlf/LocalizableStrings.cs.xlf | 5 - .../install/xlf/LocalizableStrings.de.xlf | 5 - .../install/xlf/LocalizableStrings.es.xlf | 5 - .../install/xlf/LocalizableStrings.fr.xlf | 5 - .../install/xlf/LocalizableStrings.it.xlf | 5 - .../install/xlf/LocalizableStrings.ja.xlf | 5 - .../install/xlf/LocalizableStrings.ko.xlf | 5 - .../install/xlf/LocalizableStrings.pl.xlf | 5 - .../install/xlf/LocalizableStrings.pt-BR.xlf | 5 - .../install/xlf/LocalizableStrings.ru.xlf | 5 - .../install/xlf/LocalizableStrings.tr.xlf | 5 - .../xlf/LocalizableStrings.zh-Hans.xlf | 5 - .../xlf/LocalizableStrings.zh-Hant.xlf | 5 - .../list/WorkloadListCommand.cs | 4 +- .../IWorkloadResolver.cs | 1 + .../ManifestVersionUpdate.cs | 29 +---- .../Strings.resx | 4 + .../WorkloadResolver.cs | 16 ++- .../xlf/Strings.cs.xlf | 5 + .../xlf/Strings.de.xlf | 5 + .../xlf/Strings.es.xlf | 5 + .../xlf/Strings.fr.xlf | 5 + .../xlf/Strings.it.xlf | 5 + .../xlf/Strings.ja.xlf | 5 + .../xlf/Strings.ko.xlf | 5 + .../xlf/Strings.pl.xlf | 5 + .../xlf/Strings.pt-BR.xlf | 5 + .../xlf/Strings.ru.xlf | 5 + .../xlf/Strings.tr.xlf | 5 + .../xlf/Strings.zh-Hans.xlf | 5 + .../xlf/Strings.zh-Hant.xlf | 5 + .../GivenDotnetWorkloadInstall.cs | 6 +- .../GivenFileBasedWorkloadInstall.cs | 2 +- .../GivenWorkloadManifestUpdater.cs | 24 ++-- .../TestManifestUpdate.cs | 104 ++++++++++++++++++ ...nWorkloadInstallerAndWorkloadsInstalled.cs | 6 - .../MockWorkloadResolver.cs | 1 + .../GivenDotnetWorkloadUpdate.cs | 15 +-- 40 files changed, 221 insertions(+), 141 deletions(-) create mode 100644 src/Tests/dotnet-workload-install.Tests/TestManifestUpdate.cs diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx index e7cef8934482..500e51ef5d43 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx +++ b/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx @@ -237,9 +237,6 @@ Advertising manifest not updated. Manifest package for {0} doesn't exist. - - No manifest with ID {0} exists. - Failed to install manifest {0} version {1}: {2}. @@ -358,4 +355,4 @@ Failed to install workload set version {0}: {1} - \ No newline at end of file + diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs index 0da7916b1ce4..c97c01b0f2c7 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs @@ -212,7 +212,7 @@ public IEnumerable CalculateManifestUpdates() if ((adVersion.CompareTo(installedVersion) > 0 && adBand.Equals(installedBand)) || adBand.CompareTo(installedBand) > 0) { - var update = new ManifestVersionUpdate(manifestId, installedVersion, installedBand.ToString(), adVersion, adBand.ToString()); + var update = new ManifestVersionUpdate(manifestId, adVersion, adBand.ToString()); yield return new(update, adWorkloads); } } @@ -262,9 +262,8 @@ private IEnumerable CalculateManifestRollbacks(IEnumerabl return versionUpdates.Select(manifest => { var (id, (version, band)) = manifest; - var (installedVersion, installedBand) = GetInstalledManifestVersion(id); - return new ManifestVersionUpdate(id, installedVersion, installedBand.ToString(), version, band.ToString()); - }).ToList(); // Call ToList() so that GetInstalledManifestVersion call isn't delayed until the result is iterated over + return new ManifestVersionUpdate(id, version, band.ToString()); + }); } public async Task> GetManifestPackageDownloadsAsync(bool includePreviews, SdkFeatureBand providedSdkFeatureBand, SdkFeatureBand installedSdkFeatureBand) @@ -439,12 +438,7 @@ private async Task UpdateAdvertisingManifestAsync(WorkloadManifestInfo manifest, private ManifestVersionWithBand GetInstalledManifestVersion(ManifestId manifestId) { - var manifest = _workloadResolver.GetInstalledManifests().FirstOrDefault(manifest => manifest.Id.ToLowerInvariant().Equals(manifestId.ToString())); - if (manifest == null) - { - throw new Exception(string.Format(LocalizableStrings.ManifestDoesNotExist, manifestId.ToString())); - } - return new(new ManifestVersion(manifest.Version), new SdkFeatureBand(manifest.ManifestFeatureBand)); + return new(new ManifestVersion(_workloadResolver.GetManifestVersion(manifestId.ToString())), new SdkFeatureBand(_workloadResolver.GetManifestFeatureBand(manifestId.ToString()))); } private bool AdManifestSentinelIsDueForUpdate() @@ -470,6 +464,7 @@ private bool AdManifestSentinelIsDueForUpdate() private async Task UpdatedAdManifestPackagesExistAsync() { var manifests = GetInstalledManifestIds(); + // TODO: This doesn't seem to account for differing feature bands var availableUpdates = await Task.WhenAll(manifests.Select(manifest => NewerManifestPackageExists(manifest))).ConfigureAwait(false); return availableUpdates.Any(); } diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf index 4d678d44c2b8..e2c56ec45854 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf @@ -162,11 +162,6 @@ Cílová architektura, pro kterou se má úloha nainstalovat - - No manifest with ID {0} exists. - Neexistuje žádný manifest s ID {0}. - - Manifest MSI not found in NuGet package {0} Instalační služba MSI manifestu se nenašla v balíčku NuGet {0}. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf index d059d6b733cc..1e9e0de29a3a 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf @@ -162,11 +162,6 @@ Das Zielframework, für das die Workload installiert wird. - - No manifest with ID {0} exists. - Es ist kein Manifest mit der ID {0} vorhanden. - - Manifest MSI not found in NuGet package {0} Manifest-MSI wurde im NuGet-Paket {0} nicht gefunden. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf index 2db6571c0a10..7760a645dc6c 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf @@ -162,11 +162,6 @@ La plataforma de destino para la que se instala la carga de trabajo. - - No manifest with ID {0} exists. - No existe ningún manifiesto con id. {0}. - - Manifest MSI not found in NuGet package {0} No se encontró el MSI del manifiesto en el paquete NuGet {0} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf index 3f0fd4d95927..a312d7c22200 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf @@ -162,11 +162,6 @@ Framework cible pour lequel la charge de travail doit être installée. - - No manifest with ID {0} exists. - Aucun manifeste ayant l’ID {0} existe. - - Manifest MSI not found in NuGet package {0} MSI de manifeste introuvable dans le package NuGet {0} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf index 54f460a7eaf3..62339cd0d32e 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf @@ -162,11 +162,6 @@ Framework di destinazione per cui installare il carico di lavoro. - - No manifest with ID {0} exists. - Non esiste alcun manifesto con ID {0}. - - Manifest MSI not found in NuGet package {0} L'identità del servizio gestita del manifesto non è stata trovata nel pacchetto NuGet {0} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf index 9396528e4228..84945a253538 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf @@ -162,11 +162,6 @@ ワークロードをインストールするターゲット フレームワーク。 - - No manifest with ID {0} exists. - ID を持つ {0} マニフェストが存在しません。 - - Manifest MSI not found in NuGet package {0} NuGet パッケージ {0} にマニフェスト MSI が見つかりません diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf index e089726dd02c..7d8c27506450 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf @@ -162,11 +162,6 @@ 워크로드를 설치할 대상 프레임워크입니다. - - No manifest with ID {0} exists. - ID가 {0}인 매니페스트가 없습니다. - - Manifest MSI not found in NuGet package {0} NuGet 패키지 {0}에서 매니페스트 MSI를 찾을 수 없습니다. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf index 25d718b4f5f9..f018cfde3825 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf @@ -162,11 +162,6 @@ Docelowa platforma, dla której ma zostać zainstalowane obciążenie. - - No manifest with ID {0} exists. - Nie istnieje żaden manifest o identyfikatorze {0}. - - Manifest MSI not found in NuGet package {0} Nie znaleziono pliku MSI manifestu w pakiecie NuGet {0} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf index 4ae7ba35c26a..8aadcd19cc54 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf @@ -162,11 +162,6 @@ A estrutura de destino para a qual a carga de trabalho será instalada. - - No manifest with ID {0} exists. - Não existe nenhum manifesto com ID {0}. - - Manifest MSI not found in NuGet package {0} MSI do manifesto não encontrado no pacote NuGet {0} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf index 7972ff7ff134..9f568f050ddf 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf @@ -162,11 +162,6 @@ Целевая платформа для установки рабочей нагрузки. - - No manifest with ID {0} exists. - Манифест с идентификатором {0} не существует. - - Manifest MSI not found in NuGet package {0} MSI манифеста не найден в пакете NuGet {0} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf index ad27e72db6ed..c6f3d08750ab 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf @@ -162,11 +162,6 @@ İş yükünün yükleneceği hedef çerçeve. - - No manifest with ID {0} exists. - {0} kimliğine sahip bildirim yok. - - Manifest MSI not found in NuGet package {0} {0} NuGet paketinde bildirim MSI'sı bulunamadı diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf index 70f61e00b1a1..91c33969cd8f 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf @@ -162,11 +162,6 @@ 要为其安装工作负载的目标框架。 - - No manifest with ID {0} exists. - 不存在 ID 为 {0} 的清单。 - - Manifest MSI not found in NuGet package {0} 在 NuGet 包 {0} 中找不到清单 MSI diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf index 23c91739e5b0..cb17ece5b2e7 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf @@ -162,11 +162,6 @@ 要為工作負載安裝的目標 Framework。 - - No manifest with ID {0} exists. - 沒有識別碼為 {0} 的資訊清單。 - - Manifest MSI not found in NuGet package {0} 在 NuGet 套件 {0} 中找不到資訊清單 MSI diff --git a/src/Cli/dotnet/commands/dotnet-workload/list/WorkloadListCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/list/WorkloadListCommand.cs index c927df84e4b4..252b33972bc8 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/list/WorkloadListCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/list/WorkloadListCommand.cs @@ -150,7 +150,9 @@ internal IEnumerable GetUpdateAvailable(IEnumerable GetAvailableWorkloads(); bool IsPlatformIncompatibleWorkload(WorkloadId workloadId); string GetManifestVersion(string manifestId); + string GetManifestFeatureBand(string manifestId); IEnumerable GetInstalledManifests(); string GetSdkFeatureBand(); string? GetWorkloadVersion(); diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/ManifestVersionUpdate.cs b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/ManifestVersionUpdate.cs index 7c9d1883ee5d..07119281d9a4 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/ManifestVersionUpdate.cs +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/ManifestVersionUpdate.cs @@ -6,43 +6,22 @@ namespace Microsoft.NET.Sdk.WorkloadManifestReader // TODO: Do we need this class, or the existing version information anymore now that workload manifest are side by side? public class ManifestVersionUpdate : IEquatable, IComparable { - public ManifestVersionUpdate(ManifestId manifestId, ManifestVersion? existingVersion, string? existingFeatureBand, ManifestVersion? newVersion, string? newFeatureBand) + public ManifestVersionUpdate(ManifestId manifestId, ManifestVersion? newVersion, string? newFeatureBand) { ManifestId = manifestId; - ExistingVersion = existingVersion; - ExistingFeatureBand = existingFeatureBand; NewVersion = newVersion; NewFeatureBand = newFeatureBand; } public ManifestId ManifestId { get; } - public ManifestVersion? ExistingVersion { get; } - public string? ExistingFeatureBand { get; } public ManifestVersion? NewVersion { get; } public string? NewFeatureBand { get; } - // Returns an object representing an undo of this manifest update - public ManifestVersionUpdate Reverse() - { - return new ManifestVersionUpdate(ManifestId, NewVersion, NewFeatureBand, ExistingVersion, ExistingFeatureBand); - } - public int CompareTo(ManifestVersionUpdate? other) { if (other == null) return 1; int ret = ManifestId.CompareTo(other.ManifestId); if (ret != 0) return ret; - - if (ExistingVersion == null && other.ExistingVersion != null) return -1; - if (ExistingVersion != null && other.ExistingVersion == null) return 1; - if (ExistingVersion != null) - { - ret = ExistingVersion.CompareTo(other.ExistingVersion); - if (ret != 0) return ret; - } - - ret = string.Compare(ExistingFeatureBand, other.ExistingFeatureBand, StringComparison.Ordinal); - if (ret != 0) return ret; if (NewVersion == null && other.NewVersion != null) return -1; if (NewVersion != null && other.NewVersion == null) return 1; @@ -59,8 +38,6 @@ public bool Equals(ManifestVersionUpdate? other) { if (other == null) return false; return EqualityComparer.Default.Equals(ManifestId, other.ManifestId) && - EqualityComparer.Default.Equals(ExistingVersion, other.ExistingVersion) && - string.Equals(ExistingFeatureBand, other.ExistingFeatureBand, StringComparison.Ordinal) && EqualityComparer.Default.Equals(NewVersion, other.NewVersion) && string.Equals(NewFeatureBand, other.NewFeatureBand, StringComparison.Ordinal); } @@ -73,12 +50,10 @@ public override bool Equals(object? obj) public override int GetHashCode() { #if NETCOREAPP3_1_OR_GREATER - return HashCode.Combine(ManifestId, ExistingVersion, ExistingFeatureBand, NewVersion, NewFeatureBand); + return HashCode.Combine(ManifestId, NewVersion, NewFeatureBand); #else int hashCode = 1601069575; hashCode = hashCode * -1521134295 + ManifestId.GetHashCode(); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(ExistingVersion); - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(ExistingFeatureBand); hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(NewVersion); hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(NewFeatureBand); return hashCode; diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/Strings.resx b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/Strings.resx index 2de51f6d77b2..cf418daa75cb 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/Strings.resx +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/Strings.resx @@ -210,4 +210,8 @@ Error parsing version '{1}' for workload manifest ID '{0}' + + No manifest with ID {0} exists. + + diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadResolver.cs b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadResolver.cs index 90a3137c9ded..6e02b99bc86a 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadResolver.cs +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadResolver.cs @@ -749,9 +749,21 @@ public string GetManifestVersion(string manifestId) InitializeManifests(); if (_manifests.TryGetValue(manifestId, out var value)) { - return value.manifest.Version; + return value.info.Version; } - throw new Exception($"Manifest with id {manifestId} does not exist."); + + throw new Exception(string.Format(Strings.ManifestDoesNotExist, manifestId)); + } + + public string GetManifestFeatureBand(string manifestId) + { + InitializeManifests(); + if (_manifests.TryGetValue(manifestId, out var value)) + { + return value.info.ManifestFeatureBand; + } + + throw new Exception(string.Format(Strings.ManifestDoesNotExist, manifestId)); } public IEnumerable GetInstalledManifests() diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.cs.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.cs.xlf index 19a075d8d93c..4407d1e29043 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.cs.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.cs.xlf @@ -77,6 +77,11 @@ Závislost manifestu úlohy {0} verze {1} je nižší než verze {2} požadovaná manifestem {3} [{4}]. + + No manifest with ID {0} exists. + No manifest with ID {0} exists. + + Workload manifest {0}, which was specified in {1}, was not found. Running "dotnet workload repair" may resolve this. Manifest úlohy {0}, který byl určen v {1}, nebyl nalezen. Tento problém může vyřešit spuštění „dotnet workload repair“. diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.de.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.de.xlf index 90025005a6fb..4ef614824da0 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.de.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.de.xlf @@ -77,6 +77,11 @@ Die Workloadmanifestabhängigkeit „{0}“, Version „{1}“, ist niedriger als die Version „{2}“, die vom Manifest „{3}“ [{4}] benötigt wird. + + No manifest with ID {0} exists. + No manifest with ID {0} exists. + + Workload manifest {0}, which was specified in {1}, was not found. Running "dotnet workload repair" may resolve this. Das Arbeitsauslastungsmanifest {0}, das in {1} angegeben wurde, wurde nicht gefunden. Die Ausführung von "dotnet workload repair" kann dies beheben. diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.es.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.es.xlf index 458cb48dabf2..965f78c7a674 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.es.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.es.xlf @@ -77,6 +77,11 @@ La dependencia del manifiesto de carga de trabajo '{0}' versión '{1}' es inferior a la versión '{2}' requerida por el manifiesto '{3}' [{4}] + + No manifest with ID {0} exists. + No manifest with ID {0} exists. + + Workload manifest {0}, which was specified in {1}, was not found. Running "dotnet workload repair" may resolve this. No se ha encontrado el manifiesto de carga de trabajo {0}, que se especificó en {1}. La ejecución de "dotnet workload repair" puede resolverlo. diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.fr.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.fr.xlf index a5c39b99ca26..86ea8311cbd8 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.fr.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.fr.xlf @@ -77,6 +77,11 @@ La version {0}' de la dépendance du manifeste de charge de travail est inférieure à la version '{1}' requise par {2}le manifeste '{3}' [{4}]. + + No manifest with ID {0} exists. + No manifest with ID {0} exists. + + Workload manifest {0}, which was specified in {1}, was not found. Running "dotnet workload repair" may resolve this. Le manifeste de charge de travail {0}, spécifié dans {1}, est introuvable. L’exécution "dotnet workload repair" pourrait résoudre ce problème. diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.it.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.it.xlf index daca70889d58..7bab4f663335 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.it.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.it.xlf @@ -77,6 +77,11 @@ La dipendenza del manifesto del carico di lavoro '{0}' versione '{1}' è inferiore alla versione '{2}' richiesta dal manifesto '{3}' [{4}] + + No manifest with ID {0} exists. + No manifest with ID {0} exists. + + Workload manifest {0}, which was specified in {1}, was not found. Running "dotnet workload repair" may resolve this. Il manifesto del carico di lavoro {0}, specificato in {1}, non è stato trovato. L'esecuzione della "dotnet workload repair" può risolvere questo errore. diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ja.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ja.xlf index f8f51cb5cd20..7a8e0cf5bd18 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ja.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ja.xlf @@ -77,6 +77,11 @@ ワークロード マニフェストの依存関係 '{0}' のバージョン '{1}' は、マニフェスト '{3}' [{4}] で必要とされるバージョン '{2}' 以前のものです + + No manifest with ID {0} exists. + No manifest with ID {0} exists. + + Workload manifest {0}, which was specified in {1}, was not found. Running "dotnet workload repair" may resolve this. {1} で指定されたワークロード マニフェスト {0} が見つかりませんでした。"dotnet workload repair" を実行すると、これを解決できる場合があります。 diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ko.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ko.xlf index 2ad7384a142a..ece3a585d49f 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ko.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ko.xlf @@ -77,6 +77,11 @@ 워크로드 매니페스트 종속성 '{0}' 버전 '{1}'이(가) '{3}' [{4}]에 필요한 버전 '{2}'보다 낮습니다 + + No manifest with ID {0} exists. + No manifest with ID {0} exists. + + Workload manifest {0}, which was specified in {1}, was not found. Running "dotnet workload repair" may resolve this. {1}에 지정된 워크로드 매니페스트 {0}을(를) 찾을 수 없습니다. "dotnet workload repair"를 실행하면 이 문제를 해결할 수 있습니다. diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.pl.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.pl.xlf index 66b2aa84d20c..4d426d6393bb 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.pl.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.pl.xlf @@ -77,6 +77,11 @@ Zależność manifestu obciążenia „{0}” w wersji „{1}” jest niższa niż w wersji "{2}" wymaganej przez manifest „{3}”[{4}] + + No manifest with ID {0} exists. + No manifest with ID {0} exists. + + Workload manifest {0}, which was specified in {1}, was not found. Running "dotnet workload repair" may resolve this. Nie znaleziono manifestu obciążenia {0}, który został określony w: {1}. Uruchomienie polecenia "dotnet workload repair" może rozwiązać ten problem. diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.pt-BR.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.pt-BR.xlf index f7b78be143fa..006a94cd72fa 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.pt-BR.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.pt-BR.xlf @@ -77,6 +77,11 @@ A dependência do manifesto de carga de trabalho '{0}' versão '{1}' é inferior à versão '{2}' exigida pelo manifesto '{3}' [{4}] + + No manifest with ID {0} exists. + No manifest with ID {0} exists. + + Workload manifest {0}, which was specified in {1}, was not found. Running "dotnet workload repair" may resolve this. O manifesto {0} de carga de trabalho, que foi especificado em {1}, não foi encontrado. Executar "dotnet workload repair" pode resolver isso. diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ru.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ru.xlf index 432d9b719fda..c99667294093 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ru.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ru.xlf @@ -77,6 +77,11 @@ Зависимость манифеста рабочей нагрузки "{0}" версии "{1}" ниже версии "{2}", необходимой для манифеста "{3}" [{4}] + + No manifest with ID {0} exists. + No manifest with ID {0} exists. + + Workload manifest {0}, which was specified in {1}, was not found. Running "dotnet workload repair" may resolve this. Не найден манифест рабочей нагрузки {0}, указанный в {1}. Выполнение команды "dotnet workload repair" может устранить эту проблему. diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.tr.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.tr.xlf index 71645cb83845..c8522d74ad06 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.tr.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.tr.xlf @@ -77,6 +77,11 @@ '{0}' iş yükü bildirimi bağımlılığının '{1}' sürümü, '{3}' [{4}] bildirimi için gereken '{2}' sürümünden düşük + + No manifest with ID {0} exists. + No manifest with ID {0} exists. + + Workload manifest {0}, which was specified in {1}, was not found. Running "dotnet workload repair" may resolve this. {1} içinde belirtilen iş yükü bildirimi {0} bulunamadı. Çalışan "dotnet workload repair" bu sorunu çözebilir. diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.zh-Hans.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.zh-Hans.xlf index ee0c5fc194b6..0aefce1fe3ef 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.zh-Hans.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.zh-Hans.xlf @@ -77,6 +77,11 @@ 工作负荷清单依赖项“{0}”版本“{1}”低于清单“{2}”所需的版本“{3}”[{4}] + + No manifest with ID {0} exists. + No manifest with ID {0} exists. + + Workload manifest {0}, which was specified in {1}, was not found. Running "dotnet workload repair" may resolve this. 找不到 {1} 中指定的工作负载清单 {0}。运行 "dotnet workload repair" 可能会解决此问题。 diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.zh-Hant.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.zh-Hant.xlf index abbd8fbbb106..e34619e9f3f4 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.zh-Hant.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.zh-Hant.xlf @@ -77,6 +77,11 @@ 工作負載資訊清單相依性 '{0}' 版本 ' {1} ' 低於資訊清單 '{3}' [{4}] 所需的版本 '{2}' + + No manifest with ID {0} exists. + No manifest with ID {0} exists. + + Workload manifest {0}, which was specified in {1}, was not found. Running "dotnet workload repair" may resolve this. 找不到 {1} 中指定的工作負載資訊清單 {0}。執行 "dotnet workload repair" 可能會解決這個問題。 diff --git a/src/Tests/dotnet-workload-install.Tests/GivenDotnetWorkloadInstall.cs b/src/Tests/dotnet-workload-install.Tests/GivenDotnetWorkloadInstall.cs index cb9537d497af..d55283bab9ec 100644 --- a/src/Tests/dotnet-workload-install.Tests/GivenDotnetWorkloadInstall.cs +++ b/src/Tests/dotnet-workload-install.Tests/GivenDotnetWorkloadInstall.cs @@ -212,7 +212,7 @@ public void GivenWorkloadInstallItCanUpdateInstalledManifests(bool userLocal, st var manifestsToUpdate = new ManifestUpdateWithWorkloads[] { - new(new ManifestVersionUpdate(new ManifestId("mock-manifest"), new ManifestVersion("1.0.0"), featureBand.ToString(), new ManifestVersion("2.0.0"), featureBand.ToString()), null), + new(new ManifestVersionUpdate(new ManifestId("mock-manifest"), new ManifestVersion("2.0.0"), featureBand.ToString()), null), }; (_, var installManager, var installer, _, _, _) = GetTestInstallers(parseResult, userLocal, sdkVersion, manifestUpdates: manifestsToUpdate, installedFeatureBand: sdkVersion); @@ -237,7 +237,7 @@ public void GivenWorkloadInstallFromCacheItInstallsCachedManifest(bool userLocal var manifestsToUpdate = new ManifestUpdateWithWorkloads[] { - new(new ManifestVersionUpdate(new ManifestId("mock-manifest"), new ManifestVersion("1.0.0"), featureBand.ToString(), new ManifestVersion("2.0.0"), featureBand.ToString()), null) + new(new ManifestVersionUpdate(new ManifestId("mock-manifest"), new ManifestVersion("2.0.0"), featureBand.ToString()), null) }; var cachePath = Path.Combine(_testAssetsManager.CreateTestDirectory(identifier: AppendForUserLocal("mockCache_", userLocal) + sdkVersion).Path, "mockCachePath"); @@ -598,7 +598,7 @@ public void ShowManifestUpdatesWhenVerbosityIsDetailedOrDiagnostic(string verbos var manifestsToUpdate = new ManifestUpdateWithWorkloads[] { - new(new ManifestVersionUpdate(new ManifestId("mock-manifest"), new ManifestVersion("1.0.0"), sdkFeatureBand, new ManifestVersion("2.0.0"), sdkFeatureBand), null), + new(new ManifestVersionUpdate(new ManifestId("mock-manifest"), new ManifestVersion("2.0.0"), sdkFeatureBand), null), }; (_, var installManager, _, _, _, _) = GetTestInstallers(parseResult, true, sdkFeatureBand, manifestUpdates: manifestsToUpdate); diff --git a/src/Tests/dotnet-workload-install.Tests/GivenFileBasedWorkloadInstall.cs b/src/Tests/dotnet-workload-install.Tests/GivenFileBasedWorkloadInstall.cs index 92bb9ba7233d..b0f867ebf0ca 100644 --- a/src/Tests/dotnet-workload-install.Tests/GivenFileBasedWorkloadInstall.cs +++ b/src/Tests/dotnet-workload-install.Tests/GivenFileBasedWorkloadInstall.cs @@ -324,7 +324,7 @@ public void GivenManagedInstallItCanInstallManifestVersion() var manifestId = new ManifestId("test-manifest-1"); var manifestVersion = new ManifestVersion("5.0.0"); - var manifestUpdate = new ManifestVersionUpdate(manifestId, null, null, manifestVersion, featureBand.ToString()); + var manifestUpdate = new ManifestVersionUpdate(manifestId, manifestVersion, featureBand.ToString()); CliTransaction.RunNew(context => installer.InstallWorkloadManifest(manifestUpdate, context)); diff --git a/src/Tests/dotnet-workload-install.Tests/GivenWorkloadManifestUpdater.cs b/src/Tests/dotnet-workload-install.Tests/GivenWorkloadManifestUpdater.cs index 1a12d4ccb8b9..820eae77b113 100644 --- a/src/Tests/dotnet-workload-install.Tests/GivenWorkloadManifestUpdater.cs +++ b/src/Tests/dotnet-workload-install.Tests/GivenWorkloadManifestUpdater.cs @@ -91,9 +91,9 @@ public void GivenWorkloadManifestUpdateItCanCalculateUpdates() var testDir = _testAssetsManager.CreateTestDirectory().Path; var featureBand = "6.0.100"; var dotnetRoot = Path.Combine(testDir, "dotnet"); - var expectedManifestUpdates = new ManifestVersionUpdate[] { - new ManifestVersionUpdate(new ManifestId("test-manifest-1"), new ManifestVersion("5.0.0"), featureBand, new ManifestVersion("7.0.0"), featureBand), - new ManifestVersionUpdate(new ManifestId("test-manifest-2"), new ManifestVersion("3.0.0"), featureBand, new ManifestVersion("4.0.0"), featureBand) }; + var expectedManifestUpdates = new TestManifestUpdate[] { + new TestManifestUpdate(new ManifestId("test-manifest-1"), new ManifestVersion("5.0.0"), featureBand, new ManifestVersion("7.0.0"), featureBand), + new TestManifestUpdate(new ManifestId("test-manifest-2"), new ManifestVersion("3.0.0"), featureBand, new ManifestVersion("4.0.0"), featureBand) }; var expectedManifestNotUpdated = new ManifestId[] { new ManifestId("test-manifest-3"), new ManifestId("test-manifest-4") }; // Write mock manifests @@ -101,7 +101,7 @@ public void GivenWorkloadManifestUpdateItCanCalculateUpdates() var adManifestDir = Path.Combine(testDir, ".dotnet", "sdk-advertising", featureBand); Directory.CreateDirectory(installedManifestDir); Directory.CreateDirectory(adManifestDir); - foreach (ManifestVersionUpdate manifestUpdate in expectedManifestUpdates) + foreach (var manifestUpdate in expectedManifestUpdates) { Directory.CreateDirectory(Path.Combine(installedManifestDir, manifestUpdate.ManifestId.ToString())); File.WriteAllText(Path.Combine(installedManifestDir, manifestUpdate.ManifestId.ToString(), _manifestFileName), GetManifestContent(manifestUpdate.ExistingVersion)); @@ -137,16 +137,16 @@ public void GivenAdvertisedManifestsItCalculatesCorrectUpdates() var testDir = _testAssetsManager.CreateTestDirectory().Path; var currentFeatureBand = "6.0.300"; var dotnetRoot = Path.Combine(testDir, "dotnet"); - var expectedManifestUpdates = new ManifestVersionUpdate[] { - new ManifestVersionUpdate(new ManifestId("test-manifest-1"), new ManifestVersion("5.0.0"), "6.0.100", new ManifestVersion("7.0.0"), "6.0.100"), - new ManifestVersionUpdate(new ManifestId("test-manifest-2"), new ManifestVersion("3.0.0"), "6.0.100", new ManifestVersion("4.0.0"), "6.0.300"), - new ManifestVersionUpdate(new ManifestId("test-manifest-3"), new ManifestVersion("3.0.0"), "6.0.300", new ManifestVersion("4.0.0"), "6.0.300")}; + var expectedManifestUpdates = new TestManifestUpdate[] { + new TestManifestUpdate(new ManifestId("test-manifest-1"), new ManifestVersion("5.0.0"), "6.0.100", new ManifestVersion("7.0.0"), "6.0.100"), + new TestManifestUpdate(new ManifestId("test-manifest-2"), new ManifestVersion("3.0.0"), "6.0.100", new ManifestVersion("4.0.0"), "6.0.300"), + new TestManifestUpdate(new ManifestId("test-manifest-3"), new ManifestVersion("3.0.0"), "6.0.300", new ManifestVersion("4.0.0"), "6.0.300")}; var expectedManifestNotUpdated = new ManifestId[] { new ManifestId("test-manifest-4") }; // Write mock manifests var adManifestDir = Path.Combine(testDir, ".dotnet", "sdk-advertising", currentFeatureBand); Directory.CreateDirectory(adManifestDir); - foreach (ManifestVersionUpdate manifestUpdate in expectedManifestUpdates) + foreach (var manifestUpdate in expectedManifestUpdates) { var installedManifestDir = Path.Combine(testDir, "dotnet", "sdk-manifests", manifestUpdate.ExistingFeatureBand); if (!Directory.Exists(installedManifestDir)) @@ -414,9 +414,9 @@ public void GivenWorkloadManifestRollbackItCanCalculateUpdates() var testDir = _testAssetsManager.CreateTestDirectory().Path; var currentFeatureBand = "6.0.100"; var dotnetRoot = Path.Combine(testDir, "dotnet"); - var expectedManifestUpdates = new ManifestVersionUpdate[] { - new ManifestVersionUpdate(new ManifestId("test-manifest-1"), new ManifestVersion("5.0.0"), currentFeatureBand, new ManifestVersion("4.0.0"), currentFeatureBand), - new ManifestVersionUpdate(new ManifestId("test-manifest-2"), new ManifestVersion("3.0.0"), currentFeatureBand, new ManifestVersion("2.0.0"), currentFeatureBand) }; + var expectedManifestUpdates = new TestManifestUpdate[] { + new TestManifestUpdate(new ManifestId("test-manifest-1"), new ManifestVersion("5.0.0"), currentFeatureBand, new ManifestVersion("4.0.0"), currentFeatureBand), + new TestManifestUpdate(new ManifestId("test-manifest-2"), new ManifestVersion("3.0.0"), currentFeatureBand, new ManifestVersion("2.0.0"), currentFeatureBand) }; // Write mock manifests var installedManifestDir = Path.Combine(testDir, "dotnet", "sdk-manifests", currentFeatureBand); diff --git a/src/Tests/dotnet-workload-install.Tests/TestManifestUpdate.cs b/src/Tests/dotnet-workload-install.Tests/TestManifestUpdate.cs new file mode 100644 index 000000000000..fd71e9a76d35 --- /dev/null +++ b/src/Tests/dotnet-workload-install.Tests/TestManifestUpdate.cs @@ -0,0 +1,104 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Runtime.CompilerServices; +using System.Text.Json; +using FluentAssertions.Extensions; +using ManifestReaderTests; +using Microsoft.DotNet.Cli.NuGetPackageDownloader; +using Microsoft.DotNet.ToolPackage; +using Microsoft.DotNet.Workloads.Workload.Install; +using Microsoft.Extensions.EnvironmentAbstractions; +using Microsoft.NET.Sdk.WorkloadManifestReader; +using NuGet.Versioning; + +namespace Microsoft.DotNet.Cli.Workload.Install.Tests +{ + public class TestManifestUpdate + { + public TestManifestUpdate(ManifestId manifestId, ManifestVersion existingVersion, string existingFeatureBand, ManifestVersion newVersion, string newFeatureBand) + { + ManifestId = manifestId; + ExistingVersion = existingVersion; + ExistingFeatureBand = existingFeatureBand; + NewVersion = newVersion; + NewFeatureBand = newFeatureBand; + } + + public ManifestId ManifestId { get; } + public ManifestVersion ExistingVersion { get; } + public string ExistingFeatureBand { get; } + public ManifestVersion NewVersion { get; } + public string NewFeatureBand { get; } + + // Returns an object representing an undo of this manifest update + //public TestManifestUpdate Reverse() + //{ + // return new TestManifestUpdate(ManifestId, NewVersion, NewFeatureBand, ExistingVersion, ExistingFeatureBand); + //} + + public int CompareTo(TestManifestUpdate other) + { + if (other == null) return 1; + int ret = ManifestId.CompareTo(other.ManifestId); + if (ret != 0) return ret; + + if (ExistingVersion == null && other.ExistingVersion != null) return -1; + if (ExistingVersion != null && other.ExistingVersion == null) return 1; + if (ExistingVersion != null) + { + ret = ExistingVersion.CompareTo(other.ExistingVersion); + if (ret != 0) return ret; + } + + ret = string.Compare(ExistingFeatureBand, other.ExistingFeatureBand, StringComparison.Ordinal); + if (ret != 0) return ret; + + if (NewVersion == null && other.NewVersion != null) return -1; + if (NewVersion != null && other.NewVersion == null) return 1; + if (NewVersion != null) + { + ret = NewVersion.CompareTo(other.NewVersion); + if (ret != 0) return ret; + } + + ret = string.Compare(NewFeatureBand, other.NewFeatureBand, StringComparison.Ordinal); + return ret; + } + public bool Equals(TestManifestUpdate other) + { + if (other == null) return false; + return EqualityComparer.Default.Equals(ManifestId, other.ManifestId) && + EqualityComparer.Default.Equals(ExistingVersion, other.ExistingVersion) && + string.Equals(ExistingFeatureBand, other.ExistingFeatureBand, StringComparison.Ordinal) && + EqualityComparer.Default.Equals(NewVersion, other.NewVersion) && + string.Equals(NewFeatureBand, other.NewFeatureBand, StringComparison.Ordinal); + } + + public override bool Equals(object obj) + { + return obj is TestManifestUpdate id && Equals(id); + } + + public override int GetHashCode() + { +#if NETCOREAPP3_1_OR_GREATER + return HashCode.Combine(ManifestId, ExistingVersion, ExistingFeatureBand, NewVersion, NewFeatureBand); +#else + int hashCode = 1601069575; + hashCode = hashCode * -1521134295 + ManifestId.GetHashCode(); + hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(ExistingVersion); + hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(ExistingFeatureBand); + hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(NewVersion); + hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(NewFeatureBand); + return hashCode; +#endif + } + + public ManifestVersionUpdate ToManifestVersionUpdate() + { + return new(ManifestId, NewVersion, NewFeatureBand); + } + + } +} diff --git a/src/Tests/dotnet-workload-list.Tests/GivenWorkloadInstallerAndWorkloadsInstalled.cs b/src/Tests/dotnet-workload-list.Tests/GivenWorkloadInstallerAndWorkloadsInstalled.cs index 29d942429114..c2bcb3c6ca8c 100644 --- a/src/Tests/dotnet-workload-list.Tests/GivenWorkloadInstallerAndWorkloadsInstalled.cs +++ b/src/Tests/dotnet-workload-list.Tests/GivenWorkloadInstallerAndWorkloadsInstalled.cs @@ -44,8 +44,6 @@ private void Setup(string identifier) new( new ManifestVersionUpdate( new ManifestId("manifest1"), - new ManifestVersion(CurrentSdkVersion), - currentSdkFeatureBand.ToString(), new ManifestVersion(UpdateAvailableVersion), currentSdkFeatureBand.ToString()), new WorkloadCollection @@ -60,8 +58,6 @@ private void Setup(string identifier) new( new ManifestVersionUpdate( new ManifestId("manifest-other"), - new ManifestVersion(CurrentSdkVersion), - currentSdkFeatureBand.ToString(), new ManifestVersion("7.0.101"), currentSdkFeatureBand.ToString()), new WorkloadCollection @@ -74,8 +70,6 @@ private void Setup(string identifier) new( new ManifestVersionUpdate( new ManifestId("manifest-older-version"), - new ManifestVersion(CurrentSdkVersion), - currentSdkFeatureBand.ToString(), new ManifestVersion("6.0.100"), currentSdkFeatureBand.ToString()), new WorkloadCollection diff --git a/src/Tests/dotnet-workload-search.Tests/MockWorkloadResolver.cs b/src/Tests/dotnet-workload-search.Tests/MockWorkloadResolver.cs index 5a9bdd9cb706..4c6e6618fb34 100644 --- a/src/Tests/dotnet-workload-search.Tests/MockWorkloadResolver.cs +++ b/src/Tests/dotnet-workload-search.Tests/MockWorkloadResolver.cs @@ -25,6 +25,7 @@ public void RefreshWorkloadManifests() { } public WorkloadResolver.PackInfo TryGetPackInfo(WorkloadPackId packId) => throw new NotImplementedException(); public bool IsPlatformIncompatibleWorkload(WorkloadId workloadId) => throw new NotImplementedException(); public string GetManifestVersion(string manifestId) => throw new NotImplementedException(); + public string GetManifestFeatureBand(string manifestId) => throw new NotImplementedException(); public IEnumerable GetInstalledManifests() => throw new NotImplementedException(); public IWorkloadResolver CreateOverlayResolver(IWorkloadManifestProvider overlayManifestProvider) => throw new NotImplementedException(); public string GetSdkFeatureBand() => "12.0.400"; diff --git a/src/Tests/dotnet-workload-update.Tests/GivenDotnetWorkloadUpdate.cs b/src/Tests/dotnet-workload-update.Tests/GivenDotnetWorkloadUpdate.cs index e78d31494510..de8526916e3d 100644 --- a/src/Tests/dotnet-workload-update.Tests/GivenDotnetWorkloadUpdate.cs +++ b/src/Tests/dotnet-workload-update.Tests/GivenDotnetWorkloadUpdate.cs @@ -219,7 +219,7 @@ public void UpdateViaWorkloadSet(bool upgrade) var oldVersion = upgrade ? "2.3.2" : "2.3.6"; var workloadManifestUpdater = new MockWorkloadManifestUpdater( manifestUpdates: new ManifestUpdateWithWorkloads[] { - new ManifestUpdateWithWorkloads(new ManifestVersionUpdate(new ManifestId("android"), new ManifestVersion(oldVersion), "8.0.200", new ManifestVersion("2.3.4"), "8.0.200"), Enumerable.Empty>().ToDictionary()) + new ManifestUpdateWithWorkloads(new ManifestVersionUpdate(new ManifestId("android"), new ManifestVersion("2.3.4"), "8.0.200"), Enumerable.Empty>().ToDictionary()) }, fromWorkloadSet: true, workloadSetVersion: workloadSetVersion); var resolverFactory = new MockWorkloadResolverFactory(dotnetDir, sdkVersion, workloadResolver, userProfileDir); @@ -375,7 +375,7 @@ public void ApplyRollbackAcrossFeatureBand(string existingSdkFeatureBand, string var manifestsToUpdate = new ManifestUpdateWithWorkloads[] { - new(new ManifestVersionUpdate(new ManifestId("mock-manifest"), new ManifestVersion("1.0.0"), existingSdkFeatureBand, new ManifestVersion("2.0.0"), newSdkFeatureBand), null), + new(new ManifestVersionUpdate(new ManifestId("mock-manifest"), new ManifestVersion("2.0.0"), newSdkFeatureBand), null), }; (var dotnetPath, var updateCommand, var packInstaller, _, _, _) = GetTestInstallers(parseResult, manifestUpdates: manifestsToUpdate, sdkVersion: "6.0.300", identifier: existingSdkFeatureBand + newSdkFeatureBand, installedFeatureBand: existingSdkFeatureBand); @@ -385,8 +385,6 @@ public void ApplyRollbackAcrossFeatureBand(string existingSdkFeatureBand, string packInstaller.InstalledManifests[0].manifestUpdate.ManifestId.Should().Be(manifestsToUpdate[0].ManifestUpdate.ManifestId); packInstaller.InstalledManifests[0].manifestUpdate.NewVersion.Should().Be(manifestsToUpdate[0].ManifestUpdate.NewVersion); packInstaller.InstalledManifests[0].manifestUpdate.NewFeatureBand.Should().Be(manifestsToUpdate[0].ManifestUpdate.NewFeatureBand); - packInstaller.InstalledManifests[0].manifestUpdate.ExistingVersion.Should().Be(manifestsToUpdate[0].ManifestUpdate.ExistingVersion); - packInstaller.InstalledManifests[0].manifestUpdate.ExistingFeatureBand.Should().Be(manifestsToUpdate[0].ManifestUpdate.ExistingFeatureBand); packInstaller.InstalledManifests[0].offlineCache.Should().Be(null); var defaultJsonPath = Path.Combine(dotnetPath, "metadata", "workloads", RuntimeInformation.ProcessArchitecture.ToString(), "6.0.300", "InstallState", "default.json"); @@ -404,9 +402,9 @@ public void ApplyRollbackWithMultipleManifestsAcrossFeatureBand() var manifestsToUpdate = new ManifestUpdateWithWorkloads[] { - new(new ManifestVersionUpdate(new ManifestId("mock-manifest-1"), new ManifestVersion("1.0.0"), "6.0.300", new ManifestVersion("2.0.0"), "6.0.100"), null), - new(new ManifestVersionUpdate(new ManifestId("mock-manifest-2"), new ManifestVersion("1.0.0"), "6.0.100", new ManifestVersion("2.0.0"), "6.0.300"), null), - new(new ManifestVersionUpdate(new ManifestId("mock-manifest-3"), new ManifestVersion("1.0.0"), "5.0.100", new ManifestVersion("2.0.0"), "6.0.100"), null), + new(new ManifestVersionUpdate(new ManifestId("mock-manifest-1"), new ManifestVersion("2.0.0"), "6.0.100"), null), + new(new ManifestVersionUpdate(new ManifestId("mock-manifest-2"), new ManifestVersion("2.0.0"), "6.0.300"), null), + new(new ManifestVersionUpdate(new ManifestId("mock-manifest-3"), new ManifestVersion("2.0.0"), "6.0.100"), null), }; (_, var updateCommand, var packInstaller, _, _, _) = GetTestInstallers(parseResult, manifestUpdates: manifestsToUpdate, sdkVersion: "6.0.300", installedFeatureBand: "6.0.300"); @@ -418,9 +416,6 @@ public void ApplyRollbackWithMultipleManifestsAcrossFeatureBand() packInstaller.InstalledManifests[0].manifestUpdate.NewFeatureBand.Should().Be("6.0.100"); packInstaller.InstalledManifests[1].manifestUpdate.NewFeatureBand.Should().Be("6.0.300"); packInstaller.InstalledManifests[2].manifestUpdate.NewFeatureBand.Should().Be("6.0.100"); - packInstaller.InstalledManifests[0].manifestUpdate.ExistingFeatureBand.Should().Be("6.0.300"); - packInstaller.InstalledManifests[1].manifestUpdate.ExistingFeatureBand.Should().Be("6.0.100"); - packInstaller.InstalledManifests[2].manifestUpdate.ExistingFeatureBand.Should().Be("5.0.100"); packInstaller.InstalledManifests[0].offlineCache.Should().Be(null); } From 7c0ad0f892b9fc1444981dd850bb6df826c8d97f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 26 Jun 2024 12:50:10 +0000 Subject: [PATCH 076/159] Update dependencies from https://github.com/microsoft/vstest build 20240617.2 Microsoft.NET.Test.Sdk , Microsoft.TestPlatform.Build , Microsoft.TestPlatform.CLI From Version 17.10.0-release-24272-11 -> To Version 17.10.0-release-24317-02 From 52e63f699ecf8c274f9275a214dc187e250e6d21 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 26 Jun 2024 12:50:41 +0000 Subject: [PATCH 077/159] Update dependencies from https://github.com/dotnet/razor build 20240626.2 Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal , Microsoft.CodeAnalysis.Razor.Tooling.Internal , Microsoft.NET.Sdk.Razor.SourceGenerators.Transport From Version 7.0.0-preview.24312.2 -> To Version 7.0.0-preview.24326.2 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3c471d786369..6dd27570b097 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -285,18 +285,18 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 - + https://github.com/dotnet/razor - fc9b28705adcd7c5dbd6f5104ee1d992e857a9fb + 6f2caf542643b6c72369e41172572015d8f48311 - + https://github.com/dotnet/razor - fc9b28705adcd7c5dbd6f5104ee1d992e857a9fb + 6f2caf542643b6c72369e41172572015d8f48311 - + https://github.com/dotnet/razor - fc9b28705adcd7c5dbd6f5104ee1d992e857a9fb + 6f2caf542643b6c72369e41172572015d8f48311 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 6f0d5fae6045..c45bdc83d7db 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -176,9 +176,9 @@ - 7.0.0-preview.24314.2 - 7.0.0-preview.24314.2 - 7.0.0-preview.24314.2 + 7.0.0-preview.24326.2 + 7.0.0-preview.24326.2 + 7.0.0-preview.24326.2 From a36a442644a3ed5767f2acc2f4dbad5d074372f9 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 26 Jun 2024 12:52:36 +0000 Subject: [PATCH 078/159] Update dependencies from https://github.com/dotnet/roslyn build 20240624.8 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.10.0-3.24312.19 -> To Version 4.10.0-3.24324.8 From c929df68d52ce8dd969eae4accbb83d630b56913 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 26 Jun 2024 12:53:13 +0000 Subject: [PATCH 079/159] Update dependencies from https://github.com/dotnet/templating build 20240614.2 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.303-servicing.24311.4 -> To Version 8.0.303-servicing.24314.2 From e12c6f06f82c0ff1c7175dac07c17a9229668812 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 26 Jun 2024 12:55:07 +0000 Subject: [PATCH 080/159] Update dependencies from https://github.com/dotnet/arcade build 20240624.7 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 8.0.0-beta.24311.3 -> To Version 8.0.0-beta.24324.7 From d82617826bc5babcd63325ccccc7c63799e32ae9 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 26 Jun 2024 13:04:51 +0000 Subject: [PATCH 081/159] Update dependencies from https://github.com/dotnet/fsharp build 20240625.8 Microsoft.SourceBuild.Intermediate.fsharp , Microsoft.FSharp.Compiler From Version 8.0.400-beta.24321.3 -> To Version 8.0.400-beta.24325.8 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 933f0aebb49d..e1f88ff28c72 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -64,13 +64,13 @@ 000df9aed1ef6d5f01dc7f1400cae163295d531f - + https://github.com/dotnet/fsharp - 2f906b91f0ee24eb57082b96c731428084089835 + 556819c570c803598b7f610639bdc6d35b12f2f7 - + https://github.com/dotnet/fsharp - 2f906b91f0ee24eb57082b96c731428084089835 + 556819c570c803598b7f610639bdc6d35b12f2f7 diff --git a/eng/Versions.props b/eng/Versions.props index 84fb38acff90..fc82beaa44b1 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -151,7 +151,7 @@ - 12.8.400-beta.24321.3 + 12.8.400-beta.24325.8 From b419c50fd7d8a04936cfd76e98344902517a6d44 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 26 Jun 2024 13:05:26 +0000 Subject: [PATCH 082/159] Update dependencies from https://github.com/dotnet/razor build 20240625.5 Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal , Microsoft.CodeAnalysis.Razor.Tooling.Internal , Microsoft.NET.Sdk.Razor.SourceGenerators.Transport From Version 9.0.0-preview.24325.3 -> To Version 9.0.0-preview.24325.5 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 933f0aebb49d..5f425664f8c0 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -281,18 +281,18 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 - + https://github.com/dotnet/razor - 026ae10a9e9349f984bd1664628cac0e778bb2c3 + 277aae89ff26c97c29ee165535d20b5bbe4c5813 - + https://github.com/dotnet/razor - 026ae10a9e9349f984bd1664628cac0e778bb2c3 + 277aae89ff26c97c29ee165535d20b5bbe4c5813 - + https://github.com/dotnet/razor - 026ae10a9e9349f984bd1664628cac0e778bb2c3 + 277aae89ff26c97c29ee165535d20b5bbe4c5813 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 84fb38acff90..d22e0da17334 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -176,9 +176,9 @@ - 9.0.0-preview.24325.3 - 9.0.0-preview.24325.3 - 9.0.0-preview.24325.3 + 9.0.0-preview.24325.5 + 9.0.0-preview.24325.5 + 9.0.0-preview.24325.5 From 49a9b980f599b67173a936a45e440f4eda1aafd9 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Wed, 26 Jun 2024 13:42:45 -0400 Subject: [PATCH 083/159] Fix tests --- .../install/WorkloadInstallCommand.cs | 36 +++++++++---------- .../WorkloadSetTests.cs | 3 +- .../GivenDotnetWorkloadInstall.cs | 32 +++++++++++++++-- .../GivenWorkloadManifestUpdater.cs | 6 ++-- 4 files changed, 52 insertions(+), 25 deletions(-) diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs index 80827fcf3d16..21c208101682 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs @@ -112,31 +112,31 @@ public override int Execute() { bool shouldUpdateWorkloads = !_skipManifestUpdate; - // Normally we want to validate that the workload IDs specified were valid. However, if there is a global.json file with a workload - // set version specified, and we might update the workload version, then we don't do that check here, because we might not have the right - // workload set installed yet, and trying to list the available workloads would throw an error - if (!shouldUpdateWorkloads || string.IsNullOrEmpty(_workloadSetVersionFromGlobalJson)) + try { - ValidateWorkloadIdsInput(); - } + // Normally we want to validate that the workload IDs specified were valid. However, if there is a global.json file with a workload + // set version specified, and we might update the workload version, then we don't do that check here, because we might not have the right + // workload set installed yet, and trying to list the available workloads would throw an error + if (!shouldUpdateWorkloads || string.IsNullOrEmpty(_workloadSetVersionFromGlobalJson)) + { + ValidateWorkloadIdsInput(); + } - if (string.IsNullOrWhiteSpace(_workloadSetVersionFromCommandLine) && string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson)) - { - var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkFeatureBand, _dotnetPath), "default.json"); - if (File.Exists(installStateFilePath)) + if (string.IsNullOrWhiteSpace(_workloadSetVersionFromCommandLine) && string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson)) { - var installStateContents = InstallStateContents.FromPath(installStateFilePath); - // If install state has pinned workload set or manifest versions, then don't update workloads - if (!string.IsNullOrEmpty(installStateContents.WorkloadVersion) || installStateContents.Manifests != null) + var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkFeatureBand, _dotnetPath), "default.json"); + if (File.Exists(installStateFilePath)) { - // TODO: respect shouldUpdateWorkloads, or figure out update / install manifest difference in InstallingWorkloadCommand - shouldUpdateWorkloads = false; + var installStateContents = InstallStateContents.FromPath(installStateFilePath); + // If install state has pinned workload set or manifest versions, then don't update workloads + if (!string.IsNullOrEmpty(installStateContents.WorkloadVersion) || installStateContents.Manifests != null) + { + // TODO: respect shouldUpdateWorkloads, or figure out update / install manifest difference in InstallingWorkloadCommand + shouldUpdateWorkloads = false; + } } } - } - try - { Reporter.WriteLine(); DirectoryPath? offlineCache = string.IsNullOrWhiteSpace(_fromCacheOption) ? null : new DirectoryPath(_fromCacheOption); diff --git a/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs b/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs index 64c8f03676ec..227814d1f3ec 100644 --- a/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs +++ b/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs @@ -262,7 +262,8 @@ string GetWorkloadVersion(string workingDirectory = null) return result.StdOut; } - + + [Fact] public void UpdateShouldNotPinWorkloadSet() { InstallSdk(); diff --git a/src/Tests/dotnet-workload-install.Tests/GivenDotnetWorkloadInstall.cs b/src/Tests/dotnet-workload-install.Tests/GivenDotnetWorkloadInstall.cs index d55283bab9ec..2596b08a8e8f 100644 --- a/src/Tests/dotnet-workload-install.Tests/GivenDotnetWorkloadInstall.cs +++ b/src/Tests/dotnet-workload-install.Tests/GivenDotnetWorkloadInstall.cs @@ -495,6 +495,32 @@ static void CreateFile(string path) [Fact] public void GivenWorkloadInstallItErrorsOnInvalidWorkloadRollbackFile() + { + _reporter.Clear(); + var testDirectory = _testAssetsManager.CreateTestDirectory().Path; + var dotnetRoot = Path.Combine(testDirectory, "dotnet"); + var userProfileDir = Path.Combine(testDirectory, "user-profile"); + var tmpDir = Path.Combine(testDirectory, "tmp"); + var manifestPath = Path.Combine(_testAssetsManager.GetAndValidateTestProjectDirectory("SampleManifest"), "MockWorkloadsSample.json"); + var workloadResolver = WorkloadResolver.CreateForTests(new MockManifestProvider(new[] { manifestPath }), dotnetRoot); + var sdkFeatureVersion = "6.0.100"; + var workload = "mock-1"; + var mockRollbackFileContent = @"[{""fake.manifest.name"":""1.0.0""}]"; + var rollbackFilePath = Path.Combine(testDirectory, "rollback.json"); + File.WriteAllText(rollbackFilePath, mockRollbackFileContent); + var workloadResolverFactory = new MockWorkloadResolverFactory(dotnetRoot, sdkFeatureVersion, workloadResolver, userProfileDir); + + var installParseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", workload, "--from-rollback-file", rollbackFilePath }); + var installCommand = new WorkloadInstallCommand(installParseResult, reporter: _reporter, workloadResolverFactory, nugetPackageDownloader: new MockNuGetPackageDownloader(tmpDir), + tempDirPath: testDirectory); + + var ex = Assert.Throws(() => installCommand.Execute()); + ex.Message.Should().StartWith("Workload installation failed:"); + string.Join(" ", _reporter.Lines).Should().Contain("Workload installation failed."); + } + + [Fact] + public void GivenWorkloadInstallItWarnsWhenManifestFromRollbackFileIsntInstalled() { _reporter.Clear(); var testDirectory = _testAssetsManager.CreateTestDirectory().Path; @@ -513,9 +539,9 @@ public void GivenWorkloadInstallItErrorsOnInvalidWorkloadRollbackFile() var installParseResult = Parser.Instance.Parse(new string[] { "dotnet", "workload", "install", workload, "--from-rollback-file", rollbackFilePath }); var installCommand = new WorkloadInstallCommand(installParseResult, reporter: _reporter, workloadResolverFactory, nugetPackageDownloader: new MockNuGetPackageDownloader(tmpDir), tempDirPath: testDirectory); - - Assert.Throws(() => installCommand.Execute()); - string.Join(" ", _reporter.Lines).Should().Contain("Invalid rollback definition"); + + installCommand.Execute().Should().Be(0); + string.Join(" ", _reporter.Lines).Should().Contain("Invalid rollback definition. The manifest IDs in rollback definition"); } [Fact] diff --git a/src/Tests/dotnet-workload-install.Tests/GivenWorkloadManifestUpdater.cs b/src/Tests/dotnet-workload-install.Tests/GivenWorkloadManifestUpdater.cs index 820eae77b113..832d297300a0 100644 --- a/src/Tests/dotnet-workload-install.Tests/GivenWorkloadManifestUpdater.cs +++ b/src/Tests/dotnet-workload-install.Tests/GivenWorkloadManifestUpdater.cs @@ -127,7 +127,7 @@ public void GivenWorkloadManifestUpdateItCanCalculateUpdates() var manifestUpdater = new WorkloadManifestUpdater(_reporter, workloadResolver, nugetDownloader, userProfileDir: Path.Combine(testDir, ".dotnet"), installationRepo, new MockPackWorkloadInstaller(dotnetRoot)); var manifestUpdates = manifestUpdater.CalculateManifestUpdates().Select(m => m.ManifestUpdate); - manifestUpdates.Should().BeEquivalentTo(expectedManifestUpdates); + manifestUpdates.Should().BeEquivalentTo(expectedManifestUpdates.Select(u => u.ToManifestVersionUpdate())); } @@ -194,7 +194,7 @@ public void GivenAdvertisedManifestsItCalculatesCorrectUpdates() var manifestUpdater = new WorkloadManifestUpdater(_reporter, workloadResolver, nugetDownloader, userProfileDir: Path.Combine(testDir, ".dotnet"), installationRepo, new MockPackWorkloadInstaller(dotnetRoot)); var manifestUpdates = manifestUpdater.CalculateManifestUpdates().Select(m => m.ManifestUpdate); - manifestUpdates.Should().BeEquivalentTo(expectedManifestUpdates); + manifestUpdates.Should().BeEquivalentTo(expectedManifestUpdates.Select(u => u.ToManifestVersionUpdate())); } [Theory] @@ -443,7 +443,7 @@ public void GivenWorkloadManifestRollbackItCanCalculateUpdates() var manifestUpdater = new WorkloadManifestUpdater(_reporter, workloadResolver, nugetDownloader, testDir, installationRepo, new MockPackWorkloadInstaller(dotnetRoot)); var manifestUpdates = manifestUpdater.CalculateManifestRollbacks(rollbackDefPath); - manifestUpdates.Should().BeEquivalentTo(expectedManifestUpdates); + manifestUpdates.Should().BeEquivalentTo(expectedManifestUpdates.Select(u => u.ToManifestVersionUpdate())); } [Fact] From b1a15ae5a8f5a8e3fcccbf54a2653536f07d0fb7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 26 Jun 2024 18:39:51 +0000 Subject: [PATCH 084/159] [release/8.0.4xx] rename SDK_CONTAINER_* to DOTNET_CONTAINER (#41808) Co-authored-by: kasperk81 <83082615+kasperk81@users.noreply.github.com> --- .../AuthHandshakeMessageHandler.cs | 4 ++-- .../ContainerHelpers.cs | 6 +++-- .../Registry/RegistrySettings.cs | 24 ++++++++++++------- src/Containers/docs/ReleaseNotes/v7.0.400.md | 6 ++--- .../RegistryTests.cs | 2 +- 5 files changed, 26 insertions(+), 16 deletions(-) diff --git a/src/Containers/Microsoft.NET.Build.Containers/AuthHandshakeMessageHandler.cs b/src/Containers/Microsoft.NET.Build.Containers/AuthHandshakeMessageHandler.cs index 543db320b5c4..172f968baa30 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/AuthHandshakeMessageHandler.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/AuthHandshakeMessageHandler.cs @@ -157,8 +157,8 @@ public DateTimeOffset ResolvedExpiration private async Task<(AuthenticationHeaderValue, DateTimeOffset)?> GetAuthenticationAsync(string registry, string scheme, AuthInfo? bearerAuthInfo, CancellationToken cancellationToken) { // Allow overrides for auth via environment variables - string? credU = Environment.GetEnvironmentVariable(ContainerHelpers.HostObjectUser); - string? credP = Environment.GetEnvironmentVariable(ContainerHelpers.HostObjectPass); + string? credU = Environment.GetEnvironmentVariable(ContainerHelpers.HostObjectUser) ?? Environment.GetEnvironmentVariable(ContainerHelpers.HostObjectUserLegacy); + string? credP = Environment.GetEnvironmentVariable(ContainerHelpers.HostObjectPass) ?? Environment.GetEnvironmentVariable(ContainerHelpers.HostObjectPassLegacy); // fetch creds for the host DockerCredentials? privateRepoCreds; diff --git a/src/Containers/Microsoft.NET.Build.Containers/ContainerHelpers.cs b/src/Containers/Microsoft.NET.Build.Containers/ContainerHelpers.cs index 81cfde3bab90..137755cdeb3d 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/ContainerHelpers.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/ContainerHelpers.cs @@ -16,9 +16,11 @@ namespace Microsoft.NET.Build.Containers; public static class ContainerHelpers { - internal const string HostObjectUser = "SDK_CONTAINER_REGISTRY_UNAME"; + internal const string HostObjectUser = "DOTNET_CONTAINER_REGISTRY_UNAME"; + internal const string HostObjectUserLegacy = "SDK_CONTAINER_REGISTRY_UNAME"; - internal const string HostObjectPass = "SDK_CONTAINER_REGISTRY_PWORD"; + internal const string HostObjectPass = "DOTNET_CONTAINER_REGISTRY_PWORD"; + internal const string HostObjectPassLegacy = "SDK_CONTAINER_REGISTRY_PWORD"; internal const string DockerRegistryAlias = "docker.io"; diff --git a/src/Containers/Microsoft.NET.Build.Containers/Registry/RegistrySettings.cs b/src/Containers/Microsoft.NET.Build.Containers/Registry/RegistrySettings.cs index 19e5b6eef6a3..9ea9005af46a 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Registry/RegistrySettings.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Registry/RegistrySettings.cs @@ -12,9 +12,14 @@ public RegistrySettings(string? registryName = null, IEnvironmentProvider? envir { environment ??= new EnvironmentProvider(); - ChunkedUploadSizeBytes = environment.GetEnvironmentVariableAsNullableInt(EnvVariables.ChunkedUploadSizeBytes); - ForceChunkedUpload = environment.GetEnvironmentVariableAsBool(EnvVariables.ForceChunkedUpload, defaultValue: false); - ParallelUploadEnabled = environment.GetEnvironmentVariableAsBool(EnvVariables.ParallelUploadEnabled, defaultValue: true); + ChunkedUploadSizeBytes = environment.GetEnvironmentVariableAsNullableInt(EnvVariables.ChunkedUploadSizeBytes) ?? + environment.GetEnvironmentVariableAsNullableInt(EnvVariables.ChunkedUploadSizeBytesLegacy); + ForceChunkedUpload = Environment.GetEnvironmentVariable(EnvVariables.ForceChunkedUpload) is not null ? + environment.GetEnvironmentVariableAsBool(EnvVariables.ForceChunkedUpload, defaultValue: false) : + environment.GetEnvironmentVariableAsBool(EnvVariables.ForceChunkedUploadLegacy, defaultValue: false); + ParallelUploadEnabled = Environment.GetEnvironmentVariable(EnvVariables.ParallelUploadEnabled) is not null ? + environment.GetEnvironmentVariableAsBool(EnvVariables.ParallelUploadEnabled, defaultValue: true) : + environment.GetEnvironmentVariableAsBool(EnvVariables.ParallelUploadEnabledLegacy, defaultValue: true); if (registryName is not null) { @@ -53,12 +58,15 @@ public RegistrySettings(string? registryName = null, IEnvironmentProvider? envir internal struct EnvVariables { - internal const string ChunkedUploadSizeBytes = "SDK_CONTAINER_REGISTRY_CHUNKED_UPLOAD_SIZE_BYTES"; + internal const string ChunkedUploadSizeBytes = "DOTNET_CONTAINER_REGISTRY_CHUNKED_UPLOAD_SIZE_BYTES"; + internal const string ChunkedUploadSizeBytesLegacy = "SDK_CONTAINER_REGISTRY_CHUNKED_UPLOAD_SIZE_BYTES"; - internal const string ForceChunkedUpload = "SDK_CONTAINER_DEBUG_REGISTRY_FORCE_CHUNKED_UPLOAD"; - internal const string ParallelUploadEnabled = "SDK_CONTAINER_REGISTRY_PARALLEL_UPLOAD"; + internal const string ForceChunkedUpload = "DOTNET_CONTAINER_DEBUG_REGISTRY_FORCE_CHUNKED_UPLOAD"; + internal const string ForceChunkedUploadLegacy = "SDK_CONTAINER_DEBUG_REGISTRY_FORCE_CHUNKED_UPLOAD"; + internal const string ParallelUploadEnabled = "DOTNET_CONTAINER_REGISTRY_PARALLEL_UPLOAD"; + internal const string ParallelUploadEnabledLegacy = "SDK_CONTAINER_REGISTRY_PARALLEL_UPLOAD"; - internal const string InsecureRegistries = "SDK_CONTAINER_INSECURE_REGISTRIES"; + internal const string InsecureRegistries = "DOTNET_CONTAINER_INSECURE_REGISTRIES"; } private static bool IsInsecureRegistry(IEnvironmentProvider environment, string registryName) @@ -70,7 +78,7 @@ private static bool IsInsecureRegistry(IEnvironmentProvider environment, string return true; } - // SDK_CONTAINER_INSECURE_REGISTRIES is a semicolon separated list of insecure registry names. + // DOTNET_CONTAINER_INSECURE_REGISTRIES is a semicolon separated list of insecure registry names. string? insecureRegistriesEnv = environment.GetEnvironmentVariable(EnvVariables.InsecureRegistries); if (insecureRegistriesEnv is not null) { diff --git a/src/Containers/docs/ReleaseNotes/v7.0.400.md b/src/Containers/docs/ReleaseNotes/v7.0.400.md index 94ae3054009b..0986e20ab196 100644 --- a/src/Containers/docs/ReleaseNotes/v7.0.400.md +++ b/src/Containers/docs/ReleaseNotes/v7.0.400.md @@ -11,13 +11,13 @@ This version brings the following new features and enhancements: In addition, we fixed some protocol bugs that blocked usage with registries like Harbor. * Several environment variables were added to allow more explicit control over the layer upload process: - * SDK_CONTAINER_REGISTRY_PARALLEL_UPLOAD + * DOTNET_CONTAINER_REGISTRY_PARALLEL_UPLOAD * determines if layers of the generated image can be uploaded in parallel or in series. * defaults to `true` for all registries except AWS ECR - * SDK_CONTAINER_DEBUG_REGISTRY_FORCE_CHUNKED_UPLOAD + * DOTNET_CONTAINER_DEBUG_REGISTRY_FORCE_CHUNKED_UPLOAD * if set to `true`, we will always try to upload layers in chunks instead of all in one upload. * defaults to `false`. - * SDK_CONTAINER_REGISTRY_CHUNKED_UPLOAD_SIZE_BYTES + * DOTNET_CONTAINER_REGISTRY_CHUNKED_UPLOAD_SIZE_BYTES * allows for explicit control over the size of the chunks uploaded when using chunked uploads. * note that by default we prefer atomic uploads, so setting this might not have any impact if your registry supports atomic uploads. * does not have a default, but the default chunk size is 64Kb. diff --git a/src/Tests/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs b/src/Tests/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs index 11c80a75c845..d01aab77d77b 100644 --- a/src/Tests/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs +++ b/src/Tests/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs @@ -531,7 +531,7 @@ public void IsRegistryInsecure(string registryName, string? insecureRegistriesEn var environment = new Dictionary(); if (insecureRegistriesEnvvar is not null) { - environment["SDK_CONTAINER_INSECURE_REGISTRIES"] = insecureRegistriesEnvvar; + environment["DOTNET_CONTAINER_INSECURE_REGISTRIES"] = insecureRegistriesEnvvar; } var registrySettings = new RegistrySettings(registryName, new MockEnvironmentProvider(environment)); From 07425878975cc1517e6e74223b828c8f5eab2439 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Wed, 26 Jun 2024 16:28:15 -0400 Subject: [PATCH 085/159] Apply code review feedback --- .../commands/InstallingWorkloadCommand.cs | 20 +++++++++---------- .../install/NetSdkMsiInstallerClient.cs | 6 +++--- .../install/WorkloadInstallCommand.cs | 13 +++++------- .../install/WorkloadManifestUpdater.cs | 2 -- .../SdkDirectoryWorkloadManifestProvider.cs | 1 - .../WorkloadSet.cs | 4 +++- 6 files changed, 20 insertions(+), 26 deletions(-) diff --git a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs index e180289f65f2..c451f9e6f3e2 100644 --- a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs +++ b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs @@ -46,7 +46,7 @@ internal abstract class InstallingWorkloadCommand : WorkloadCommandBase protected IWorkloadManifestUpdater _workloadManifestUpdater; protected bool UseRollback => !string.IsNullOrWhiteSpace(_fromRollbackDefinition); - protected bool SpecifiedWorkloadSetVersionOnCommandLine => !string.IsNullOrEmpty(_workloadSetVersionFromCommandLine); + protected bool SpecifiedWorkloadSetVersionOnCommandLine => !string.IsNullOrWhiteSpace(_workloadSetVersionFromCommandLine); protected bool SpecifiedWorkloadSetVersionInGlobalJson => !string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson); public InstallingWorkloadCommand( @@ -115,7 +115,6 @@ public InstallingWorkloadCommand( } // At this point, at most one of SpecifiedWorkloadSetVersionOnCommandLine, UseRollback, and SpecifiedWorkloadSetVersionInGlobalJson is true - } protected static Dictionary GetInstallStateContents(IEnumerable manifestVersionUpdates) => @@ -131,8 +130,7 @@ InstallStateContents GetCurrentInstallState() static InstallStateContents GetCurrentInstallState(SdkFeatureBand sdkFeatureBand, string dotnetDir) { string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(sdkFeatureBand, dotnetDir), "default.json"); - var installStateContents = File.Exists(path) ? InstallStateContents.FromString(File.ReadAllText(path)) : new InstallStateContents(); - return installStateContents; + return InstallStateContents.FromPath(path); } public static bool ShouldUseWorkloadSetMode(SdkFeatureBand sdkFeatureBand, string dotnetDir) @@ -142,18 +140,18 @@ public static bool ShouldUseWorkloadSetMode(SdkFeatureBand sdkFeatureBand, strin protected void UpdateWorkloadManifests(ITransactionContext context, DirectoryPath? offlineCache) { - var updateUsingWorkloadSets = ShouldUseWorkloadSetMode(_sdkFeatureBand, _dotnetPath); - if (UseRollback && updateUsingWorkloadSets) + var updateToLatestWorkloadSet = ShouldUseWorkloadSetMode(_sdkFeatureBand, _dotnetPath); + if (UseRollback && updateToLatestWorkloadSet) { // Rollback files are only for loose manifests. Update the mode to be loose manifests. Reporter.WriteLine(Update.LocalizableStrings.UpdateFromRollbackSwitchesModeToLooseManifests); _workloadInstaller.UpdateInstallMode(_sdkFeatureBand, false); - updateUsingWorkloadSets = false; + updateToLatestWorkloadSet = false; } if (SpecifiedWorkloadSetVersionOnCommandLine) { - updateUsingWorkloadSets = false; + updateToLatestWorkloadSet = false; // If a workload set version is specified, then switch to workload set update mode // Check to make sure the value needs to be changed, as updating triggers a UAC prompt @@ -167,14 +165,14 @@ protected void UpdateWorkloadManifests(ITransactionContext context, DirectoryPat string resolvedWorkloadSetVersion = _workloadSetVersionFromGlobalJson ??_workloadSetVersionFromCommandLine; if (string.IsNullOrWhiteSpace(resolvedWorkloadSetVersion) && !UseRollback) { - _workloadManifestUpdater.UpdateAdvertisingManifestsAsync(_includePreviews, updateUsingWorkloadSets, offlineCache).Wait(); - if (updateUsingWorkloadSets) + _workloadManifestUpdater.UpdateAdvertisingManifestsAsync(_includePreviews, updateToLatestWorkloadSet, offlineCache).Wait(); + if (updateToLatestWorkloadSet) { resolvedWorkloadSetVersion = _workloadManifestUpdater.GetAdvertisedWorkloadSetVersion(); } } - if (updateUsingWorkloadSets && resolvedWorkloadSetVersion == null) + if (updateToLatestWorkloadSet && resolvedWorkloadSetVersion == null) { Reporter.WriteLine(Update.LocalizableStrings.NoWorkloadUpdateFound); return; diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs index af516106529f..769ac4c1ad97 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/NetSdkMsiInstallerClient.cs @@ -267,13 +267,13 @@ public WorkloadSet InstallWorkloadSet(ITransactionContext context, string worklo context.Run( action: () => { - Elevate(); - DetectState state = DetectPackage(msi.ProductCode, out Version installedVersion); InstallAction plannedAction = PlanPackage(msi, state, InstallAction.Install, installedVersion); if (plannedAction == InstallAction.Install) { + Elevate(); + ExecutePackage(msi, plannedAction, msiPackageId); // Update the reference count against the MSI. @@ -316,7 +316,7 @@ public WorkloadSet InstallWorkloadSet(ITransactionContext context, string worklo // Unwrap AggregateException caused by switch from async to sync catch (Exception ex) when (ex is NuGetPackageNotFoundException || ex.InnerException is NuGetPackageNotFoundException) { - throw new GracefulException(string.Format(Update.LocalizableStrings.WorkloadVersionRequestedNotFound, workloadSetVersion), ex); + throw new GracefulException(string.Format(Update.LocalizableStrings.WorkloadVersionRequestedNotFound, workloadSetVersion), ex is NuGetPackageNotFoundException ? ex : ex.InnerException); } VerifyPackage(msi); diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs index 21c208101682..e4b076e0d0ff 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs @@ -125,15 +125,12 @@ public override int Execute() if (string.IsNullOrWhiteSpace(_workloadSetVersionFromCommandLine) && string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson)) { var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkFeatureBand, _dotnetPath), "default.json"); - if (File.Exists(installStateFilePath)) + var installStateContents = InstallStateContents.FromPath(installStateFilePath); + // If install state has pinned workload set or manifest versions, then don't update workloads + if (!string.IsNullOrEmpty(installStateContents.WorkloadVersion) || installStateContents.Manifests != null) { - var installStateContents = InstallStateContents.FromPath(installStateFilePath); - // If install state has pinned workload set or manifest versions, then don't update workloads - if (!string.IsNullOrEmpty(installStateContents.WorkloadVersion) || installStateContents.Manifests != null) - { - // TODO: respect shouldUpdateWorkloads, or figure out update / install manifest difference in InstallingWorkloadCommand - shouldUpdateWorkloads = false; - } + // TODO: respect shouldUpdateWorkloads, or figure out update / install manifest difference in InstallingWorkloadCommand + shouldUpdateWorkloads = false; } } diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs index c97c01b0f2c7..1919eb36d600 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs @@ -485,8 +485,6 @@ private async Task NewerManifestPackageExists(ManifestId manifest) public IEnumerable CalculateManifestUpdatesForWorkloadSet(WorkloadSet workloadSet) { - // TODO: Don't look up previous manifest versions (since we may be in the mode where there's a global.json with a workload set - // that's not installed, and trying to get the current manifests will throw an exception) return CalculateManifestRollbacks(workloadSet.ManifestVersions.Select(kvp => (kvp.Key, new ManifestVersionWithBand(kvp.Value.Version, kvp.Value.FeatureBand)))); } diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs index 482efcdb9333..e9a0750301a6 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs @@ -501,7 +501,6 @@ public Dictionary GetAvailableWorkloadSets(SdkFeatureBand w foreach (var manifestRoot in _manifestRoots.Reverse()) { - // We don't automatically fall back to a previous band var workloadSetsRoot = Path.Combine(manifestRoot, workloadSetFeatureBand.ToString(), WorkloadSetsFolderName); if (Directory.Exists(workloadSetsRoot)) { diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadSet.cs b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadSet.cs index 0c69d9d28b31..eecb89c38f06 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadSet.cs +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadSet.cs @@ -169,7 +169,9 @@ public static string WorkloadSetVersionToWorkloadSetPackageVersion(string setVer if (preReleaseOrBuild != null) { - packageVersion += '-' + preReleaseOrBuild; + // Figure out if we split on a '-' or '+' + char separator = setVersion[sections[0].Length]; + packageVersion += separator + preReleaseOrBuild; } return packageVersion; From e6e20add0255e1edd535f866bd0dc6d3447bed86 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Wed, 26 Jun 2024 18:58:57 -0400 Subject: [PATCH 086/159] Fix tests --- .../GivenWorkloadManifestUpdater.cs | 8 ++-- .../MockManifestProvider.cs | 10 ++--- .../GivenDotnetWorkloadList.cs | 2 +- ...nWorkloadInstallerAndWorkloadsInstalled.cs | 45 ++++++++++++++----- 4 files changed, 44 insertions(+), 21 deletions(-) diff --git a/src/Tests/dotnet-workload-install.Tests/GivenWorkloadManifestUpdater.cs b/src/Tests/dotnet-workload-install.Tests/GivenWorkloadManifestUpdater.cs index 832d297300a0..8226f4362d96 100644 --- a/src/Tests/dotnet-workload-install.Tests/GivenWorkloadManifestUpdater.cs +++ b/src/Tests/dotnet-workload-install.Tests/GivenWorkloadManifestUpdater.cs @@ -181,9 +181,9 @@ public void GivenAdvertisedManifestsItCalculatesCorrectUpdates() } var manifestInfo = expectedManifestUpdates.Select( - manifest => (manifest.ManifestId.ToString(), Path.Combine(testDir, "dotnet", "sdk-manifests", manifest.ExistingFeatureBand, manifest.ManifestId.ToString(), "WorkloadManifest.json"), manifest.ExistingFeatureBand)) + manifest => (manifest.ManifestId.ToString(), Path.Combine(testDir, "dotnet", "sdk-manifests", manifest.ExistingFeatureBand, manifest.ManifestId.ToString(), "WorkloadManifest.json"), manifest.ExistingVersion.ToString(), manifest.ExistingFeatureBand)) .Concat(expectedManifestNotUpdated.Select( - manifestId => (manifestId.ToString(), Path.Combine(testDir, "dotnet", "sdk-manifests", currentFeatureBand, manifestId.ToString(), "WorkloadManifest.json"), currentFeatureBand))) + manifestId => (manifestId.ToString(), Path.Combine(testDir, "dotnet", "sdk-manifests", currentFeatureBand, manifestId.ToString(), "WorkloadManifest.json"), "2.0.0", currentFeatureBand))) .ToArray(); var workloadManifestProvider = new MockManifestProvider(manifestInfo); @@ -224,7 +224,7 @@ public void ItCanFallbackAndAdvertiseCorrectUpdate(bool useOfflineCache) string manifestPath = Path.Combine(installedManifestDir6_0_200, testManifestName, _manifestFileName); - var workloadManifestProvider = new MockManifestProvider((testManifestName, manifestPath, "6.0.200")) + var workloadManifestProvider = new MockManifestProvider((testManifestName, manifestPath, "1.0.0", "6.0.200")) { SdkFeatureBand = new SdkFeatureBand(sdkFeatureBand) }; @@ -302,7 +302,7 @@ public void ItCanFallbackWithNoUpdates(bool useOfflineCache) Directory.CreateDirectory(Path.Combine(emptyInstalledManifestsDir, testManifestName)); File.WriteAllText(Path.Combine(emptyInstalledManifestsDir, testManifestName, _manifestFileName), GetManifestContent(new ManifestVersion("1.0.0"))); - var workloadManifestProvider = new MockManifestProvider((testManifestName, Path.Combine(emptyInstalledManifestsDir, testManifestName, _manifestFileName), "6.0.200")) + var workloadManifestProvider = new MockManifestProvider((testManifestName, Path.Combine(emptyInstalledManifestsDir, testManifestName, _manifestFileName), "1.0.0", "6.0.200")) { SdkFeatureBand = new SdkFeatureBand(sdkFeatureBand) }; diff --git a/src/Tests/dotnet-workload-install.Tests/MockManifestProvider.cs b/src/Tests/dotnet-workload-install.Tests/MockManifestProvider.cs index 935fb9addfe8..ecfa11b0dfa9 100644 --- a/src/Tests/dotnet-workload-install.Tests/MockManifestProvider.cs +++ b/src/Tests/dotnet-workload-install.Tests/MockManifestProvider.cs @@ -7,19 +7,19 @@ namespace ManifestReaderTests { internal class MockManifestProvider : IWorkloadManifestProvider { - readonly (string name, string path, string featureBand)[] _manifests; + readonly (string name, string path, string manifestVersion, string featureBand)[] _manifests; public MockManifestProvider(params string[] manifestPaths) { _manifests = Array.ConvertAll(manifestPaths, mp => { string manifestId = Path.GetFileNameWithoutExtension(Path.GetDirectoryName(mp)); - return (manifestId, mp, (string)null); + return (manifestId, mp, (string)null, (string)null); }); SdkFeatureBand = new SdkFeatureBand("6.0.100"); } - public MockManifestProvider(params (string name, string path, string featureBand)[] manifests) + public MockManifestProvider(params (string name, string path, string manifestVersion, string featureBand)[] manifests) { _manifests = manifests; SdkFeatureBand = new SdkFeatureBand("6.0.100"); @@ -33,14 +33,14 @@ public void RefreshWorkloadManifests() { } public IEnumerable GetManifests() { - foreach ((var id, var path, var featureBand) in _manifests) + foreach ((var id, var path, var manifestVersion, var featureBand) in _manifests) { yield return new( id, Path.GetDirectoryName(path), path, featureBand ?? SdkFeatureBand.ToString(), - string.Empty, + manifestVersion, () => File.OpenRead(path), () => WorkloadManifestReader.TryOpenLocalizationCatalogForManifest(path) ); diff --git a/src/Tests/dotnet-workload-list.Tests/GivenDotnetWorkloadList.cs b/src/Tests/dotnet-workload-list.Tests/GivenDotnetWorkloadList.cs index b828a7a322d9..ee123d9cfa86 100644 --- a/src/Tests/dotnet-workload-list.Tests/GivenDotnetWorkloadList.cs +++ b/src/Tests/dotnet-workload-list.Tests/GivenDotnetWorkloadList.cs @@ -55,7 +55,7 @@ public void GivenWorkloadsAreInstalledListIsNotEmpty() _reporter.Clear(); var expectedWorkloads = new List() { new WorkloadId("mock-workload-1"), new WorkloadId("mock-workload-2"), new WorkloadId("mock-workload-3") }; var workloadInstaller = new MockWorkloadRecordRepo(expectedWorkloads); - var workloadResolver = WorkloadResolver.CreateForTests(new MockManifestProvider(("SampleManifest", _manifestPath, "6.0.100")), Directory.GetCurrentDirectory()); + var workloadResolver = WorkloadResolver.CreateForTests(new MockManifestProvider(("SampleManifest", _manifestPath, "5.0.0", "6.0.100")), Directory.GetCurrentDirectory()); var command = new WorkloadListCommand(_parseResult, _reporter, workloadInstaller, "6.0.100", workloadResolver: workloadResolver); command.Execute(); diff --git a/src/Tests/dotnet-workload-list.Tests/GivenWorkloadInstallerAndWorkloadsInstalled.cs b/src/Tests/dotnet-workload-list.Tests/GivenWorkloadInstallerAndWorkloadsInstalled.cs index c2bcb3c6ca8c..10cb1a62781a 100644 --- a/src/Tests/dotnet-workload-list.Tests/GivenWorkloadInstallerAndWorkloadsInstalled.cs +++ b/src/Tests/dotnet-workload-list.Tests/GivenWorkloadInstallerAndWorkloadsInstalled.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.CommandLine; +using System.Runtime.CompilerServices; +using ManifestReaderTests; using Microsoft.Deployment.DotNet.Releases; using Microsoft.DotNet.Cli.NuGetPackageDownloader; using Microsoft.DotNet.Cli.Workload.Install.Tests; @@ -23,7 +25,7 @@ public class GivenInstalledWorkloadAndManifestUpdater : SdkTest private WorkloadListCommand _workloadListCommand; private string _testDirectory; - private List _mockManifestUpdates; + private List<(TestManifestUpdate update, WorkloadCollection workloads)> _mockManifestUpdates; private MockNuGetPackageDownloader _nugetDownloader; private string _dotnetRoot; @@ -32,7 +34,12 @@ public GivenInstalledWorkloadAndManifestUpdater(ITestOutputHelper log) : base(lo { } - private void Setup(string identifier) + private IEnumerable GetManifestUpdatesForMock() + { + return _mockManifestUpdates.Select(u => new ManifestUpdateWithWorkloads(u.update.ToManifestVersionUpdate(), u.workloads)); + } + + private void Setup([CallerMemberName] string identifier = "") { _testDirectory = _testAssetsManager.CreateTestDirectory(identifier: identifier).Path; _dotnetRoot = Path.Combine(_testDirectory, "dotnet"); @@ -42,8 +49,10 @@ private void Setup(string identifier) _mockManifestUpdates = new() { new( - new ManifestVersionUpdate( + new TestManifestUpdate( new ManifestId("manifest1"), + new ManifestVersion(CurrentSdkVersion), + currentSdkFeatureBand.ToString(), new ManifestVersion(UpdateAvailableVersion), currentSdkFeatureBand.ToString()), new WorkloadCollection @@ -56,8 +65,10 @@ private void Setup(string identifier) WorkloadDefinitionKind.Dev, null, null, null) }), new( - new ManifestVersionUpdate( + new TestManifestUpdate( new ManifestId("manifest-other"), + new ManifestVersion(CurrentSdkVersion), + currentSdkFeatureBand.ToString(), new ManifestVersion("7.0.101"), currentSdkFeatureBand.ToString()), new WorkloadCollection @@ -68,8 +79,10 @@ private void Setup(string identifier) WorkloadDefinitionKind.Dev, null, null, null) }), new( - new ManifestVersionUpdate( + new TestManifestUpdate( new ManifestId("manifest-older-version"), + new ManifestVersion(CurrentSdkVersion), + currentSdkFeatureBand.ToString(), new ManifestVersion("6.0.100"), currentSdkFeatureBand.ToString()), new WorkloadCollection @@ -86,21 +99,31 @@ private void Setup(string identifier) "dotnet", "workload", "list", "--machine-readable", InstallingWorkloadCommandParser.VersionOption.Name, "7.0.100" }); + + var manifestProvider = new MockManifestProvider(_mockManifestUpdates.Select(u => + { + string manifestFile = Path.Combine(_testDirectory, u.update.ManifestId.ToString() + ".json"); + File.WriteAllText(manifestFile, GivenWorkloadManifestUpdater.GetManifestContent(u.update.ExistingVersion)); + return (u.update.ManifestId.ToString(), manifestFile, u.update.ExistingVersion.ToString(), u.update.ExistingFeatureBand.ToString()); + }).ToArray()); + var workloadResolver = WorkloadResolver.CreateForTests(manifestProvider, _dotnetRoot); + _workloadListCommand = new WorkloadListCommand( listParseResult, _reporter, nugetPackageDownloader: _nugetDownloader, - workloadManifestUpdater: new MockWorkloadManifestUpdater(_mockManifestUpdates), + workloadManifestUpdater: new MockWorkloadManifestUpdater(GetManifestUpdatesForMock()), userProfileDir: _testDirectory, currentSdkVersion: CurrentSdkVersion, dotnetDir: _dotnetRoot, - workloadRecordRepo: new MockMatchingFeatureBandInstallationRecordRepository()); + workloadRecordRepo: new MockMatchingFeatureBandInstallationRecordRepository(), + workloadResolver: workloadResolver); } [Fact] public void ItShouldGetAvailableUpdate() { - Setup(nameof(ItShouldGetAvailableUpdate)); + Setup(); WorkloadListCommand.UpdateAvailableEntry[] result = _workloadListCommand.GetUpdateAvailable(new List { new("xamarin-android") }).ToArray(); @@ -114,7 +137,7 @@ public void ItShouldGetAvailableUpdate() [Fact] public void ItShouldGetListOfWorkloadWithCurrentSdkVersionBand() { - Setup(nameof(ItShouldGetListOfWorkloadWithCurrentSdkVersionBand)); + Setup(); _workloadListCommand.Execute(); _reporter.Lines.Should().Contain(c => c.Contains("\"installed\":[\"xamarin-android\"]")); } @@ -129,7 +152,7 @@ public void GivenLowerTargetVersionItShouldThrow() }), _reporter, nugetPackageDownloader: _nugetDownloader, - workloadManifestUpdater: new MockWorkloadManifestUpdater(_mockManifestUpdates), + workloadManifestUpdater: new MockWorkloadManifestUpdater(null), userProfileDir: _testDirectory, currentSdkVersion: CurrentSdkVersion, dotnetDir: _dotnetRoot, @@ -149,7 +172,7 @@ public void GivenSameLowerTargetVersionBandItShouldNotThrow() }), _reporter, nugetPackageDownloader: _nugetDownloader, - workloadManifestUpdater: new MockWorkloadManifestUpdater(_mockManifestUpdates), + workloadManifestUpdater: new MockWorkloadManifestUpdater(null), userProfileDir: _testDirectory, currentSdkVersion: "6.0.101", dotnetDir: _dotnetRoot, From 175eccfbed839c30403cc172cb8392069ab9e705 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 27 Jun 2024 12:59:28 +0000 Subject: [PATCH 087/159] Update dependencies from https://github.com/microsoft/vstest build 20240617.2 Microsoft.NET.Test.Sdk , Microsoft.TestPlatform.Build , Microsoft.TestPlatform.CLI From Version 17.10.0-release-24272-11 -> To Version 17.10.0-release-24317-02 --- NuGet.config | 1 + 1 file changed, 1 insertion(+) diff --git a/NuGet.config b/NuGet.config index dc29aad8cfa6..600ebd405c65 100644 --- a/NuGet.config +++ b/NuGet.config @@ -24,6 +24,7 @@ + From 3a476a43469c16270f7193129ecf80d64e43986a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 27 Jun 2024 13:00:01 +0000 Subject: [PATCH 088/159] Update dependencies from https://github.com/dotnet/razor build 20240626.2 Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal , Microsoft.CodeAnalysis.Razor.Tooling.Internal , Microsoft.NET.Sdk.Razor.SourceGenerators.Transport From Version 7.0.0-preview.24312.2 -> To Version 7.0.0-preview.24326.2 --- NuGet.config | 1 + 1 file changed, 1 insertion(+) diff --git a/NuGet.config b/NuGet.config index dc29aad8cfa6..600ebd405c65 100644 --- a/NuGet.config +++ b/NuGet.config @@ -24,6 +24,7 @@ + From ec137df7c1732a396e947ec405ddf1345f184c5d Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 27 Jun 2024 13:02:02 +0000 Subject: [PATCH 089/159] Update dependencies from https://github.com/dotnet/roslyn build 20240624.8 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.10.0-3.24312.19 -> To Version 4.10.0-3.24324.8 --- NuGet.config | 1 + 1 file changed, 1 insertion(+) diff --git a/NuGet.config b/NuGet.config index dc29aad8cfa6..600ebd405c65 100644 --- a/NuGet.config +++ b/NuGet.config @@ -24,6 +24,7 @@ + From f032397b4b03920a624ce4be102a5fc296e58f79 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 27 Jun 2024 13:02:37 +0000 Subject: [PATCH 090/159] Update dependencies from https://github.com/dotnet/templating build 20240614.2 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.303-servicing.24311.4 -> To Version 8.0.303-servicing.24314.2 From 9a16d862433533c1011ad81ccf52d6dc49041141 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 27 Jun 2024 13:04:18 +0000 Subject: [PATCH 091/159] Update dependencies from https://github.com/dotnet/arcade build 20240624.7 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 8.0.0-beta.24311.3 -> To Version 8.0.0-beta.24324.7 --- NuGet.config | 1 + 1 file changed, 1 insertion(+) diff --git a/NuGet.config b/NuGet.config index dc29aad8cfa6..600ebd405c65 100644 --- a/NuGet.config +++ b/NuGet.config @@ -24,6 +24,7 @@ + From d2f4e3ab22a77842b5f1a261b9ffe7b2310c482a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 27 Jun 2024 13:12:40 +0000 Subject: [PATCH 092/159] Update dependencies from https://github.com/dotnet/templating build 20240625.1 Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.400-preview.24323.2 -> To Version 8.0.400-preview.24325.1 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ff4d9969038c..a387bad613ee 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,14 +1,14 @@ - + https://github.com/dotnet/templating - c68e4f05df35fa2d63c32b4060b3613eddb95f73 + f97ccd7d748efacdf443b8c768233f593e7c86e2 - + https://github.com/dotnet/templating - c68e4f05df35fa2d63c32b4060b3613eddb95f73 + f97ccd7d748efacdf443b8c768233f593e7c86e2 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 14b3eab4db5f..8220b667eec6 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -138,13 +138,13 @@ - 8.0.400-preview.24323.2 + 8.0.400-preview.24325.1 $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 8.0.400-preview.24323.2 + 8.0.400-preview.24325.1 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion) From f13e44093df3430a988874a2074843649e49cb40 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 27 Jun 2024 13:13:07 +0000 Subject: [PATCH 093/159] Update dependencies from https://github.com/dotnet/roslyn build 20240627.2 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.11.0-3.24324.9 -> To Version 4.11.0-3.24327.2 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ff4d9969038c..ffd89868d612 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -78,34 +78,34 @@ 32b81fa7a51d0fa630b534ead8ded8c7432f2c2b - + https://github.com/dotnet/roslyn - b6addf73b05b2c7cf54db037f6f37054dfa59cba + f497fcbe69a78a7dda6b4eca50e8a1b9a636a207 - + https://github.com/dotnet/roslyn - b6addf73b05b2c7cf54db037f6f37054dfa59cba + f497fcbe69a78a7dda6b4eca50e8a1b9a636a207 - + https://github.com/dotnet/roslyn - b6addf73b05b2c7cf54db037f6f37054dfa59cba + f497fcbe69a78a7dda6b4eca50e8a1b9a636a207 - + https://github.com/dotnet/roslyn - b6addf73b05b2c7cf54db037f6f37054dfa59cba + f497fcbe69a78a7dda6b4eca50e8a1b9a636a207 - + https://github.com/dotnet/roslyn - b6addf73b05b2c7cf54db037f6f37054dfa59cba + f497fcbe69a78a7dda6b4eca50e8a1b9a636a207 - + https://github.com/dotnet/roslyn - b6addf73b05b2c7cf54db037f6f37054dfa59cba + f497fcbe69a78a7dda6b4eca50e8a1b9a636a207 - + https://github.com/dotnet/roslyn - b6addf73b05b2c7cf54db037f6f37054dfa59cba + f497fcbe69a78a7dda6b4eca50e8a1b9a636a207 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 14b3eab4db5f..42cf4d51385e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -155,13 +155,13 @@ - 4.11.0-3.24324.9 - 4.11.0-3.24324.9 - 4.11.0-3.24324.9 - 4.11.0-3.24324.9 - 4.11.0-3.24324.9 - 4.11.0-3.24324.9 - 4.11.0-3.24324.9 + 4.11.0-3.24327.2 + 4.11.0-3.24327.2 + 4.11.0-3.24327.2 + 4.11.0-3.24327.2 + 4.11.0-3.24327.2 + 4.11.0-3.24327.2 + 4.11.0-3.24327.2 $(MicrosoftNetCompilersToolsetPackageVersion) From f45498b831eba7bf87a4c4c106da8890bec89c8f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 27 Jun 2024 13:13:39 +0000 Subject: [PATCH 094/159] Update dependencies from https://github.com/dotnet/msbuild build 20240627.1 Microsoft.SourceBuild.Intermediate.msbuild , Microsoft.Build , Microsoft.Build.Localization From Version 17.11.1-preview-24321-02 -> To Version 17.11.2-preview-24327-01 --- NuGet.config | 2 +- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/NuGet.config b/NuGet.config index fbdb73f29cb2..05f88793cd03 100644 --- a/NuGet.config +++ b/NuGet.config @@ -14,7 +14,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ff4d9969038c..28fdb4f45cff 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -51,17 +51,17 @@ https://github.com/dotnet/emsdk 71359b18c2d83c01a68bf155244a65962a7e8c8e - + https://github.com/dotnet/msbuild - 000df9aed1ef6d5f01dc7f1400cae163295d531f + c078802d41fa1f406f1dd76a89720abbf48cb22f - + https://github.com/dotnet/msbuild - 000df9aed1ef6d5f01dc7f1400cae163295d531f + c078802d41fa1f406f1dd76a89720abbf48cb22f - + https://github.com/dotnet/msbuild - 000df9aed1ef6d5f01dc7f1400cae163295d531f + c078802d41fa1f406f1dd76a89720abbf48cb22f diff --git a/eng/Versions.props b/eng/Versions.props index 14b3eab4db5f..3b0a97e600d2 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -121,7 +121,7 @@ - 17.11.1 + 17.11.2 $(MicrosoftBuildPackageVersion) - 9.0.0-preview.24325.5 - 9.0.0-preview.24325.5 - 9.0.0-preview.24325.5 + 9.0.0-preview.24327.2 + 9.0.0-preview.24327.2 + 9.0.0-preview.24327.2 From 708f383ec8dd45d122ed6ab15712648d0981fcdd Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Thu, 27 Jun 2024 14:03:03 -0400 Subject: [PATCH 096/159] Add tests for --skip-manifest-update, switch to robocopy for VM directory copy --- .../Framework/VirtualMachine.cs | 22 +----- .../WorkloadSetTests.cs | 74 +++++++++++++++---- 2 files changed, 61 insertions(+), 35 deletions(-) diff --git a/src/Tests/dotnet-MsiInstallation.Tests/Framework/VirtualMachine.cs b/src/Tests/dotnet-MsiInstallation.Tests/Framework/VirtualMachine.cs index 844a1802e7d7..d22de7ecce86 100644 --- a/src/Tests/dotnet-MsiInstallation.Tests/Framework/VirtualMachine.cs +++ b/src/Tests/dotnet-MsiInstallation.Tests/Framework/VirtualMachine.cs @@ -360,7 +360,9 @@ VMActionResult Run(SerializedVMAction action) { var targetSharePath = VMPathToSharePath(action.TargetPath); - CopyDirectory(action.SourcePath, targetSharePath); + var result = new RunExeCommand(Log, "robocopy", action.SourcePath, targetSharePath, "/mir") + .Execute() + .ExitCode.Should().BeLessThan(8); // Robocopy error exit codes are 8 or higher return VMActionResult.Success(); } @@ -471,24 +473,6 @@ void ProcessDirectory(DirectoryInfo dir, string relativeTo) return sb.ToString(); } - static void CopyDirectory(string sourcePath, string destPath) - { - if (!Directory.Exists(destPath)) - { - Directory.CreateDirectory(destPath); - } - - foreach (var dir in Directory.GetDirectories(sourcePath)) - { - CopyDirectory(dir, Path.Combine(destPath, Path.GetFileName(dir))); - } - - foreach (var file in Directory.GetFiles(sourcePath)) - { - new FileInfo(file).CopyTo(Path.Combine(destPath, Path.GetFileName(file)), true); - } - } - string VMPathToSharePath(string vmPath) { var dirInfo = new DirectoryInfo(vmPath); diff --git a/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs b/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs index 227814d1f3ec..a9044ce59d58 100644 --- a/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs +++ b/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs @@ -3,16 +3,20 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.DotNet.MsiInstallerTests.Framework; using Microsoft.NET.Sdk.WorkloadManifestReader; +using Microsoft.TemplateEngine.Abstractions.Mount; namespace Microsoft.DotNet.MsiInstallerTests { public class WorkloadSetTests : VMTestBase { + readonly string SdkTestingDirectory = @"C:\SdkTesting"; + public WorkloadSetTests(ITestOutputHelper log) : base(log) { } @@ -218,25 +222,23 @@ public void UpdateToWorkloadSetVersionWithManifestsNotAvailable() GetWorkloadVersion().Should().Be(workloadVersionBeforeUpdate); } - [Fact] - public void UpdateWorkloadSetViaGlobalJson() + void SetupWorkloadSetInGlobalJson(out WorkloadSet originalRollback) { InstallSdk(); var versionToUpdateTo = "8.0.300-preview.0.24217.2"; - var directory = "C:\\SdkTesting"; string originalVersion = GetWorkloadVersion(); - var rollback = GetRollback(directory); + originalRollback = GetRollback(SdkTestingDirectory); VM.WriteFile("C:\\SdkTesting\\global.json", @$"{{""sdk"":{{""workloadVersion"":""{versionToUpdateTo}""}}}}").Execute().Should().Pass(); - GetWorkloadVersion(directory).Should().Be(versionToUpdateTo); + GetWorkloadVersion(SdkTestingDirectory).Should().Be(versionToUpdateTo); // The version should have changed but not yet the manifests. Since we expect both, getting the rollback should fail. var result = VM.CreateRunCommand("dotnet", "workload", "update", "--print-rollback") - .WithWorkingDirectory(directory) + .WithWorkingDirectory(SdkTestingDirectory) .WithIsReadOnly(true) .Execute(); @@ -244,23 +246,52 @@ public void UpdateWorkloadSetViaGlobalJson() result.StdErr.Should().Contain("FileNotFoundException"); result.StdErr.Should().Contain(versionToUpdateTo); - AddNuGetSource(@"C:\SdkTesting\workloadsets", directory); + AddNuGetSource(@"C:\SdkTesting\workloadsets", SdkTestingDirectory); + + } - VM.CreateRunCommand("dotnet", "workload", "update").WithWorkingDirectory(directory).Execute().Should().Pass(); + [Fact] + public void UpdateWorkloadSetViaGlobalJson() + { + SetupWorkloadSetInGlobalJson(out var originalRollback); - GetRollback(directory).Should().NotBe(rollback); + VM.CreateRunCommand("dotnet", "workload", "update").WithWorkingDirectory(SdkTestingDirectory).Execute().Should().Pass(); + GetRollback(SdkTestingDirectory).Should().NotBe(originalRollback); } - string GetWorkloadVersion(string workingDirectory = null) + [Fact] + public void InstallWorkloadSetViaGlobalJson() { - var result = VM.CreateRunCommand("dotnet", "workload", "--version") - .WithWorkingDirectory(workingDirectory) - .WithIsReadOnly(true) - .Execute(); + SetupWorkloadSetInGlobalJson(out var originalRollback); - result.Should().Pass(); + VM.CreateRunCommand("dotnet", "workload", "install", "aspire") + .WithWorkingDirectory(SdkTestingDirectory) + .Execute().Should().Pass(); - return result.StdOut; + GetRollback(SdkTestingDirectory).Should().NotBe(originalRollback); + } + + [Fact] + public void InstallWithGlobalJsonAndSkipManifestUpdate() + { + SetupWorkloadSetInGlobalJson(out var originalRollback); + + VM.CreateRunCommand("dotnet", "workload", "install", "aspire", "--skip-manifest-update") + .WithWorkingDirectory(SdkTestingDirectory) + .Execute().Should().Fail() + .And.HaveStdErrContaining("--skip-manifest-update") + .And.HaveStdErrContaining(Path.Combine(SdkTestingDirectory, "global.json")); + } + + [Fact] + public void InstallWithVersionAndSkipManifestUpdate() + { + InstallSdk(); + + VM.CreateRunCommand("dotnet", "workload", "install", "aspire", "--skip-manifest-update", "--version", "8.0.300-preview.0.24178.1") + .Execute().Should().Fail() + .And.HaveStdErrContaining("--skip-manifest-update") + .And.HaveStdErrContaining("--sdk-version"); } [Fact] @@ -305,6 +336,17 @@ public void TurnOffWorkloadSetUpdateMode() throw new NotImplementedException(); } + string GetWorkloadVersion(string workingDirectory = null) + { + var result = VM.CreateRunCommand("dotnet", "workload", "--version") + .WithWorkingDirectory(workingDirectory) + .WithIsReadOnly(true) + .Execute(); + + result.Should().Pass(); + + return result.StdOut; + } string GetUpdateMode() { var result = VM.CreateRunCommand("dotnet", "workload", "config", "--update-mode") From 904eb6406022212f6acebc900dbd013160344644 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Thu, 27 Jun 2024 14:04:35 -0400 Subject: [PATCH 097/159] Fix issue garbage collecting cross-feature band workload set, add errors for combinations with skip manifest update --- .../commands/InstallingWorkloadCommand.cs | 7 ++-- .../install/LocalizableStrings.resx | 7 ++++ .../install/WorkloadGarbageCollector.cs | 1 + .../install/WorkloadInstallCommand.cs | 30 +++++++--------- .../install/xlf/LocalizableStrings.cs.xlf | 10 ++++++ .../install/xlf/LocalizableStrings.de.xlf | 10 ++++++ .../install/xlf/LocalizableStrings.es.xlf | 10 ++++++ .../install/xlf/LocalizableStrings.fr.xlf | 10 ++++++ .../install/xlf/LocalizableStrings.it.xlf | 10 ++++++ .../install/xlf/LocalizableStrings.ja.xlf | 10 ++++++ .../install/xlf/LocalizableStrings.ko.xlf | 10 ++++++ .../install/xlf/LocalizableStrings.pl.xlf | 10 ++++++ .../install/xlf/LocalizableStrings.pt-BR.xlf | 10 ++++++ .../install/xlf/LocalizableStrings.ru.xlf | 10 ++++++ .../install/xlf/LocalizableStrings.tr.xlf | 10 ++++++ .../xlf/LocalizableStrings.zh-Hans.xlf | 10 ++++++ .../xlf/LocalizableStrings.zh-Hant.xlf | 10 ++++++ .../SdkDirectoryWorkloadManifestProvider.cs | 36 +++++++++++++++---- 18 files changed, 184 insertions(+), 27 deletions(-) diff --git a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs index c451f9e6f3e2..8a0ae321c37f 100644 --- a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs +++ b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs @@ -36,6 +36,7 @@ internal abstract class InstallingWorkloadCommand : WorkloadCommandBase protected readonly ReleaseVersion _targetSdkVersion; protected readonly string _fromRollbackDefinition; protected string _workloadSetVersionFromCommandLine; + protected string _globalJsonPath; protected string _workloadSetVersionFromGlobalJson; protected readonly PackageSourceLocation _packageSourceLocation; protected readonly IWorkloadResolverFactory _workloadResolverFactory; @@ -99,12 +100,12 @@ public InstallingWorkloadCommand( _workloadInstallerFromConstructor = workloadInstaller; _workloadManifestUpdaterFromConstructor = workloadManifestUpdater; - var globaljsonPath = SdkDirectoryWorkloadManifestProvider.GetGlobalJsonPath(Environment.CurrentDirectory); - _workloadSetVersionFromGlobalJson = SdkDirectoryWorkloadManifestProvider.GlobalJsonReader.GetWorkloadVersionFromGlobalJson(globaljsonPath); + _globalJsonPath = SdkDirectoryWorkloadManifestProvider.GetGlobalJsonPath(Environment.CurrentDirectory); + _workloadSetVersionFromGlobalJson = SdkDirectoryWorkloadManifestProvider.GlobalJsonReader.GetWorkloadVersionFromGlobalJson(_globalJsonPath); if (SpecifiedWorkloadSetVersionInGlobalJson && (SpecifiedWorkloadSetVersionOnCommandLine || UseRollback)) { - throw new GracefulException(string.Format(Strings.CannotSpecifyVersionOnCommandLineAndInGlobalJson, globaljsonPath), isUserError: true); + throw new GracefulException(string.Format(Strings.CannotSpecifyVersionOnCommandLineAndInGlobalJson, _globalJsonPath), isUserError: true); } if (SpecifiedWorkloadSetVersionOnCommandLine && UseRollback) diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx index 500e51ef5d43..909c5133902d 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx +++ b/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx @@ -322,6 +322,13 @@ Cannot use the {0} and {1} options together. If installing from a rollback file, remove {0}. Otherwise, remove {1} + + Cannot use the {0} and {1} options together. Remove one of the options. + + + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + "workloadVersion" is a literal value and should not be translated. + Skip signature verification of workload packages and installers. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadGarbageCollector.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadGarbageCollector.cs index 88f0bda5a856..62d7e16cac48 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadGarbageCollector.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadGarbageCollector.cs @@ -77,6 +77,7 @@ void GarbageCollectWorkloadSets() foreach (var set in installedWorkloadSets.Keys) { WorkloadSetsToKeep.Add(set); + _verboseReporter.WriteLine($"GC: Keeping workload set version {set} because workload set GC isn't implemented yet."); } var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkFeatureBand, _dotnetDir), "default.json"); diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs index e4b076e0d0ff..f6ba35d2ecb9 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs @@ -43,8 +43,6 @@ public WorkloadInstallCommand( _workloadManifestUpdater = _workloadManifestUpdaterFromConstructor ?? new WorkloadManifestUpdater(Reporter, _workloadResolver, PackageDownloader, _userProfileDir, _workloadInstaller.GetWorkloadInstallationRecordRepository(), _workloadInstaller, _packageSourceLocation, displayManifestUpdates: Verbosity.IsDetailedOrDiagnostic()); - - } private void ValidateWorkloadIdsInput() @@ -108,32 +106,28 @@ public override int Execute() WorkloadInstallCommandParser.SkipManifestUpdateOption.Name, InstallingWorkloadCommandParser.FromRollbackFileOption.Name, WorkloadInstallCommandParser.SkipManifestUpdateOption.Name, InstallingWorkloadCommandParser.FromRollbackFileOption.Name), isUserError: true); } + else if (_skipManifestUpdate && SpecifiedWorkloadSetVersionOnCommandLine) + { + throw new GracefulException(string.Format(LocalizableStrings.CannotCombineSkipManifestAndVersion, + WorkloadInstallCommandParser.SkipManifestUpdateOption.Name, InstallingWorkloadCommandParser.VersionOption.Name), isUserError: true); + } + else if (_skipManifestUpdate && SpecifiedWorkloadSetVersionInGlobalJson) + { + throw new GracefulException(string.Format(LocalizableStrings.CannotUseSkipManifestWithGlobalJsonWorkloadVersion, + WorkloadInstallCommandParser.SkipManifestUpdateOption.Name, _globalJsonPath), isUserError: true); + } else { - bool shouldUpdateWorkloads = !_skipManifestUpdate; - try { // Normally we want to validate that the workload IDs specified were valid. However, if there is a global.json file with a workload - // set version specified, and we might update the workload version, then we don't do that check here, because we might not have the right + // set version specified, and we might install that workload version, then we don't do that check here, because we might not have the right // workload set installed yet, and trying to list the available workloads would throw an error - if (!shouldUpdateWorkloads || string.IsNullOrEmpty(_workloadSetVersionFromGlobalJson)) + if (_skipManifestUpdate || string.IsNullOrEmpty(_workloadSetVersionFromGlobalJson)) { ValidateWorkloadIdsInput(); } - if (string.IsNullOrWhiteSpace(_workloadSetVersionFromCommandLine) && string.IsNullOrWhiteSpace(_workloadSetVersionFromGlobalJson)) - { - var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkFeatureBand, _dotnetPath), "default.json"); - var installStateContents = InstallStateContents.FromPath(installStateFilePath); - // If install state has pinned workload set or manifest versions, then don't update workloads - if (!string.IsNullOrEmpty(installStateContents.WorkloadVersion) || installStateContents.Manifests != null) - { - // TODO: respect shouldUpdateWorkloads, or figure out update / install manifest difference in InstallingWorkloadCommand - shouldUpdateWorkloads = false; - } - } - Reporter.WriteLine(); DirectoryPath? offlineCache = string.IsNullOrWhiteSpace(_fromCacheOption) ? null : new DirectoryPath(_fromCacheOption); diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf index e2c56ec45854..30fa15896748 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf @@ -22,11 +22,21 @@ Možnosti {0} a {1} nelze použít společně. Při instalaci ze souboru vráceného zpět odeberte {0}. V opačném případě odeberte {1}. + + Cannot use the {0} and {1} options together. Remove one of the options. + Cannot use the {0} and {1} options together. Remove one of the options. + + Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update." Na příkazovém řádku nelze pomocí možnosti --version nebo --from-history zadat konkrétní verzi úlohy, pokud je již verze zadána v souboru global.json {0}. Pokud chcete aktualizovat globálně nainstalovanou verzi úlohy, spusťte příkaz mimo cestu obsahující daný soubor global.json nebo aktualizujte verzi uvedenou v souboru global.json a spusťte příkaz dotnet workload update. + + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + "workloadVersion" is a literal value and should not be translated. + Checking for updated workload version. Kontrolují se aktualizované manifesty úloh. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf index 1e9e0de29a3a..ca7f5a788f58 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf @@ -22,11 +22,21 @@ Die Optionen {0} und {1} können nicht zusammen verwendet werden. Entfernen Sie bei der Installation aus einer Rollbackdatei {0}. Entfernen Sie andernfalls {1} + + Cannot use the {0} and {1} options together. Remove one of the options. + Cannot use the {0} and {1} options together. Remove one of the options. + + Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update." Eine bestimmte Workload-Version kann in der Befehlszeile nicht über „--version“ oder „--from-history“ angegeben werden, wenn bereits eine Version in der global.json-Datei „{0}“ angegeben ist. Um die global installierte Workload-Version zu aktualisieren, führen Sie den Befehl außerhalb des Pfads aus, der diese global.json-Datei enthält, oder aktualisieren Sie die in der global.json Datei angegebene Version, und führen Sie „dotnet workload update“ aus. + + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + "workloadVersion" is a literal value and should not be translated. + Checking for updated workload version. Es wird nach aktualisierten Workloadmanifesten gesucht. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf index 7760a645dc6c..73b913d663bc 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf @@ -22,11 +22,21 @@ No se pueden usar las opciones {0} y {1} juntas. Si se instala desde un archivo de reversión, quite {0}. De lo contrario, quite {1} + + Cannot use the {0} and {1} options together. Remove one of the options. + Cannot use the {0} and {1} options together. Remove one of the options. + + Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update." No se puede especificar una versión de carga de trabajo determinada en la línea de comandos mediante --version o --from-history cuando ya hay una versión especificada en el archivo global.json {0}. Para actualizar la versión de carga de trabajo instalada globalmente, ejecute el comando fuera de la ruta de acceso que contiene ese archivo global.json o actualice la versión especificada en el archivo global.json y ejecute "dotnet workload update". + + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + "workloadVersion" is a literal value and should not be translated. + Checking for updated workload version. Comprobando si hay manifiestos de carga de trabajo actualizados. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf index a312d7c22200..2d3e647a3496 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf @@ -22,11 +22,21 @@ Impossible d’utiliser les options {0} et {1} ensemble. Si vous installez à partir d’un fichier de restauration, supprimez {0}. Sinon, supprimez {1}. + + Cannot use the {0} and {1} options together. Remove one of the options. + Cannot use the {0} and {1} options together. Remove one of the options. + + Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update." Impossible de spécifier une version de charge de travail particulière sur la ligne de commande via --version ou --from-history lorsqu’une version est déjà spécifiée dans global.json fichier {0}. Pour mettre à jour la version de la charge de travail installée globalement, exécutez la commande en dehors du chemin contenant ce fichier global.json ou mettez à jour la version spécifiée dans le fichier global.json et exécutez « dotnet workload update » + + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + "workloadVersion" is a literal value and should not be translated. + Checking for updated workload version. Recherche de manifestes de charge de travail mis à jour diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf index 62339cd0d32e..3a8a532effa9 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf @@ -22,11 +22,21 @@ Impossibile utilizzare contemporaneamente le opzioni {0} e {1}. Se si esegue l'installazione da un file di rollback, rimuovere {0}. In caso contrario, rimuovere {1} + + Cannot use the {0} and {1} options together. Remove one of the options. + Cannot use the {0} and {1} options together. Remove one of the options. + + Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update." Impossibile specificare una determinata versione del carico di lavoro nella riga di comando tramite --version o --from-history quando è già specificata una versione nel file global.json {0}. Per aggiornare la versione del carico di lavoro installata a livello globale, eseguire il comando all'esterno del percorso contenente tale file global.json o aggiornare la versione specificata nel file di global.json ed eseguire "dotnet workload update". + + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + "workloadVersion" is a literal value and should not be translated. + Checking for updated workload version. Verifica della disponibilità di manifesti del carico di lavoro aggiornati. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf index 84945a253538..980b166feb29 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf @@ -22,11 +22,21 @@ {0} オプションと {1} オプションを併用することはできません。ロールバック ファイルからインストールする場合、{0} を削除してください。その他の場合には、{1} を削除します + + Cannot use the {0} and {1} options together. Remove one of the options. + Cannot use the {0} and {1} options together. Remove one of the options. + + Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update." global.json ファイル {0} に既にバージョンが指定されている場合は、コマンド ラインで --version または --from-history を使用して特定のワークロード バージョンを指定することはできません。グローバルにインストールされたワークロード バージョンを更新するには、その global.json ファイルを含むパスの外部でコマンドを実行するか、global.json ファイルで指定されたバージョンを更新して、"dotnet workload update" を実行します。 + + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + "workloadVersion" is a literal value and should not be translated. + Checking for updated workload version. 更新されたワークロード マニフェストを確認しています。 diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf index 7d8c27506450..660a64fa9a1b 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf @@ -22,11 +22,21 @@ {0} 및 {1} 옵션을 함께 사용할 수 없습니다. 롤백 파일에서 설치하는 경우 {0}을(를) 제거합니다. 그렇지 않으면 {1}을(를) 제거합니다. + + Cannot use the {0} and {1} options together. Remove one of the options. + Cannot use the {0} and {1} options together. Remove one of the options. + + Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update." global.json 파일 {0}에 지정된 버전이 이미 있는 경우 --version 또는 --from-history를 통해 명령줄에서 특정 워크로드 버전을 지정할 수 없습니다. 전역으로 설치된 워크로드 버전을 업데이트하려면 해당 global.json 파일이 포함된 경로 외부에서 명령을 실행하거나 global.json 파일에 지정된 버전을 업데이트하고 "dotnet 워크로드 업데이트"를 실행합니다. + + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + "workloadVersion" is a literal value and should not be translated. + Checking for updated workload version. 업데이트된 워크로드 매니페스트를 확인하는 중입니다. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf index f018cfde3825..e0a2896c3df7 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf @@ -22,11 +22,21 @@ Nie można jednocześnie używać poleceń {0} i {1}. W przypadku instalowania z pliku wycofywania usuń polecenie {0}. W przeciwnym razie usuń polecenie {1} + + Cannot use the {0} and {1} options together. Remove one of the options. + Cannot use the {0} and {1} options together. Remove one of the options. + + Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update." Nie można określić określonej wersji obciążenia w wierszu polecenia za pomocą opcji --version lub --from-history, jeśli istnieje już wersja określona w pliku global.json {0}. Aby zaktualizować wersję obciążenia zainstalowaną globalnie, uruchom polecenie poza ścieżką zawierającą ten plik global.json lub zaktualizuj wersję określoną w pliku global.json i uruchom polecenie „dotnet workload update”. + + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + "workloadVersion" is a literal value and should not be translated. + Checking for updated workload version. Sprawdzanie zaktualizowanych manifestów obciążenia. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf index 8aadcd19cc54..33c7064592a7 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf @@ -22,11 +22,21 @@ Não é possível usar as opções {0} e {1} juntas. Se estiver instalando a partir de um arquivo de reversão, remova {0}. Caso contrário, remova {1} + + Cannot use the {0} and {1} options together. Remove one of the options. + Cannot use the {0} and {1} options together. Remove one of the options. + + Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update." Não é possível especificar uma versão específica da carga de trabalho na linha de comando por meio de --version ou --from-history quando já existe uma versão especificada no arquivo global.json {0}. Para atualizar a versão da carga de trabalho instalada globalmente, execute o comando fora do caminho que contém o arquivo global.json ou atualize a versão especificada no arquivo global.json e execute "dotnet workload update". + + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + "workloadVersion" is a literal value and should not be translated. + Checking for updated workload version. Verificando manifestos de carga de trabalho atualizados. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf index 9f568f050ddf..4aa011a199f0 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf @@ -22,11 +22,21 @@ Невозможно использовать параметры {0} и {1} одновременно. При установке из файла отката удалите {0}, в противном случае удалите {1}. + + Cannot use the {0} and {1} options together. Remove one of the options. + Cannot use the {0} and {1} options together. Remove one of the options. + + Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update." Невозможно указать конкретную версию рабочей нагрузки в командной строке с помощью --version или --from-history, если в файле global.json уже указана версия {0}. Чтобы обновить глобально установленную версию рабочей нагрузки, выполните команду вне пути, содержащего этот файл global.json, либо измените версию в файле global.json и выполните команду "dotnet workload update". + + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + "workloadVersion" is a literal value and should not be translated. + Checking for updated workload version. Проверка обновленных манифестов рабочей нагрузки. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf index c6f3d08750ab..caf75afd3d30 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf @@ -22,11 +22,21 @@ {0} ve {1} seçenekleri birlikte kullanılamıyor. Bir geri alma dosyasından yükleniyorsa {0} seçeneğini kaldırın. Aksi takdirde, {1} seçeneğini kaldırın + + Cannot use the {0} and {1} options together. Remove one of the options. + Cannot use the {0} and {1} options together. Remove one of the options. + + Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update." {0} global.json dosyasında zaten belirtilen bir sürüm varsa, “--version” veya “--from-history” aracılığıyla komut satırında belirli bir iş yükü sürümü belirtilemez. Genel olarak yüklenen iş yükü sürümünü güncelleştirmek için, komutu global.json dosyasını içeren yolun dışında çalıştırın veya global.json dosyasında belirtilen sürümü güncelleştirin ve “dotnet workload update” komutunu çalıştırın. + + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + "workloadVersion" is a literal value and should not be translated. + Checking for updated workload version. Güncelleştirilmiş iş yükü bildirimleri denetleniyor. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf index 91c33969cd8f..2bae6fd95cee 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf @@ -22,11 +22,21 @@ 不能同时使用 {0} 和 {1} 选项。如果从回滚文件安装,请删除 {0}。否则,请删除 {1} + + Cannot use the {0} and {1} options together. Remove one of the options. + Cannot use the {0} and {1} options together. Remove one of the options. + + Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update." 当 global.json 文件 {0} 中已指定版本时,无法在命令行上通过 --version 或 --from-history 指定特定工作负载版本。若要更新全局安装的工作负载版本,请在包含该 global.json 文件的路径外部运行命令,或者更新 global.json 文件中指定的版本,然后运行 "dotnet workload update"。 + + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + "workloadVersion" is a literal value and should not be translated. + Checking for updated workload version. 正在检查更新的工作负载清单。 diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf index cb17ece5b2e7..64e13a795f62 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf @@ -22,11 +22,21 @@ 無法同時使用 {0} 與 {1} 選項。如果從復原檔案安裝,請移除 {0}。否則,請移除 {1} + + Cannot use the {0} and {1} options together. Remove one of the options. + Cannot use the {0} and {1} options together. Remove one of the options. + + Cannot specify a particular workload version on the command line via --version or --from-history when there is already a version specified in global.json file {0}. To update the globally installed workload version, run the command outside of the path containing that global.json file or update the version specified in the global.json file and run "dotnet workload update." 當 global.json 檔案 {0} 中已指定版本時,無法在命令列上透過 --version 或 --from-history 指定特定工作負載版本。若要更新全域安裝的工作負載版本,請在包含該 global.json 檔案的路徑外執行命令,或更新 global.json 檔案中指定的版本,然後執行 "dotnet workload update"。 + + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + "workloadVersion" is a literal value and should not be translated. + Checking for updated workload version. 正在檢查更新的工作負載資訊清單。 diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs index e9a0750301a6..f46af199399b 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs @@ -122,7 +122,7 @@ public void RefreshWorkloadManifests() _manifestsFromInstallState = null; _installStateFilePath = null; _useManifestsFromInstallState = true; - var availableWorkloadSets = GetAvailableWorkloadSets(); + var availableWorkloadSets = GetAvailableWorkloadSets(_sdkVersionBand); bool TryGetWorkloadSet(string workloadSetVersion, out WorkloadSet? workloadSet) { @@ -491,29 +491,53 @@ void ProbeDirectory(string manifestDirectory, string featureBand) /// public Dictionary GetAvailableWorkloadSets() { - return GetAvailableWorkloadSets(_sdkVersionBand); + return GetAvailableWorkloadSetsInternal(null); } public Dictionary GetAvailableWorkloadSets(SdkFeatureBand workloadSetFeatureBand) + { + return GetAvailableWorkloadSetsInternal(workloadSetFeatureBand); + } + + Dictionary GetAvailableWorkloadSetsInternal(SdkFeatureBand? workloadSetFeatureBand) { // How to deal with cross-band workload sets? Dictionary availableWorkloadSets = new Dictionary(); foreach (var manifestRoot in _manifestRoots.Reverse()) { - var workloadSetsRoot = Path.Combine(manifestRoot, workloadSetFeatureBand.ToString(), WorkloadSetsFolderName); + if (workloadSetFeatureBand != null) + { + // Get workload sets for specific feature band + var featureBandDirectory = Path.Combine(manifestRoot, workloadSetFeatureBand.Value.ToString()); + AddWorkloadSetsForFeatureBand(availableWorkloadSets, featureBandDirectory); + } + else + { + // Get workload sets for all feature bands + foreach (var featureBandDirectory in Directory.GetDirectories(manifestRoot)) + { + AddWorkloadSetsForFeatureBand(availableWorkloadSets, featureBandDirectory); + } + } + } + + return availableWorkloadSets; + + static void AddWorkloadSetsForFeatureBand(Dictionary availableWorkloadSets, string featureBandDirectory) + { + var featureBand = new SdkFeatureBand(Path.GetFileName(featureBandDirectory)); + var workloadSetsRoot = Path.Combine(featureBandDirectory, WorkloadSetsFolderName); if (Directory.Exists(workloadSetsRoot)) { foreach (var workloadSetDirectory in Directory.GetDirectories(workloadSetsRoot)) { var workloadSetVersion = Path.GetFileName(workloadSetDirectory); - var workloadSet = WorkloadSet.FromWorkloadSetFolder(workloadSetDirectory, workloadSetVersion, workloadSetFeatureBand); + var workloadSet = WorkloadSet.FromWorkloadSetFolder(workloadSetDirectory, workloadSetVersion, featureBand); availableWorkloadSets[workloadSet.Version!] = workloadSet; } } } - - return availableWorkloadSets; } public string GetSdkFeatureBand() From 62c9743964f4408cb7d26113d530931a7131e96f Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Thu, 27 Jun 2024 23:14:57 -0400 Subject: [PATCH 098/159] Apply code review feedback and fix test --- .../dotnet-workload/install/LocalizableStrings.resx | 4 ++-- .../dotnet-workload/install/xlf/LocalizableStrings.cs.xlf | 6 +++--- .../dotnet-workload/install/xlf/LocalizableStrings.de.xlf | 6 +++--- .../dotnet-workload/install/xlf/LocalizableStrings.es.xlf | 6 +++--- .../dotnet-workload/install/xlf/LocalizableStrings.fr.xlf | 6 +++--- .../dotnet-workload/install/xlf/LocalizableStrings.it.xlf | 6 +++--- .../dotnet-workload/install/xlf/LocalizableStrings.ja.xlf | 6 +++--- .../dotnet-workload/install/xlf/LocalizableStrings.ko.xlf | 6 +++--- .../dotnet-workload/install/xlf/LocalizableStrings.pl.xlf | 6 +++--- .../install/xlf/LocalizableStrings.pt-BR.xlf | 6 +++--- .../dotnet-workload/install/xlf/LocalizableStrings.ru.xlf | 6 +++--- .../dotnet-workload/install/xlf/LocalizableStrings.tr.xlf | 6 +++--- .../install/xlf/LocalizableStrings.zh-Hans.xlf | 6 +++--- .../install/xlf/LocalizableStrings.zh-Hant.xlf | 6 +++--- src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs | 4 ++-- 15 files changed, 43 insertions(+), 43 deletions(-) diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx index 909c5133902d..7e6b6dd5018d 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx +++ b/src/Cli/dotnet/commands/dotnet-workload/install/LocalizableStrings.resx @@ -327,7 +327,7 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - "workloadVersion" is a literal value and should not be translated. + "workloadVersion" and "global.json" are literal values and should not be translated. Skip signature verification of workload packages and installers. @@ -360,6 +360,6 @@ Successfully updated workload install mode to use {0}. - Failed to install workload set version {0}: {1} + Failed to install workload version {0}: {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf index 30fa15896748..c183619d1c2d 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf @@ -35,7 +35,7 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - "workloadVersion" is a literal value and should not be translated. + "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. @@ -93,8 +93,8 @@ - Failed to install workload set version {0}: {1} - Failed to install workload set version {0}: {1} + Failed to install workload version {0}: {1} + Failed to install workload version {0}: {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf index ca7f5a788f58..9a0ef4029414 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf @@ -35,7 +35,7 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - "workloadVersion" is a literal value and should not be translated. + "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. @@ -93,8 +93,8 @@ - Failed to install workload set version {0}: {1} - Failed to install workload set version {0}: {1} + Failed to install workload version {0}: {1} + Failed to install workload version {0}: {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf index 73b913d663bc..1c36327c0f7e 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf @@ -35,7 +35,7 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - "workloadVersion" is a literal value and should not be translated. + "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. @@ -93,8 +93,8 @@ - Failed to install workload set version {0}: {1} - Failed to install workload set version {0}: {1} + Failed to install workload version {0}: {1} + Failed to install workload version {0}: {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf index 2d3e647a3496..262d1fd57515 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf @@ -35,7 +35,7 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - "workloadVersion" is a literal value and should not be translated. + "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. @@ -93,8 +93,8 @@ - Failed to install workload set version {0}: {1} - Failed to install workload set version {0}: {1} + Failed to install workload version {0}: {1} + Failed to install workload version {0}: {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf index 3a8a532effa9..08486a0f1f6f 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf @@ -35,7 +35,7 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - "workloadVersion" is a literal value and should not be translated. + "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. @@ -93,8 +93,8 @@ - Failed to install workload set version {0}: {1} - Failed to install workload set version {0}: {1} + Failed to install workload version {0}: {1} + Failed to install workload version {0}: {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf index 980b166feb29..69625b03d4a3 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf @@ -35,7 +35,7 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - "workloadVersion" is a literal value and should not be translated. + "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. @@ -93,8 +93,8 @@ - Failed to install workload set version {0}: {1} - Failed to install workload set version {0}: {1} + Failed to install workload version {0}: {1} + Failed to install workload version {0}: {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf index 660a64fa9a1b..67bc55e9f64d 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf @@ -35,7 +35,7 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - "workloadVersion" is a literal value and should not be translated. + "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. @@ -93,8 +93,8 @@ - Failed to install workload set version {0}: {1} - Failed to install workload set version {0}: {1} + Failed to install workload version {0}: {1} + Failed to install workload version {0}: {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf index e0a2896c3df7..732f158db201 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf @@ -35,7 +35,7 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - "workloadVersion" is a literal value and should not be translated. + "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. @@ -93,8 +93,8 @@ - Failed to install workload set version {0}: {1} - Failed to install workload set version {0}: {1} + Failed to install workload version {0}: {1} + Failed to install workload version {0}: {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf index 33c7064592a7..87fd08333cb8 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf @@ -35,7 +35,7 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - "workloadVersion" is a literal value and should not be translated. + "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. @@ -93,8 +93,8 @@ - Failed to install workload set version {0}: {1} - Failed to install workload set version {0}: {1} + Failed to install workload version {0}: {1} + Failed to install workload version {0}: {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf index 4aa011a199f0..ae601d920cae 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf @@ -35,7 +35,7 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - "workloadVersion" is a literal value and should not be translated. + "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. @@ -93,8 +93,8 @@ - Failed to install workload set version {0}: {1} - Failed to install workload set version {0}: {1} + Failed to install workload version {0}: {1} + Failed to install workload version {0}: {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf index caf75afd3d30..e9518e983218 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf @@ -35,7 +35,7 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - "workloadVersion" is a literal value and should not be translated. + "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. @@ -93,8 +93,8 @@ - Failed to install workload set version {0}: {1} - Failed to install workload set version {0}: {1} + Failed to install workload version {0}: {1} + Failed to install workload version {0}: {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf index 2bae6fd95cee..c5d962aa3cb7 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf @@ -35,7 +35,7 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - "workloadVersion" is a literal value and should not be translated. + "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. @@ -93,8 +93,8 @@ - Failed to install workload set version {0}: {1} - Failed to install workload set version {0}: {1} + Failed to install workload version {0}: {1} + Failed to install workload version {0}: {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf index 64e13a795f62..1310b788e92b 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf @@ -35,7 +35,7 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - "workloadVersion" is a literal value and should not be translated. + "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. @@ -93,8 +93,8 @@ - Failed to install workload set version {0}: {1} - Failed to install workload set version {0}: {1} + Failed to install workload version {0}: {1} + Failed to install workload version {0}: {1} diff --git a/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs b/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs index a9044ce59d58..23c9218c1bbd 100644 --- a/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs +++ b/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs @@ -189,8 +189,8 @@ public void UpdateWorkloadSetWithoutAvailableManifests() VM.CreateRunCommand("dotnet", "workload", "update", "--source", @"c:\SdkTesting\workloadsets") .Execute() .Should() - .Fail(); - + .Pass() + .And.HaveStdOutContaining("No workload update found"); VM.CreateRunCommand("dotnet", "workload", "search") .WithIsReadOnly(true) From fae6a4e7b3d5ce20cb5a5a3e9aed98c8f44c22e9 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 28 Jun 2024 12:54:26 +0000 Subject: [PATCH 099/159] Update dependencies from https://github.com/microsoft/vstest build 20240617.2 Microsoft.NET.Test.Sdk , Microsoft.TestPlatform.Build , Microsoft.TestPlatform.CLI From Version 17.10.0-release-24272-11 -> To Version 17.10.0-release-24317-02 From 29ff210a7ae29dc01f812220a70df31e12154284 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 28 Jun 2024 12:55:00 +0000 Subject: [PATCH 100/159] Update dependencies from https://github.com/dotnet/razor build 20240626.2 Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal , Microsoft.CodeAnalysis.Razor.Tooling.Internal , Microsoft.NET.Sdk.Razor.SourceGenerators.Transport From Version 7.0.0-preview.24312.2 -> To Version 7.0.0-preview.24326.2 From 472162ca199fc941d2c7e14672d8343cf7e0c855 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 28 Jun 2024 12:56:52 +0000 Subject: [PATCH 101/159] Update dependencies from https://github.com/dotnet/roslyn build 20240624.8 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.10.0-3.24312.19 -> To Version 4.10.0-3.24324.8 From 16b1a2aeafd71b7a819b4c0e8f0a318a5cfe4de9 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 28 Jun 2024 12:57:26 +0000 Subject: [PATCH 102/159] Update dependencies from https://github.com/dotnet/templating build 20240614.2 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.303-servicing.24311.4 -> To Version 8.0.303-servicing.24314.2 From 149565b7f5c0b3995365222070abdcb8e9a1cf16 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 28 Jun 2024 12:59:02 +0000 Subject: [PATCH 103/159] Update dependencies from https://github.com/dotnet/arcade build 20240624.7 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 8.0.0-beta.24311.3 -> To Version 8.0.0-beta.24324.7 From cc8f1cea711ee7587d5766a8b7a35ccdcb10d91c Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 28 Jun 2024 13:03:57 +0000 Subject: [PATCH 104/159] Update dependencies from https://github.com/dotnet/roslyn build 20240628.4 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.11.0-3.24327.2 -> To Version 4.11.0-3.24328.4 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 59b2d0769ac0..26cdf711399f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -78,34 +78,34 @@ 32b81fa7a51d0fa630b534ead8ded8c7432f2c2b - + https://github.com/dotnet/roslyn - f497fcbe69a78a7dda6b4eca50e8a1b9a636a207 + fa99ec6224d880ab18b95a2281d25c0ecdc391f5 - + https://github.com/dotnet/roslyn - f497fcbe69a78a7dda6b4eca50e8a1b9a636a207 + fa99ec6224d880ab18b95a2281d25c0ecdc391f5 - + https://github.com/dotnet/roslyn - f497fcbe69a78a7dda6b4eca50e8a1b9a636a207 + fa99ec6224d880ab18b95a2281d25c0ecdc391f5 - + https://github.com/dotnet/roslyn - f497fcbe69a78a7dda6b4eca50e8a1b9a636a207 + fa99ec6224d880ab18b95a2281d25c0ecdc391f5 - + https://github.com/dotnet/roslyn - f497fcbe69a78a7dda6b4eca50e8a1b9a636a207 + fa99ec6224d880ab18b95a2281d25c0ecdc391f5 - + https://github.com/dotnet/roslyn - f497fcbe69a78a7dda6b4eca50e8a1b9a636a207 + fa99ec6224d880ab18b95a2281d25c0ecdc391f5 - + https://github.com/dotnet/roslyn - f497fcbe69a78a7dda6b4eca50e8a1b9a636a207 + fa99ec6224d880ab18b95a2281d25c0ecdc391f5 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index cc6071135cb3..844af8ef28dd 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -155,13 +155,13 @@ - 4.11.0-3.24327.2 - 4.11.0-3.24327.2 - 4.11.0-3.24327.2 - 4.11.0-3.24327.2 - 4.11.0-3.24327.2 - 4.11.0-3.24327.2 - 4.11.0-3.24327.2 + 4.11.0-3.24328.4 + 4.11.0-3.24328.4 + 4.11.0-3.24328.4 + 4.11.0-3.24328.4 + 4.11.0-3.24328.4 + 4.11.0-3.24328.4 + 4.11.0-3.24328.4 $(MicrosoftNetCompilersToolsetPackageVersion) From 15b9293beb9459a74cef1228fc78406c0d92f489 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 28 Jun 2024 13:04:34 +0000 Subject: [PATCH 105/159] Update dependencies from https://github.com/dotnet/fsharp build 20240627.3 Microsoft.SourceBuild.Intermediate.fsharp , Microsoft.FSharp.Compiler From Version 8.0.400-beta.24325.8 -> To Version 8.0.400-beta.24327.3 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 59b2d0769ac0..a34e97cc9531 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -64,13 +64,13 @@ c078802d41fa1f406f1dd76a89720abbf48cb22f - + https://github.com/dotnet/fsharp - 556819c570c803598b7f610639bdc6d35b12f2f7 + b24f5df4ddfb9ae10cf53381380f7d934c2026ef - + https://github.com/dotnet/fsharp - 556819c570c803598b7f610639bdc6d35b12f2f7 + b24f5df4ddfb9ae10cf53381380f7d934c2026ef diff --git a/eng/Versions.props b/eng/Versions.props index cc6071135cb3..2b36e1bf6e95 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -151,7 +151,7 @@ - 12.8.400-beta.24325.8 + 12.8.400-beta.24327.3 From b4aa6a89db398a805316ec036a45a2d7d2077d7f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 28 Jun 2024 13:05:04 +0000 Subject: [PATCH 106/159] Update dependencies from https://github.com/dotnet/razor build 20240627.7 Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal , Microsoft.CodeAnalysis.Razor.Tooling.Internal , Microsoft.NET.Sdk.Razor.SourceGenerators.Transport From Version 9.0.0-preview.24327.2 -> To Version 9.0.0-preview.24327.7 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 59b2d0769ac0..0082edc39565 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -281,18 +281,18 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 - + https://github.com/dotnet/razor - 5fb456dcb1f596bb859d4132df2305ba80d2b4a0 + ea83da42ade2a5e193507d780559d79f0cb16c75 - + https://github.com/dotnet/razor - 5fb456dcb1f596bb859d4132df2305ba80d2b4a0 + ea83da42ade2a5e193507d780559d79f0cb16c75 - + https://github.com/dotnet/razor - 5fb456dcb1f596bb859d4132df2305ba80d2b4a0 + ea83da42ade2a5e193507d780559d79f0cb16c75 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index cc6071135cb3..47acb5d7f2ac 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -176,9 +176,9 @@ - 9.0.0-preview.24327.2 - 9.0.0-preview.24327.2 - 9.0.0-preview.24327.2 + 9.0.0-preview.24327.7 + 9.0.0-preview.24327.7 + 9.0.0-preview.24327.7 From 66c3e36e85a151e9b0e1c203bf7265ef0cd94d42 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 29 Jun 2024 12:38:00 +0000 Subject: [PATCH 107/159] Update dependencies from https://github.com/microsoft/vstest build 20240617.2 Microsoft.NET.Test.Sdk , Microsoft.TestPlatform.Build , Microsoft.TestPlatform.CLI From Version 17.10.0-release-24272-11 -> To Version 17.10.0-release-24317-02 From 532b70213c3c07e82ca6f173b67972948a34df85 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 29 Jun 2024 12:38:32 +0000 Subject: [PATCH 108/159] Update dependencies from https://github.com/dotnet/razor build 20240626.2 Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal , Microsoft.CodeAnalysis.Razor.Tooling.Internal , Microsoft.NET.Sdk.Razor.SourceGenerators.Transport From Version 7.0.0-preview.24312.2 -> To Version 7.0.0-preview.24326.2 From 2fbec85a807da3fa8cc8ae89fbffac5b116f80e2 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 29 Jun 2024 12:40:28 +0000 Subject: [PATCH 109/159] Update dependencies from https://github.com/dotnet/roslyn build 20240624.8 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.10.0-3.24312.19 -> To Version 4.10.0-3.24324.8 From 22853c35b8846544e16f60562aea0b26383cd106 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 29 Jun 2024 12:41:00 +0000 Subject: [PATCH 110/159] Update dependencies from https://github.com/dotnet/templating build 20240614.2 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.303-servicing.24311.4 -> To Version 8.0.303-servicing.24314.2 From de9b3f2b2ca96cb1b9e5df3e4f7bdf693d9fa5c4 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 29 Jun 2024 12:44:23 +0000 Subject: [PATCH 111/159] Update dependencies from https://github.com/dotnet/arcade build 20240626.4 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 8.0.0-beta.24311.3 -> To Version 8.0.0-beta.24326.4 --- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 4 ++-- global.json | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f5b905a2d433..79d8471c0d46 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -483,22 +483,22 @@ - + https://github.com/dotnet/arcade - 3fe41d9e97519a4e9b48293906dbf58714ea9a0d + bee35f3044609d08c40566f8a008baa4d0451a9e - + https://github.com/dotnet/arcade - 3fe41d9e97519a4e9b48293906dbf58714ea9a0d + bee35f3044609d08c40566f8a008baa4d0451a9e - + https://github.com/dotnet/arcade - 3fe41d9e97519a4e9b48293906dbf58714ea9a0d + bee35f3044609d08c40566f8a008baa4d0451a9e - + https://github.com/dotnet/arcade - 3fe41d9e97519a4e9b48293906dbf58714ea9a0d + bee35f3044609d08c40566f8a008baa4d0451a9e https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 3d33c3270349..202caa22d817 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -35,7 +35,7 @@ 7.0.0 4.0.0 7.0.0 - 8.0.0-beta.24324.7 + 8.0.0-beta.24326.4 7.0.0-preview.22423.2 8.0.0 4.3.0 @@ -210,7 +210,7 @@ 6.12.0 6.1.0 - 8.0.0-beta.24324.7 + 8.0.0-beta.24326.4 4.18.4 1.3.2 8.0.0-beta.23607.1 diff --git a/global.json b/global.json index 3299cf13efbd..9404a652c2a9 100644 --- a/global.json +++ b/global.json @@ -14,7 +14,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24324.7", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24324.7" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24326.4", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24326.4" } } From 4c8d4e7456169568ff6378b0b2bab5f0b5521f01 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 29 Jun 2024 12:50:42 +0000 Subject: [PATCH 112/159] Update dependencies from https://github.com/dotnet/roslyn build 20240629.1 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.11.0-3.24328.4 -> To Version 4.11.0-3.24329.1 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3a0cd087e851..7db9869cc4cc 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -78,34 +78,34 @@ 32b81fa7a51d0fa630b534ead8ded8c7432f2c2b - + https://github.com/dotnet/roslyn - fa99ec6224d880ab18b95a2281d25c0ecdc391f5 + 92051d4c24bc13ff58232104a647910bf22cd105 - + https://github.com/dotnet/roslyn - fa99ec6224d880ab18b95a2281d25c0ecdc391f5 + 92051d4c24bc13ff58232104a647910bf22cd105 - + https://github.com/dotnet/roslyn - fa99ec6224d880ab18b95a2281d25c0ecdc391f5 + 92051d4c24bc13ff58232104a647910bf22cd105 - + https://github.com/dotnet/roslyn - fa99ec6224d880ab18b95a2281d25c0ecdc391f5 + 92051d4c24bc13ff58232104a647910bf22cd105 - + https://github.com/dotnet/roslyn - fa99ec6224d880ab18b95a2281d25c0ecdc391f5 + 92051d4c24bc13ff58232104a647910bf22cd105 - + https://github.com/dotnet/roslyn - fa99ec6224d880ab18b95a2281d25c0ecdc391f5 + 92051d4c24bc13ff58232104a647910bf22cd105 - + https://github.com/dotnet/roslyn - fa99ec6224d880ab18b95a2281d25c0ecdc391f5 + 92051d4c24bc13ff58232104a647910bf22cd105 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index d99d4087bdb4..ab36ee7daf1b 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -155,13 +155,13 @@ - 4.11.0-3.24328.4 - 4.11.0-3.24328.4 - 4.11.0-3.24328.4 - 4.11.0-3.24328.4 - 4.11.0-3.24328.4 - 4.11.0-3.24328.4 - 4.11.0-3.24328.4 + 4.11.0-3.24329.1 + 4.11.0-3.24329.1 + 4.11.0-3.24329.1 + 4.11.0-3.24329.1 + 4.11.0-3.24329.1 + 4.11.0-3.24329.1 + 4.11.0-3.24329.1 $(MicrosoftNetCompilersToolsetPackageVersion) From ed6a5f5df8e1b6aa37c8db5b31b2e967b9344ebf Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 29 Jun 2024 12:51:12 +0000 Subject: [PATCH 113/159] Update dependencies from https://github.com/dotnet/fsharp build 20240628.1 Microsoft.SourceBuild.Intermediate.fsharp , Microsoft.FSharp.Compiler From Version 8.0.400-beta.24327.3 -> To Version 8.0.400-beta.24328.1 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3a0cd087e851..b7b7f476e388 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -64,13 +64,13 @@ c078802d41fa1f406f1dd76a89720abbf48cb22f - + https://github.com/dotnet/fsharp - b24f5df4ddfb9ae10cf53381380f7d934c2026ef + 924abef5918801f5ee9a500dfbc4ae29f7dc7203 - + https://github.com/dotnet/fsharp - b24f5df4ddfb9ae10cf53381380f7d934c2026ef + 924abef5918801f5ee9a500dfbc4ae29f7dc7203 diff --git a/eng/Versions.props b/eng/Versions.props index d99d4087bdb4..4d1164c687a0 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -151,7 +151,7 @@ - 12.8.400-beta.24327.3 + 12.8.400-beta.24328.1 From 6bb2e022675c60a75d22cb47c677d1d0f0b6c6a9 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 29 Jun 2024 12:53:11 +0000 Subject: [PATCH 114/159] Update dependencies from https://github.com/nuget/nuget.client build 6.11.0.122 Microsoft.Build.NuGetSdkResolver , NuGet.Build.Tasks , NuGet.Build.Tasks.Console , NuGet.Build.Tasks.Pack , NuGet.CommandLine.XPlat , NuGet.Commands , NuGet.Common , NuGet.Configuration , NuGet.Credentials , NuGet.DependencyResolver.Core , NuGet.Frameworks , NuGet.LibraryModel , NuGet.Localization , NuGet.Packaging , NuGet.ProjectModel , NuGet.Protocol , NuGet.Versioning From Version 6.11.0-rc.110 -> To Version 6.11.0-rc.122 --- eng/Version.Details.xml | 68 ++++++++++++++++++++--------------------- eng/Versions.props | 24 +++++++-------- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3a0cd087e851..12f7c65de9bd 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -115,73 +115,73 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 - + https://github.com/nuget/nuget.client - d1d2e260de9b8f20175e7766aa88e1ce1ece6b4e + c0d441fc5e99e6765c9e0b2f77de162b9866b305 - + https://github.com/nuget/nuget.client - d1d2e260de9b8f20175e7766aa88e1ce1ece6b4e + c0d441fc5e99e6765c9e0b2f77de162b9866b305 - + https://github.com/nuget/nuget.client - d1d2e260de9b8f20175e7766aa88e1ce1ece6b4e + c0d441fc5e99e6765c9e0b2f77de162b9866b305 - + https://github.com/nuget/nuget.client - d1d2e260de9b8f20175e7766aa88e1ce1ece6b4e + c0d441fc5e99e6765c9e0b2f77de162b9866b305 - + https://github.com/nuget/nuget.client - d1d2e260de9b8f20175e7766aa88e1ce1ece6b4e + c0d441fc5e99e6765c9e0b2f77de162b9866b305 - + https://github.com/nuget/nuget.client - d1d2e260de9b8f20175e7766aa88e1ce1ece6b4e + c0d441fc5e99e6765c9e0b2f77de162b9866b305 - + https://github.com/nuget/nuget.client - d1d2e260de9b8f20175e7766aa88e1ce1ece6b4e + c0d441fc5e99e6765c9e0b2f77de162b9866b305 - + https://github.com/nuget/nuget.client - d1d2e260de9b8f20175e7766aa88e1ce1ece6b4e + c0d441fc5e99e6765c9e0b2f77de162b9866b305 - + https://github.com/nuget/nuget.client - d1d2e260de9b8f20175e7766aa88e1ce1ece6b4e + c0d441fc5e99e6765c9e0b2f77de162b9866b305 - + https://github.com/nuget/nuget.client - d1d2e260de9b8f20175e7766aa88e1ce1ece6b4e + c0d441fc5e99e6765c9e0b2f77de162b9866b305 - + https://github.com/nuget/nuget.client - d1d2e260de9b8f20175e7766aa88e1ce1ece6b4e + c0d441fc5e99e6765c9e0b2f77de162b9866b305 - + https://github.com/nuget/nuget.client - d1d2e260de9b8f20175e7766aa88e1ce1ece6b4e + c0d441fc5e99e6765c9e0b2f77de162b9866b305 - + https://github.com/nuget/nuget.client - d1d2e260de9b8f20175e7766aa88e1ce1ece6b4e + c0d441fc5e99e6765c9e0b2f77de162b9866b305 - + https://github.com/nuget/nuget.client - d1d2e260de9b8f20175e7766aa88e1ce1ece6b4e + c0d441fc5e99e6765c9e0b2f77de162b9866b305 - + https://github.com/nuget/nuget.client - d1d2e260de9b8f20175e7766aa88e1ce1ece6b4e + c0d441fc5e99e6765c9e0b2f77de162b9866b305 - + https://github.com/nuget/nuget.client - d1d2e260de9b8f20175e7766aa88e1ce1ece6b4e + c0d441fc5e99e6765c9e0b2f77de162b9866b305 - + https://github.com/nuget/nuget.client - d1d2e260de9b8f20175e7766aa88e1ce1ece6b4e + c0d441fc5e99e6765c9e0b2f77de162b9866b305 https://github.com/microsoft/vstest diff --git a/eng/Versions.props b/eng/Versions.props index d99d4087bdb4..103c60ada2af 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -83,18 +83,18 @@ - 6.11.0-rc.110 - 6.11.0-rc.110 - 6.11.0-rc.110 - 6.11.0-rc.110 - 6.11.0-rc.110 - 6.11.0-rc.110 - 6.11.0-rc.110 - 6.11.0-rc.110 - 6.11.0-rc.110 - 6.11.0-rc.110 - 6.11.0-rc.110 - 6.11.0-rc.110 + 6.11.0-rc.122 + 6.11.0-rc.122 + 6.11.0-rc.122 + 6.11.0-rc.122 + 6.11.0-rc.122 + 6.11.0-rc.122 + 6.11.0-rc.122 + 6.11.0-rc.122 + 6.11.0-rc.122 + 6.11.0-rc.122 + 6.11.0-rc.122 + 6.11.0-rc.122 $(NuGetPackagingPackageVersion) $(NuGetProjectModelPackageVersion) From 782844e5e3a5632efb30d0e5db3695b0b13ad124 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 29 Jun 2024 12:54:37 +0000 Subject: [PATCH 115/159] Update dependencies from https://github.com/dotnet/arcade build 20240626.4 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 8.0.0-beta.24324.7 -> To Version 8.0.0-beta.24326.4 --- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 4 ++-- global.json | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3a0cd087e851..74270e8b91f1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -479,22 +479,22 @@ - + https://github.com/dotnet/arcade - 3fe41d9e97519a4e9b48293906dbf58714ea9a0d + bee35f3044609d08c40566f8a008baa4d0451a9e - + https://github.com/dotnet/arcade - 3fe41d9e97519a4e9b48293906dbf58714ea9a0d + bee35f3044609d08c40566f8a008baa4d0451a9e - + https://github.com/dotnet/arcade - 3fe41d9e97519a4e9b48293906dbf58714ea9a0d + bee35f3044609d08c40566f8a008baa4d0451a9e - + https://github.com/dotnet/arcade - 3fe41d9e97519a4e9b48293906dbf58714ea9a0d + bee35f3044609d08c40566f8a008baa4d0451a9e https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index d99d4087bdb4..028b7e4f6989 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -35,7 +35,7 @@ 8.0.0 4.0.0 8.0.0 - 8.0.0-beta.24324.7 + 8.0.0-beta.24326.4 7.0.0-preview.22423.2 8.0.0 4.3.0 @@ -210,7 +210,7 @@ 6.12.0 6.1.0 - 8.0.0-beta.24324.7 + 8.0.0-beta.24326.4 4.18.4 1.3.2 8.0.0-beta.23607.1 diff --git a/global.json b/global.json index 3299cf13efbd..9404a652c2a9 100644 --- a/global.json +++ b/global.json @@ -14,7 +14,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24324.7", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24324.7" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24326.4", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24326.4" } } From 747303b757016da3f733f35fc495d5f63f285ce6 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 30 Jun 2024 12:36:30 +0000 Subject: [PATCH 116/159] Update dependencies from https://github.com/microsoft/vstest build 20240617.2 Microsoft.NET.Test.Sdk , Microsoft.TestPlatform.Build , Microsoft.TestPlatform.CLI From Version 17.10.0-release-24272-11 -> To Version 17.10.0-release-24317-02 From 246f52627e31fc9e9aa19a8b0d7d5f4cbcb8b7df Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 30 Jun 2024 12:37:01 +0000 Subject: [PATCH 117/159] Update dependencies from https://github.com/dotnet/razor build 20240626.2 Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal , Microsoft.CodeAnalysis.Razor.Tooling.Internal , Microsoft.NET.Sdk.Razor.SourceGenerators.Transport From Version 7.0.0-preview.24312.2 -> To Version 7.0.0-preview.24326.2 From 9d0d5cf67878e39ba3d0cd4ede9eefa2929c8452 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 30 Jun 2024 12:38:58 +0000 Subject: [PATCH 118/159] Update dependencies from https://github.com/dotnet/roslyn build 20240624.8 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.10.0-3.24312.19 -> To Version 4.10.0-3.24324.8 From ef004e5f39e9fcd7695b542ebac6f3e84588ee0a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 30 Jun 2024 12:39:31 +0000 Subject: [PATCH 119/159] Update dependencies from https://github.com/dotnet/templating build 20240614.2 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.303-servicing.24311.4 -> To Version 8.0.303-servicing.24314.2 From d13a66c10b0c6094f7093c728cdf58b539c1ab0e Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 30 Jun 2024 12:43:01 +0000 Subject: [PATCH 120/159] Update dependencies from https://github.com/dotnet/arcade build 20240626.4 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 8.0.0-beta.24311.3 -> To Version 8.0.0-beta.24326.4 From f579ccd991aa75eb41b858df797334466bd2f3b9 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 30 Jun 2024 12:50:32 +0000 Subject: [PATCH 121/159] Update dependencies from https://github.com/dotnet/arcade build 20240626.4 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 8.0.0-beta.24324.7 -> To Version 8.0.0-beta.24326.4 From 979ac000f304e4920bad7e80708992897fbe625a Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Sun, 30 Jun 2024 23:57:32 -0400 Subject: [PATCH 122/159] Fix combinations of workload install, global install state, and global.json or command-line specified workload set version --- .../install/WorkloadInstallCommand.cs | 2 + .../WorkloadSetTests.cs | 47 ++++++++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs index f6ba35d2ecb9..621c7c47d365 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs @@ -147,6 +147,8 @@ public override int Execute() { var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkFeatureBand, _dotnetPath), "default.json"); if (string.IsNullOrWhiteSpace(_fromRollbackDefinition) && + !SpecifiedWorkloadSetVersionOnCommandLine && + !SpecifiedWorkloadSetVersionInGlobalJson && InstallStateContents.FromPath(installStateFilePath) is InstallStateContents installState && (installState.Manifests != null || installState.WorkloadVersion != null)) { diff --git a/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs b/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs index 23c9218c1bbd..e580c8ad4d0f 100644 --- a/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs +++ b/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs @@ -247,7 +247,6 @@ void SetupWorkloadSetInGlobalJson(out WorkloadSet originalRollback) result.StdErr.Should().Contain(versionToUpdateTo); AddNuGetSource(@"C:\SdkTesting\workloadsets", SdkTestingDirectory); - } [Fact] @@ -294,6 +293,52 @@ public void InstallWithVersionAndSkipManifestUpdate() .And.HaveStdErrContaining("--sdk-version"); } + [Fact] + public void InstallWithVersionWhenPinned() + { + InstallSdk(); + + AddNuGetSource(@"c:\SdkTesting\WorkloadSets"); + + string originalVersion = GetWorkloadVersion(); + originalVersion.Should().NotBe("8.0.300-preview.0.24178.1"); + + VM.CreateRunCommand("dotnet", "workload", "update", "--version", "8.0.300-preview.0.24178.1") + .Execute().Should().Pass(); + + GetWorkloadVersion().Should().Be("8.0.300-preview.0.24178.1"); + + VM.CreateRunCommand("dotnet", "workload", "install", "aspire", "--version", "8.0.300-preview.0.24217.2") + .Execute().Should().Pass(); + + GetWorkloadVersion().Should().Be("8.0.300-preview.0.24217.2"); + } + + [Fact] + public void InstallWithGlobalJsonWhenPinned() + { + SetupWorkloadSetInGlobalJson(out var originalRollback); + + //AddNuGetSource(@"c:\SdkTesting\WorkloadSets"); + + string originalVersion = GetWorkloadVersion(); + originalVersion.Should().NotBe("8.0.300-preview.0.24178.1"); + + VM.CreateRunCommand("dotnet", "workload", "update", "--version", "8.0.300-preview.0.24178.1") + .Execute().Should().Pass(); + + GetWorkloadVersion().Should().Be("8.0.300-preview.0.24178.1"); + + VM.CreateRunCommand("dotnet", "workload", "install", "aspire") + .WithWorkingDirectory(SdkTestingDirectory) + .Execute().Should().Pass(); + + GetWorkloadVersion(SdkTestingDirectory).Should().Be("8.0.300-preview.0.24217.2"); + + GetRollback(SdkTestingDirectory).Should().NotBe(originalRollback); + + } + [Fact] public void UpdateShouldNotPinWorkloadSet() { From 9c8d895d050894ec1ad125ad4035296ea2e829f9 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 1 Jul 2024 12:33:30 +0000 Subject: [PATCH 123/159] Update dependencies from https://github.com/microsoft/vstest build 20240617.2 Microsoft.NET.Test.Sdk , Microsoft.TestPlatform.Build , Microsoft.TestPlatform.CLI From Version 17.10.0-release-24272-11 -> To Version 17.10.0-release-24317-02 From e48c7672f05adbdd661790c0335196d848adf04e Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 1 Jul 2024 12:34:01 +0000 Subject: [PATCH 124/159] Update dependencies from https://github.com/dotnet/razor build 20240626.2 Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal , Microsoft.CodeAnalysis.Razor.Tooling.Internal , Microsoft.NET.Sdk.Razor.SourceGenerators.Transport From Version 7.0.0-preview.24312.2 -> To Version 7.0.0-preview.24326.2 From c3948a84de9d7253ab023e1736ed41dae4652268 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 1 Jul 2024 12:35:55 +0000 Subject: [PATCH 125/159] Update dependencies from https://github.com/dotnet/roslyn build 20240624.8 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.10.0-3.24312.19 -> To Version 4.10.0-3.24324.8 From b4768e391b6a53ec770aa5bb8cc0bed934a5d760 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 1 Jul 2024 12:36:31 +0000 Subject: [PATCH 126/159] Update dependencies from https://github.com/dotnet/templating build 20240614.2 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.303-servicing.24311.4 -> To Version 8.0.303-servicing.24314.2 From 16c4b79540ee7639b0d7fd9520db4db1f19af97b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 1 Jul 2024 12:40:22 +0000 Subject: [PATCH 127/159] Update dependencies from https://github.com/dotnet/arcade build 20240628.2 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 8.0.0-beta.24311.3 -> To Version 8.0.0-beta.24328.2 --- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 4 ++-- global.json | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 79d8471c0d46..5d47569c296c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -483,22 +483,22 @@ - + https://github.com/dotnet/arcade - bee35f3044609d08c40566f8a008baa4d0451a9e + 761c516b64fee3941d8909d24205ced835eed83e - + https://github.com/dotnet/arcade - bee35f3044609d08c40566f8a008baa4d0451a9e + 761c516b64fee3941d8909d24205ced835eed83e - + https://github.com/dotnet/arcade - bee35f3044609d08c40566f8a008baa4d0451a9e + 761c516b64fee3941d8909d24205ced835eed83e - + https://github.com/dotnet/arcade - bee35f3044609d08c40566f8a008baa4d0451a9e + 761c516b64fee3941d8909d24205ced835eed83e https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 202caa22d817..5d756017a838 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -35,7 +35,7 @@ 7.0.0 4.0.0 7.0.0 - 8.0.0-beta.24326.4 + 8.0.0-beta.24328.2 7.0.0-preview.22423.2 8.0.0 4.3.0 @@ -210,7 +210,7 @@ 6.12.0 6.1.0 - 8.0.0-beta.24326.4 + 8.0.0-beta.24328.2 4.18.4 1.3.2 8.0.0-beta.23607.1 diff --git a/global.json b/global.json index 9404a652c2a9..74e605301f20 100644 --- a/global.json +++ b/global.json @@ -14,7 +14,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24326.4", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24326.4" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24328.2", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24328.2" } } From 4dd638ac735f4b050cd881532c54cc1b242e4b57 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 1 Jul 2024 12:48:13 +0000 Subject: [PATCH 128/159] Update dependencies from https://github.com/dotnet/templating build 20240630.1 Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.400-preview.24325.1 -> To Version 8.0.400-preview.24330.1 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f9ef70ddabac..8f80db9ff63f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,14 +1,14 @@ - + https://github.com/dotnet/templating - f97ccd7d748efacdf443b8c768233f593e7c86e2 + 64bdb6f59b7017e77580fdb5bd62fd4a9bfcd7cf - + https://github.com/dotnet/templating - f97ccd7d748efacdf443b8c768233f593e7c86e2 + 64bdb6f59b7017e77580fdb5bd62fd4a9bfcd7cf https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index fbbe63ef04f2..af27ed5c5a57 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -138,13 +138,13 @@ - 8.0.400-preview.24325.1 + 8.0.400-preview.24330.1 $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 8.0.400-preview.24325.1 + 8.0.400-preview.24330.1 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion) From cd61ea898d40d2b51ab28c91e3e747214b2df2ec Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 1 Jul 2024 12:51:07 +0000 Subject: [PATCH 129/159] Update dependencies from https://github.com/dotnet/arcade build 20240628.2 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 8.0.0-beta.24326.4 -> To Version 8.0.0-beta.24328.2 --- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 4 ++-- global.json | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f9ef70ddabac..784267d855af 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -479,22 +479,22 @@ - + https://github.com/dotnet/arcade - bee35f3044609d08c40566f8a008baa4d0451a9e + 761c516b64fee3941d8909d24205ced835eed83e - + https://github.com/dotnet/arcade - bee35f3044609d08c40566f8a008baa4d0451a9e + 761c516b64fee3941d8909d24205ced835eed83e - + https://github.com/dotnet/arcade - bee35f3044609d08c40566f8a008baa4d0451a9e + 761c516b64fee3941d8909d24205ced835eed83e - + https://github.com/dotnet/arcade - bee35f3044609d08c40566f8a008baa4d0451a9e + 761c516b64fee3941d8909d24205ced835eed83e https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index fbbe63ef04f2..77ee020210ab 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -35,7 +35,7 @@ 8.0.0 4.0.0 8.0.0 - 8.0.0-beta.24326.4 + 8.0.0-beta.24328.2 7.0.0-preview.22423.2 8.0.0 4.3.0 @@ -210,7 +210,7 @@ 6.12.0 6.1.0 - 8.0.0-beta.24326.4 + 8.0.0-beta.24328.2 4.18.4 1.3.2 8.0.0-beta.23607.1 diff --git a/global.json b/global.json index 9404a652c2a9..74e605301f20 100644 --- a/global.json +++ b/global.json @@ -14,7 +14,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24326.4", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24326.4" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24328.2", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24328.2" } } From 85ca99abb01f6f10f83b3f7f6275df35f43fd75a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 2 Jul 2024 12:52:32 +0000 Subject: [PATCH 130/159] Update dependencies from https://github.com/microsoft/vstest build 20240617.2 Microsoft.NET.Test.Sdk , Microsoft.TestPlatform.Build , Microsoft.TestPlatform.CLI From Version 17.10.0-release-24272-11 -> To Version 17.10.0-release-24317-02 From b4bf1dcab24abee1f4c73e4e31de3506e3004cb4 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 2 Jul 2024 12:53:03 +0000 Subject: [PATCH 131/159] Update dependencies from https://github.com/dotnet/razor build 20240626.2 Microsoft.AspNetCore.Mvc.Razor.Extensions.Tooling.Internal , Microsoft.CodeAnalysis.Razor.Tooling.Internal , Microsoft.NET.Sdk.Razor.SourceGenerators.Transport From Version 7.0.0-preview.24312.2 -> To Version 7.0.0-preview.24326.2 From 06240d08b8ee7c8e982ec7519171938a4319c620 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 2 Jul 2024 12:54:56 +0000 Subject: [PATCH 132/159] Update dependencies from https://github.com/dotnet/roslyn build 20240624.8 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.10.0-3.24312.19 -> To Version 4.10.0-3.24324.8 From a2905724b08bf26553ac5c248e3a569b0a033544 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 2 Jul 2024 12:55:29 +0000 Subject: [PATCH 133/159] Update dependencies from https://github.com/dotnet/templating build 20240614.2 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.303-servicing.24311.4 -> To Version 8.0.303-servicing.24314.2 From 194445444f738e80ae8035f6d0e0537eb0635506 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 2 Jul 2024 12:57:20 +0000 Subject: [PATCH 134/159] Update dependencies from https://github.com/dotnet/arcade build 20240628.2 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.XUnitExtensions From Version 8.0.0-beta.24311.3 -> To Version 8.0.0-beta.24328.2 From 74ae725bd7d0c883224ec8952fa6677680751258 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 2 Jul 2024 13:06:25 +0000 Subject: [PATCH 135/159] Update dependencies from https://github.com/dotnet/fsharp build 20240701.2 Microsoft.SourceBuild.Intermediate.fsharp , Microsoft.FSharp.Compiler From Version 8.0.400-beta.24328.1 -> To Version 8.0.400-beta.24351.2 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4750cd7614c9..4095aa09f55f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -64,13 +64,13 @@ c078802d41fa1f406f1dd76a89720abbf48cb22f - + https://github.com/dotnet/fsharp - 924abef5918801f5ee9a500dfbc4ae29f7dc7203 + 02adf13f8d69e0105fff4d68dbd5fb1d43bc0e17 - + https://github.com/dotnet/fsharp - 924abef5918801f5ee9a500dfbc4ae29f7dc7203 + 02adf13f8d69e0105fff4d68dbd5fb1d43bc0e17 diff --git a/eng/Versions.props b/eng/Versions.props index 1cfc52f00d55..194a931dd03a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -151,7 +151,7 @@ - 12.8.400-beta.24328.1 + 12.8.400-beta.24351.2 From ec50e2cef844439481030be396f00746104bd554 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 2 Jul 2024 13:06:56 +0000 Subject: [PATCH 136/159] Update dependencies from https://github.com/dotnet/msbuild build 20240702.1 Microsoft.SourceBuild.Intermediate.msbuild , Microsoft.Build , Microsoft.Build.Localization From Version 17.11.2-preview-24327-01 -> To Version 17.11.3-preview-24352-01 --- NuGet.config | 2 +- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/NuGet.config b/NuGet.config index 05f88793cd03..072847a3da7e 100644 --- a/NuGet.config +++ b/NuGet.config @@ -14,7 +14,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4750cd7614c9..6e56f3dc2397 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -51,17 +51,17 @@ https://github.com/dotnet/emsdk 71359b18c2d83c01a68bf155244a65962a7e8c8e - + https://github.com/dotnet/msbuild - c078802d41fa1f406f1dd76a89720abbf48cb22f + 0c86109772ea0fae22af6a7ad7b582e75d280689 - + https://github.com/dotnet/msbuild - c078802d41fa1f406f1dd76a89720abbf48cb22f + 0c86109772ea0fae22af6a7ad7b582e75d280689 - + https://github.com/dotnet/msbuild - c078802d41fa1f406f1dd76a89720abbf48cb22f + 0c86109772ea0fae22af6a7ad7b582e75d280689 diff --git a/eng/Versions.props b/eng/Versions.props index 1cfc52f00d55..c5b4a6b8b1b3 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -121,7 +121,7 @@ - 17.11.2 + 17.11.3 $(MicrosoftBuildPackageVersion) - 17.11.0-preview-24320-06 - 17.11.0-preview-24320-06 - 17.11.0-preview-24320-06 + 17.11.0-release-24352-05 + 17.11.0-release-24352-05 + 17.11.0-release-24352-05 From b31832453ed3dd65b8353ed38c8438d91f9f2f0a Mon Sep 17 00:00:00 2001 From: "Matt Mitchell (.NET)" Date: Tue, 2 Jul 2024 09:18:12 -0700 Subject: [PATCH 138/159] Update arcade --- NuGet.config | 4 ++ eng/Version.Details.xml | 16 +++---- eng/Versions.props | 4 +- eng/common/post-build/publish-using-darc.ps1 | 15 +++---- .../job/publish-build-assets.yml | 12 +++--- .../templates-official/job/source-build.yml | 8 ++++ .../job/source-index-stage1.yml | 16 +++---- .../templates-official/jobs/source-build.yml | 8 ++++ .../post-build/post-build.yml | 8 ++-- .../steps/enable-internal-runtimes.yml | 28 ++++++++++++ .../steps/get-delegation-sas.yml | 43 +++++++++++++++++++ .../steps/get-federated-access-token.yml | 28 ++++++++++++ .../templates/job/publish-build-assets.yml | 12 +++--- eng/common/templates/job/source-build.yml | 8 ++++ .../templates/job/source-index-stage1.yml | 11 ++--- eng/common/templates/jobs/source-build.yml | 8 ++++ .../templates/post-build/post-build.yml | 8 ++-- .../post-build/setup-maestro-vars.yml | 28 ++++++------ .../steps/enable-internal-runtimes.yml | 28 ++++++++++++ .../templates/steps/get-delegation-sas.yml | 43 +++++++++++++++++++ .../steps/get-federated-access-token.yml | 28 ++++++++++++ global.json | 4 +- 22 files changed, 302 insertions(+), 66 deletions(-) create mode 100644 eng/common/templates-official/steps/enable-internal-runtimes.yml create mode 100644 eng/common/templates-official/steps/get-delegation-sas.yml create mode 100644 eng/common/templates-official/steps/get-federated-access-token.yml create mode 100644 eng/common/templates/steps/enable-internal-runtimes.yml create mode 100644 eng/common/templates/steps/get-delegation-sas.yml create mode 100644 eng/common/templates/steps/get-federated-access-token.yml diff --git a/NuGet.config b/NuGet.config index fc5e64092a4c..ae2cc237c36b 100644 --- a/NuGet.config +++ b/NuGet.config @@ -19,6 +19,10 @@ + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 23ac61d347ae..9a60d356a9e2 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -483,22 +483,22 @@ - + https://github.com/dotnet/arcade - e6f70c7dd528f05cd28cec2a179d58c22e91d9ac + 8b879da4e449c48d99f3f642fc429379a64e8fe8 - + https://github.com/dotnet/arcade - e6f70c7dd528f05cd28cec2a179d58c22e91d9ac + 8b879da4e449c48d99f3f642fc429379a64e8fe8 - + https://github.com/dotnet/arcade - e6f70c7dd528f05cd28cec2a179d58c22e91d9ac + 8b879da4e449c48d99f3f642fc429379a64e8fe8 - + https://github.com/dotnet/arcade - e6f70c7dd528f05cd28cec2a179d58c22e91d9ac + 8b879da4e449c48d99f3f642fc429379a64e8fe8 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 5f6dd851d6bb..700215ca3185 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -33,7 +33,7 @@ 7.0.0 4.0.0 7.0.0 - 8.0.0-beta.24266.3 + 8.0.0-beta.24352.1 7.0.0-preview.22423.2 8.0.0 4.3.0 @@ -206,7 +206,7 @@ 6.12.0 6.1.0 - 8.0.0-beta.24266.3 + 8.0.0-beta.24352.1 4.18.4 1.3.2 8.0.0-beta.23607.1 diff --git a/eng/common/post-build/publish-using-darc.ps1 b/eng/common/post-build/publish-using-darc.ps1 index 5a3a32ea8d75..238945cb5ab4 100644 --- a/eng/common/post-build/publish-using-darc.ps1 +++ b/eng/common/post-build/publish-using-darc.ps1 @@ -2,7 +2,6 @@ param( [Parameter(Mandatory=$true)][int] $BuildId, [Parameter(Mandatory=$true)][int] $PublishingInfraVersion, [Parameter(Mandatory=$true)][string] $AzdoToken, - [Parameter(Mandatory=$true)][string] $MaestroToken, [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net', [Parameter(Mandatory=$true)][string] $WaitPublishingFinish, [Parameter(Mandatory=$false)][string] $ArtifactsPublishingAdditionalParameters, @@ -31,13 +30,13 @@ try { } & $darc add-build-to-channel ` - --id $buildId ` - --publishing-infra-version $PublishingInfraVersion ` - --default-channels ` - --source-branch main ` - --azdev-pat $AzdoToken ` - --bar-uri $MaestroApiEndPoint ` - --password $MaestroToken ` + --id $buildId ` + --publishing-infra-version $PublishingInfraVersion ` + --default-channels ` + --source-branch main ` + --azdev-pat "$AzdoToken" ` + --bar-uri "$MaestroApiEndPoint" ` + --ci ` @optionalParams if ($LastExitCode -ne 0) { diff --git a/eng/common/templates-official/job/publish-build-assets.yml b/eng/common/templates-official/job/publish-build-assets.yml index 589ac80a18b7..d01739c12857 100644 --- a/eng/common/templates-official/job/publish-build-assets.yml +++ b/eng/common/templates-official/job/publish-build-assets.yml @@ -76,13 +76,16 @@ jobs: - task: NuGetAuthenticate@1 - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Build Assets inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/sdk-task.ps1 + arguments: > + -task PublishBuildAssets -restore -msbuildEngine dotnet /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests' - /p:BuildAssetRegistryToken=$(MaestroAccessToken) /p:MaestroApiEndpoint=https://maestro-prod.westus2.cloudapp.azure.com /p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }} /p:OfficialBuildId=$(Build.BuildNumber) @@ -144,7 +147,6 @@ jobs: arguments: -BuildId $(BARBuildId) -PublishingInfraVersion 3 -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' - -MaestroToken '$(MaestroApiAccessToken)' -WaitPublishingFinish true -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/templates-official/job/source-build.yml b/eng/common/templates-official/job/source-build.yml index f193dfbe2366..f983033bb028 100644 --- a/eng/common/templates-official/job/source-build.yml +++ b/eng/common/templates-official/job/source-build.yml @@ -31,6 +31,12 @@ parameters: # container and pool. platform: {} + # If set to true and running on a non-public project, + # Internal blob storage locations will be enabled. + # This is not enabled by default because many repositories do not need internal sources + # and do not need to have the required service connections approved in the pipeline. + enableInternalSources: false + jobs: - job: ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }} displayName: Source-Build (${{ parameters.platform.name }}) @@ -62,6 +68,8 @@ jobs: clean: all steps: + - ${{ if eq(parameters.enableInternalSources, true) }}: + - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml - template: /eng/common/templates-official/steps/source-build.yml parameters: platform: ${{ parameters.platform }} diff --git a/eng/common/templates-official/job/source-index-stage1.yml b/eng/common/templates-official/job/source-index-stage1.yml index 43ee0c202fc7..60dfb6b2d1c0 100644 --- a/eng/common/templates-official/job/source-index-stage1.yml +++ b/eng/common/templates-official/job/source-index-stage1.yml @@ -23,7 +23,7 @@ jobs: value: ${{ parameters.sourceIndexPackageSource }} - name: BinlogPath value: ${{ parameters.binlogPath }} - - template: /eng/common/templates/variables/pool-providers.yml + - template: /eng/common/templates-official/variables/pool-providers.yml ${{ if ne(parameters.pool, '') }}: pool: ${{ parameters.pool }} @@ -34,7 +34,8 @@ jobs: demands: ImageOverride -equals windows.vs2019.amd64.open ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: $(DncEngInternalBuildPool) - demands: ImageOverride -equals windows.vs2019.amd64 + image: windows.vs2022.amd64 + os: windows steps: - ${{ each preStep in parameters.preSteps }}: @@ -70,16 +71,13 @@ jobs: scriptType: 'ps' scriptLocation: 'inlineScript' inlineScript: | - echo "##vso[task.setvariable variable=ARM_CLIENT_ID]$env:servicePrincipalId" - echo "##vso[task.setvariable variable=ARM_ID_TOKEN]$env:idToken" - echo "##vso[task.setvariable variable=ARM_TENANT_ID]$env:tenantId" + echo "##vso[task.setvariable variable=ARM_CLIENT_ID;issecret=true]$env:servicePrincipalId" + echo "##vso[task.setvariable variable=ARM_ID_TOKEN;issecret=true]$env:idToken" + echo "##vso[task.setvariable variable=ARM_TENANT_ID;issecret=true]$env:tenantId" - script: | - echo "Client ID: $(ARM_CLIENT_ID)" - echo "ID Token: $(ARM_ID_TOKEN)" - echo "Tenant ID: $(ARM_TENANT_ID)" az login --service-principal -u $(ARM_CLIENT_ID) --tenant $(ARM_TENANT_ID) --allow-no-subscriptions --federated-token $(ARM_ID_TOKEN) displayName: "Login to Azure" - script: $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1 - displayName: Upload stage1 artifacts to source index \ No newline at end of file + displayName: Upload stage1 artifacts to source index diff --git a/eng/common/templates-official/jobs/source-build.yml b/eng/common/templates-official/jobs/source-build.yml index 08e5db9bb116..5cf6a269c0b6 100644 --- a/eng/common/templates-official/jobs/source-build.yml +++ b/eng/common/templates-official/jobs/source-build.yml @@ -21,6 +21,12 @@ parameters: # one job runs on 'defaultManagedPlatform'. platforms: [] + # If set to true and running on a non-public project, + # Internal nuget and blob storage locations will be enabled. + # This is not enabled by default because many repositories do not need internal sources + # and do not need to have the required service connections approved in the pipeline. + enableInternalSources: false + jobs: - ${{ if ne(parameters.allCompletedJobId, '') }}: @@ -38,9 +44,11 @@ jobs: parameters: jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ platform }} + enableInternalSources: ${{ parameters.enableInternalSources }} - ${{ if eq(length(parameters.platforms), 0) }}: - template: /eng/common/templates-official/job/source-build.yml parameters: jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ parameters.defaultManagedPlatform }} + enableInternalSources: ${{ parameters.enableInternalSources }} diff --git a/eng/common/templates-official/post-build/post-build.yml b/eng/common/templates-official/post-build/post-build.yml index da1f40958b45..0dfa387e7b78 100644 --- a/eng/common/templates-official/post-build/post-build.yml +++ b/eng/common/templates-official/post-build/post-build.yml @@ -272,14 +272,16 @@ stages: - task: NuGetAuthenticate@1 - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Using Darc inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 arguments: -BuildId $(BARBuildId) -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' - -MaestroToken '$(MaestroApiAccessToken)' -WaitPublishingFinish true -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/templates-official/steps/enable-internal-runtimes.yml b/eng/common/templates-official/steps/enable-internal-runtimes.yml new file mode 100644 index 000000000000..93a8394a666b --- /dev/null +++ b/eng/common/templates-official/steps/enable-internal-runtimes.yml @@ -0,0 +1,28 @@ +# Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' +# variable with the base64-encoded SAS token, by default + +parameters: +- name: federatedServiceConnection + type: string + default: 'dotnetbuilds-internal-read' +- name: outputVariableName + type: string + default: 'dotnetbuilds-internal-container-read-token-base64' +- name: expiryInHours + type: number + default: 1 +- name: base64Encode + type: boolean + default: true + +steps: +- ${{ if ne(variables['System.TeamProject'], 'public') }}: + - template: /eng/common/templates-official/steps/get-delegation-sas.yml + parameters: + federatedServiceConnection: ${{ parameters.federatedServiceConnection }} + outputVariableName: ${{ parameters.outputVariableName }} + expiryInHours: ${{ parameters.expiryInHours }} + base64Encode: ${{ parameters.base64Encode }} + storageAccount: dotnetbuilds + container: internal + permissions: rl diff --git a/eng/common/templates-official/steps/get-delegation-sas.yml b/eng/common/templates-official/steps/get-delegation-sas.yml new file mode 100644 index 000000000000..c0e8f91317f0 --- /dev/null +++ b/eng/common/templates-official/steps/get-delegation-sas.yml @@ -0,0 +1,43 @@ +parameters: +- name: federatedServiceConnection + type: string +- name: outputVariableName + type: string +- name: expiryInHours + type: number + default: 1 +- name: base64Encode + type: boolean + default: false +- name: storageAccount + type: string +- name: container + type: string +- name: permissions + type: string + default: 'rl' + +steps: +- task: AzureCLI@2 + displayName: 'Generate delegation SAS Token for ${{ parameters.storageAccount }}/${{ parameters.container }}' + inputs: + azureSubscription: ${{ parameters.federatedServiceConnection }} + scriptType: 'pscore' + scriptLocation: 'inlineScript' + inlineScript: | + # Calculate the expiration of the SAS token and convert to UTC + $expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") + + $sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv + + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to generate SAS token." + exit 1 + } + + if ('${{ parameters.base64Encode }}' -eq 'true') { + $sas = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($sas)) + } + + Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$sas" diff --git a/eng/common/templates-official/steps/get-federated-access-token.yml b/eng/common/templates-official/steps/get-federated-access-token.yml new file mode 100644 index 000000000000..e3786cef6dfd --- /dev/null +++ b/eng/common/templates-official/steps/get-federated-access-token.yml @@ -0,0 +1,28 @@ +parameters: +- name: federatedServiceConnection + type: string +- name: outputVariableName + type: string +# Resource to get a token for. Common values include: +# - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps +# - 'https://storage.azure.com/' for storage +# Defaults to Azure DevOps +- name: resource + type: string + default: '499b84ac-1321-427f-aa17-267ca6975798' + +steps: +- task: AzureCLI@2 + displayName: 'Getting federated access token for feeds' + inputs: + azureSubscription: ${{ parameters.federatedServiceConnection }} + scriptType: 'pscore' + scriptLocation: 'inlineScript' + inlineScript: | + $accessToken = az account get-access-token --query accessToken --resource ${{ parameters.resource }} --output tsv + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to get access token for resource '${{ parameters.resource }}'" + exit 1 + } + Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$accessToken" diff --git a/eng/common/templates/job/publish-build-assets.yml b/eng/common/templates/job/publish-build-assets.yml index 8ec0151def21..9fd69fa7c9b7 100644 --- a/eng/common/templates/job/publish-build-assets.yml +++ b/eng/common/templates/job/publish-build-assets.yml @@ -74,13 +74,16 @@ jobs: - task: NuGetAuthenticate@1 - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Build Assets inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/sdk-task.ps1 + arguments: > + -task PublishBuildAssets -restore -msbuildEngine dotnet /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests' - /p:BuildAssetRegistryToken=$(MaestroAccessToken) /p:MaestroApiEndpoint=https://maestro.dot.net /p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }} /p:OfficialBuildId=$(Build.BuildNumber) @@ -140,7 +143,6 @@ jobs: arguments: -BuildId $(BARBuildId) -PublishingInfraVersion 3 -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' - -MaestroToken '$(MaestroApiAccessToken)' -WaitPublishingFinish true -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/templates/job/source-build.yml b/eng/common/templates/job/source-build.yml index 8a3deef2b727..c0ff472b697b 100644 --- a/eng/common/templates/job/source-build.yml +++ b/eng/common/templates/job/source-build.yml @@ -31,6 +31,12 @@ parameters: # container and pool. platform: {} + # If set to true and running on a non-public project, + # Internal blob storage locations will be enabled. + # This is not enabled by default because many repositories do not need internal sources + # and do not need to have the required service connections approved in the pipeline. + enableInternalSources: false + jobs: - job: ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }} displayName: Source-Build (${{ parameters.platform.name }}) @@ -61,6 +67,8 @@ jobs: clean: all steps: + - ${{ if eq(parameters.enableInternalSources, true) }}: + - template: /eng/common/templates/steps/enable-internal-runtimes.yml - template: /eng/common/templates/steps/source-build.yml parameters: platform: ${{ parameters.platform }} diff --git a/eng/common/templates/job/source-index-stage1.yml b/eng/common/templates/job/source-index-stage1.yml index 43ee0c202fc7..0b6bb89dc78a 100644 --- a/eng/common/templates/job/source-index-stage1.yml +++ b/eng/common/templates/job/source-index-stage1.yml @@ -70,16 +70,13 @@ jobs: scriptType: 'ps' scriptLocation: 'inlineScript' inlineScript: | - echo "##vso[task.setvariable variable=ARM_CLIENT_ID]$env:servicePrincipalId" - echo "##vso[task.setvariable variable=ARM_ID_TOKEN]$env:idToken" - echo "##vso[task.setvariable variable=ARM_TENANT_ID]$env:tenantId" + echo "##vso[task.setvariable variable=ARM_CLIENT_ID;issecret=true]$env:servicePrincipalId" + echo "##vso[task.setvariable variable=ARM_ID_TOKEN;issecret=true]$env:idToken" + echo "##vso[task.setvariable variable=ARM_TENANT_ID;issecret=true]$env:tenantId" - script: | - echo "Client ID: $(ARM_CLIENT_ID)" - echo "ID Token: $(ARM_ID_TOKEN)" - echo "Tenant ID: $(ARM_TENANT_ID)" az login --service-principal -u $(ARM_CLIENT_ID) --tenant $(ARM_TENANT_ID) --allow-no-subscriptions --federated-token $(ARM_ID_TOKEN) displayName: "Login to Azure" - script: $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1 - displayName: Upload stage1 artifacts to source index \ No newline at end of file + displayName: Upload stage1 artifacts to source index diff --git a/eng/common/templates/jobs/source-build.yml b/eng/common/templates/jobs/source-build.yml index a15b07eb51d9..5f46bfa895c1 100644 --- a/eng/common/templates/jobs/source-build.yml +++ b/eng/common/templates/jobs/source-build.yml @@ -21,6 +21,12 @@ parameters: # one job runs on 'defaultManagedPlatform'. platforms: [] + # If set to true and running on a non-public project, + # Internal nuget and blob storage locations will be enabled. + # This is not enabled by default because many repositories do not need internal sources + # and do not need to have the required service connections approved in the pipeline. + enableInternalSources: false + jobs: - ${{ if ne(parameters.allCompletedJobId, '') }}: @@ -38,9 +44,11 @@ jobs: parameters: jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ platform }} + enableInternalSources: ${{ parameters.enableInternalSources }} - ${{ if eq(length(parameters.platforms), 0) }}: - template: /eng/common/templates/job/source-build.yml parameters: jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ parameters.defaultManagedPlatform }} + enableInternalSources: ${{ parameters.enableInternalSources }} diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index aba44a25a338..2db4933468fd 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -268,14 +268,16 @@ stages: - task: NuGetAuthenticate@1 - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Using Darc inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 arguments: -BuildId $(BARBuildId) -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' - -MaestroToken '$(MaestroApiAccessToken)' -WaitPublishingFinish true -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/templates/post-build/setup-maestro-vars.yml b/eng/common/templates/post-build/setup-maestro-vars.yml index 0c87f149a4ad..64b9abc68504 100644 --- a/eng/common/templates/post-build/setup-maestro-vars.yml +++ b/eng/common/templates/post-build/setup-maestro-vars.yml @@ -11,13 +11,14 @@ steps: artifactName: ReleaseConfigs checkDownloadedFiles: true - - task: PowerShell@2 + - task: AzureCLI@2 name: setReleaseVars displayName: Set Release Configs Vars inputs: - targetType: inline - pwsh: true - script: | + azureSubscription: "Darc: Maestro Production" + scriptType: pscore + scriptLocation: inlineScript + inlineScript: | try { if (!$Env:PromoteToMaestroChannels -or $Env:PromoteToMaestroChannels.Trim() -eq '') { $Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt @@ -31,15 +32,16 @@ steps: $AzureDevOpsBuildId = $Env:Build_BuildId } else { - $buildApiEndpoint = "${Env:MaestroApiEndPoint}/api/builds/${Env:BARBuildId}?api-version=${Env:MaestroApiVersion}" + . $(Build.SourcesDirectory)\eng\common\tools.ps1 + $darc = Get-Darc + $buildInfo = & $darc get-build ` + --id ${{ parameters.BARBuildId }} ` + --extended ` + --output-format json ` + --ci ` + | convertFrom-Json - $apiHeaders = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]' - $apiHeaders.Add('Accept', 'application/json') - $apiHeaders.Add('Authorization',"Bearer ${Env:MAESTRO_API_TOKEN}") - - $buildInfo = try { Invoke-WebRequest -Method Get -Uri $buildApiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" } - - $BarId = $Env:BARBuildId + $BarId = ${{ parameters.BARBuildId }} $Channels = $Env:PromoteToMaestroChannels -split "," $Channels = $Channels -join "][" $Channels = "[$Channels]" @@ -65,6 +67,4 @@ steps: exit 1 } env: - MAESTRO_API_TOKEN: $(MaestroApiAccessToken) - BARBuildId: ${{ parameters.BARBuildId }} PromoteToMaestroChannels: ${{ parameters.PromoteToChannelIds }} diff --git a/eng/common/templates/steps/enable-internal-runtimes.yml b/eng/common/templates/steps/enable-internal-runtimes.yml new file mode 100644 index 000000000000..54dc9416c519 --- /dev/null +++ b/eng/common/templates/steps/enable-internal-runtimes.yml @@ -0,0 +1,28 @@ +# Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' +# variable with the base64-encoded SAS token, by default + +parameters: +- name: federatedServiceConnection + type: string + default: 'dotnetbuilds-internal-read' +- name: outputVariableName + type: string + default: 'dotnetbuilds-internal-container-read-token-base64' +- name: expiryInHours + type: number + default: 1 +- name: base64Encode + type: boolean + default: true + +steps: +- ${{ if ne(variables['System.TeamProject'], 'public') }}: + - template: /eng/common/templates/steps/get-delegation-sas.yml + parameters: + federatedServiceConnection: ${{ parameters.federatedServiceConnection }} + outputVariableName: ${{ parameters.outputVariableName }} + expiryInHours: ${{ parameters.expiryInHours }} + base64Encode: ${{ parameters.base64Encode }} + storageAccount: dotnetbuilds + container: internal + permissions: rl diff --git a/eng/common/templates/steps/get-delegation-sas.yml b/eng/common/templates/steps/get-delegation-sas.yml new file mode 100644 index 000000000000..c0e8f91317f0 --- /dev/null +++ b/eng/common/templates/steps/get-delegation-sas.yml @@ -0,0 +1,43 @@ +parameters: +- name: federatedServiceConnection + type: string +- name: outputVariableName + type: string +- name: expiryInHours + type: number + default: 1 +- name: base64Encode + type: boolean + default: false +- name: storageAccount + type: string +- name: container + type: string +- name: permissions + type: string + default: 'rl' + +steps: +- task: AzureCLI@2 + displayName: 'Generate delegation SAS Token for ${{ parameters.storageAccount }}/${{ parameters.container }}' + inputs: + azureSubscription: ${{ parameters.federatedServiceConnection }} + scriptType: 'pscore' + scriptLocation: 'inlineScript' + inlineScript: | + # Calculate the expiration of the SAS token and convert to UTC + $expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") + + $sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv + + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to generate SAS token." + exit 1 + } + + if ('${{ parameters.base64Encode }}' -eq 'true') { + $sas = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($sas)) + } + + Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$sas" diff --git a/eng/common/templates/steps/get-federated-access-token.yml b/eng/common/templates/steps/get-federated-access-token.yml new file mode 100644 index 000000000000..c8c49cc0e8f0 --- /dev/null +++ b/eng/common/templates/steps/get-federated-access-token.yml @@ -0,0 +1,28 @@ +parameters: +- name: federatedServiceConnection + type: string +- name: outputVariableName + type: string +# Resource to get a token for. Common values include: +# - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps +# - 'https://storage.azure.com/' for storage +# Defaults to Azure DevOps +- name: resource + type: string + default: '499b84ac-1321-427f-aa17-267ca6975798' + +steps: +- task: AzureCLI@2 + displayName: 'Getting federated access token for feeds' + inputs: + azureSubscription: ${{ parameters.federatedServiceConnection }} + scriptType: 'pscore' + scriptLocation: 'inlineScript' + inlineScript: | + $accessToken = az account get-access-token --query accessToken --resource ${{ parameters.resource }} --output tsv + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to get access token for resource '${{ parameters.resource }}'" + exit 1 + } + Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$accessToken" \ No newline at end of file diff --git a/global.json b/global.json index 482d5fb11895..ddd87ad0324e 100644 --- a/global.json +++ b/global.json @@ -14,7 +14,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24266.3", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24266.3" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24352.1", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24352.1" } } From 146f44d7ca3f355025a96aae411c5bc3ee329803 Mon Sep 17 00:00:00 2001 From: "Matt Mitchell (.NET)" Date: Tue, 2 Jul 2024 09:25:56 -0700 Subject: [PATCH 139/159] Use delegation SAS for internal builds --- .vsts-ci-richnav.yml | 37 +++++------ .vsts-ci.yml | 6 +- .vsts-pr.yml | 18 ++---- eng/build-pr.yml | 145 ++++++++++++++++++++++--------------------- eng/build.yml | 143 +++++++++++++++++++++--------------------- 5 files changed, 175 insertions(+), 174 deletions(-) diff --git a/.vsts-ci-richnav.yml b/.vsts-ci-richnav.yml index 2b254e9b8f72..1995db108e1d 100644 --- a/.vsts-ci-richnav.yml +++ b/.vsts-ci-richnav.yml @@ -26,7 +26,7 @@ stages: richCodeNavigationEnvironment: 'production' pool: name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals windows.vs2019.amd64.open + demands: ImageOverride -equals windows.vs2019.amd64.open timeoutInMinutes: 180 strategy: matrix: @@ -45,6 +45,7 @@ stages: - _SignArgs: '' - _InternalRuntimeDownloadArgs: '' steps: + - template: /eng/common/templates/steps/enable-internal-runtimes.yml - powershell: eng\common\build.ps1 -restore -ci @@ -65,23 +66,23 @@ stages: TestFullMSBuild: 'true' SYSTEM_ACCESSTOKEN: $(System.AccessToken) - - task: CopyFiles@2 - displayName: Gather Logs - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' - Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* - SymStore/$(_BuildConfig)/**/* - TargetFolder: '$(Build.ArtifactStagingDirectory)' - continueOnError: true + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts' + Contents: | + log/$(_BuildConfig)/**/* + TestResults/$(_BuildConfig)/**/* + SymStore/$(_BuildConfig)/**/* + TargetFolder: '$(Build.ArtifactStagingDirectory)' + continueOnError: true condition: always() - - task: PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' - publishLocation: Container - continueOnError: true + - task: PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' + publishLocation: Container + continueOnError: true condition: always() diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 9362f9e0be4e..2aebe7dd3b36 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -36,10 +36,9 @@ variables: value: /p:OfficialBuilder=Microsoft - name: Codeql.Enabled value: true - - group: DotNetBuilds storage account read tokens - name: _InternalRuntimeDownloadArgs - value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal - /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) + value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal + /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - group: DotNet-CLI-SDLValidation-Params - template: /eng/common/templates-official/variables/pool-providers.yml @@ -115,6 +114,7 @@ extends: value: '' - template: /eng/common/templates-official/job/source-build.yml@self parameters: + enableInternalSources: true platform: name: 'Managed' container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8' diff --git a/.vsts-pr.yml b/.vsts-pr.yml index a7e6ce5a0de7..3736c5a7885b 100644 --- a/.vsts-pr.yml +++ b/.vsts-pr.yml @@ -18,14 +18,8 @@ pr: variables: - name: teamName value: Roslyn-Project-System - - name: _DotNetPublishToBlobFeed - value: false - name: _CIBuild value: -restore -build -sign -pack -ci - - name: _DotNetArtifactsCategory - value: .NETCore - - name: _DotNetValidationArtifactsCategory - value: .NETCore - ${{ if or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), eq(variables['Build.Reason'], 'Manual')) }}: - name: PostBuildSign value: false @@ -44,10 +38,9 @@ variables: value: /p:OfficialBuilder=Microsoft - name: Codeql.Enabled value: true - - group: DotNetBuilds storage account read tokens - name: _InternalRuntimeDownloadArgs - value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal - /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) + value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal + /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - group: DotNet-CLI-SDLValidation-Params - template: /eng/common/templates/variables/pool-providers.yml @@ -64,9 +57,9 @@ stages: name: $(DncEngInternalBuildPool) demands: ImageOverride -equals windows.vs2019.amd64 steps: - - publish: $(Build.SourcesDirectory)\eng\BuildConfiguration - artifact: BuildConfiguration - displayName: Publish Build Config + - publish: $(Build.SourcesDirectory)\eng\BuildConfiguration + artifact: BuildConfiguration + displayName: Publish Build Config - template: /eng/build-pr.yml parameters: agentOs: Windows_NT @@ -94,6 +87,7 @@ stages: _Test: '' - template: /eng/common/templates/job/source-build.yml parameters: + enableInternalSources: true platform: name: 'Managed' container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8' diff --git a/eng/build-pr.yml b/eng/build-pr.yml index 4a73ead09a65..8cc01a363611 100644 --- a/eng/build-pr.yml +++ b/eng/build-pr.yml @@ -56,7 +56,7 @@ jobs: - _OfficialBuildIdArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER) - _SignArgs: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName) - _PerfIterations: 25 - + steps: - ${{ if ne(variables['System.TeamProject'], 'public') }}: - task: PowerShell@2 @@ -66,6 +66,7 @@ jobs: arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + - template: /eng/common/templates/steps/enable-internal-runtimes.yml - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -98,7 +99,7 @@ jobs: SYSTEM_ACCESSTOKEN: $(System.AccessToken) HelixAccessToken: $(_HelixApiToken) RunAoTTests: 'false' - + - ${{ if eq(parameters.agentOs, 'Windows_NT_FullFramework') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -130,7 +131,7 @@ jobs: TestFullMSBuild: 'true' SYSTEM_ACCESSTOKEN: $(System.AccessToken) HelixAccessToken: $(_HelixApiToken) - + - ${{ if eq(parameters.agentOs, 'Windows_NT_TestAsTools') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -142,7 +143,7 @@ jobs: displayName: Build env: BuildConfig: $(_BuildConfig) - + - ${{ if notIn(parameters.agentOs, 'Windows_NT', 'Windows_NT_FullFramework', 'Windows_NT_TestAsTools') }}: - script: eng/common/build.sh $(_CIBuild) @@ -173,34 +174,34 @@ jobs: RunAoTTests: 'false' - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: xUnit - testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' - testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' - buildPlatform: '$(BuildPlatform)' - buildConfiguration: '$(_BuildConfig)' + displayName: Publish Test Results + inputs: + testResultsFormat: xUnit + testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' + testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' + buildPlatform: '$(BuildPlatform)' + buildConfiguration: '$(_BuildConfig)' condition: always() - - task: CopyFiles@2 - displayName: Gather Logs - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' - Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts' + Contents: | + log/$(_BuildConfig)/**/* + TestResults/$(_BuildConfig)/**/* SymStore/$(_BuildConfig)/**/* - TargetFolder: '$(Build.ArtifactStagingDirectory)' - continueOnError: true + TargetFolder: '$(Build.ArtifactStagingDirectory)' + continueOnError: true condition: always() - - - task: PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' - publishLocation: Container - continueOnError: true + + - task: PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' + publishLocation: Container + continueOnError: true condition: always() # AoT Jobs @@ -246,6 +247,7 @@ jobs: arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + - template: /eng/common/templates/steps/enable-internal-runtimes.yml - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -313,25 +315,25 @@ jobs: RunAoTTests: 'true' - ${{ if in(parameters.agentOs, 'Windows_NT', 'Darwin') }}: - - task: CopyFiles@2 - displayName: Gather Logs - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' - Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts' + Contents: | + log/$(_BuildConfig)/**/* + TestResults/$(_BuildConfig)/**/* SymStore/$(_BuildConfig)/**/* - TargetFolder: '$(Build.ArtifactStagingDirectory)' - continueOnError: true + TargetFolder: '$(Build.ArtifactStagingDirectory)' + continueOnError: true condition: always() - - task: PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' - publishLocation: Container - continueOnError: true + - task: PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' + publishLocation: Container + continueOnError: true condition: always() # TemplateEngine Jobs @@ -377,6 +379,7 @@ jobs: arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + - template: /eng/common/templates/steps/enable-internal-runtimes.yml - ${{ if contains(parameters.agentOs, 'Windows_NT') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -444,34 +447,34 @@ jobs: /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/dotnet-new.IntegrationTests.binlog $(_InternalRuntimeDownloadArgs) displayName: Run dotnet new Integration Tests - + - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: xUnit - testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' - testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' - buildPlatform: '$(BuildPlatform)' - buildConfiguration: '$(_BuildConfig)' + displayName: Publish Test Results + inputs: + testResultsFormat: xUnit + testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' + testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' + buildPlatform: '$(BuildPlatform)' + buildConfiguration: '$(_BuildConfig)' condition: always() - - - task: CopyFiles@2 - displayName: Gather Logs - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' - Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* + + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts' + Contents: | + log/$(_BuildConfig)/**/* + TestResults/$(_BuildConfig)/**/* SymStore/$(_BuildConfig)/**/* - TargetFolder: '$(Build.ArtifactStagingDirectory)' - continueOnError: true + TargetFolder: '$(Build.ArtifactStagingDirectory)' + continueOnError: true + condition: always() + + - task: PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' + publishLocation: Container + continueOnError: true condition: always() - - - task: PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' - publishLocation: Container - continueOnError: true - condition: always() \ No newline at end of file diff --git a/eng/build.yml b/eng/build.yml index 8bef6707871a..89002d024451 100644 --- a/eng/build.yml +++ b/eng/build.yml @@ -67,7 +67,7 @@ jobs: value: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName) - name: _PerfIterations value: 25 - + steps: - ${{ if ne(variables['System.TeamProject'], 'public') }}: - task: PowerShell@2 @@ -77,6 +77,7 @@ jobs: arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -109,7 +110,7 @@ jobs: SYSTEM_ACCESSTOKEN: $(System.AccessToken) HelixAccessToken: $(_HelixApiToken) RunAoTTests: 'false' - + - ${{ if eq(parameters.agentOs, 'Windows_NT_FullFramework') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -141,7 +142,7 @@ jobs: TestFullMSBuild: 'true' SYSTEM_ACCESSTOKEN: $(System.AccessToken) HelixAccessToken: $(_HelixApiToken) - + - ${{ if eq(parameters.agentOs, 'Windows_NT_TestAsTools') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -153,7 +154,7 @@ jobs: displayName: Build env: BuildConfig: $(_BuildConfig) - + - ${{ if notIn(parameters.agentOs, 'Windows_NT', 'Windows_NT_FullFramework', 'Windows_NT_TestAsTools') }}: - script: eng/common/build.sh $(_CIBuild) @@ -184,34 +185,34 @@ jobs: RunAoTTests: 'false' - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: xUnit - testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' - testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' - buildPlatform: '$(BuildPlatform)' - buildConfiguration: '$(_BuildConfig)' + displayName: Publish Test Results + inputs: + testResultsFormat: xUnit + testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' + testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' + buildPlatform: '$(BuildPlatform)' + buildConfiguration: '$(_BuildConfig)' condition: always() - - task: CopyFiles@2 - displayName: Gather Logs - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' - Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts' + Contents: | + log/$(_BuildConfig)/**/* + TestResults/$(_BuildConfig)/**/* SymStore/$(_BuildConfig)/**/* - TargetFolder: '$(Build.ArtifactStagingDirectory)' - continueOnError: true + TargetFolder: '$(Build.ArtifactStagingDirectory)' + continueOnError: true condition: always() - - - task: 1ES.PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' - publishLocation: Container - continueOnError: true + + - task: 1ES.PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' + publishLocation: Container + continueOnError: true condition: always() # AoT Jobs @@ -270,6 +271,7 @@ jobs: arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -337,25 +339,25 @@ jobs: RunAoTTests: 'true' - ${{ if in(parameters.agentOs, 'Windows_NT', 'Darwin') }}: - - task: CopyFiles@2 - displayName: Gather Logs - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' - Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts' + Contents: | + log/$(_BuildConfig)/**/* + TestResults/$(_BuildConfig)/**/* SymStore/$(_BuildConfig)/**/* - TargetFolder: '$(Build.ArtifactStagingDirectory)' - continueOnError: true + TargetFolder: '$(Build.ArtifactStagingDirectory)' + continueOnError: true condition: always() - - task: 1ES.PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' - publishLocation: Container - continueOnError: true + - task: 1ES.PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' + publishLocation: Container + continueOnError: true condition: always() # TemplateEngine Jobs @@ -414,6 +416,7 @@ jobs: arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml - ${{ if contains(parameters.agentOs, 'Windows_NT') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -481,34 +484,34 @@ jobs: /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/dotnet-new.IntegrationTests.binlog $(_InternalRuntimeDownloadArgs) displayName: Run dotnet new Integration Tests - + - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: xUnit - testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' - testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' - buildPlatform: '$(BuildPlatform)' - buildConfiguration: '$(_BuildConfig)' + displayName: Publish Test Results + inputs: + testResultsFormat: xUnit + testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' + testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' + buildPlatform: '$(BuildPlatform)' + buildConfiguration: '$(_BuildConfig)' condition: always() - - - task: CopyFiles@2 - displayName: Gather Logs - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' - Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* + + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts' + Contents: | + log/$(_BuildConfig)/**/* + TestResults/$(_BuildConfig)/**/* SymStore/$(_BuildConfig)/**/* - TargetFolder: '$(Build.ArtifactStagingDirectory)' - continueOnError: true + TargetFolder: '$(Build.ArtifactStagingDirectory)' + continueOnError: true condition: always() - - - task: 1ES.PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' - publishLocation: Container - continueOnError: true + + - task: 1ES.PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' + publishLocation: Container + continueOnError: true condition: always() From e8c4a32b68e9957064f95f0317d1ed2ab9c853a8 Mon Sep 17 00:00:00 2001 From: "Matt Mitchell (.NET)" Date: Tue, 2 Jul 2024 09:29:51 -0700 Subject: [PATCH 140/159] Update arcade --- NuGet.config | 4 ++ eng/Version.Details.xml | 16 +++---- eng/Versions.props | 4 +- eng/common/post-build/publish-using-darc.ps1 | 15 +++---- .../job/publish-build-assets.yml | 12 +++--- .../templates-official/job/source-build.yml | 8 ++++ .../templates-official/jobs/source-build.yml | 8 ++++ .../post-build/post-build.yml | 8 ++-- .../steps/enable-internal-runtimes.yml | 28 ++++++++++++ .../steps/get-delegation-sas.yml | 43 +++++++++++++++++++ .../steps/get-federated-access-token.yml | 28 ++++++++++++ .../templates/job/publish-build-assets.yml | 12 +++--- eng/common/templates/job/source-build.yml | 8 ++++ eng/common/templates/jobs/source-build.yml | 8 ++++ .../templates/post-build/post-build.yml | 8 ++-- .../post-build/setup-maestro-vars.yml | 28 ++++++------ .../steps/enable-internal-runtimes.yml | 28 ++++++++++++ .../templates/steps/get-delegation-sas.yml | 43 +++++++++++++++++++ .../steps/get-federated-access-token.yml | 28 ++++++++++++ global.json | 4 +- 20 files changed, 291 insertions(+), 50 deletions(-) create mode 100644 eng/common/templates-official/steps/enable-internal-runtimes.yml create mode 100644 eng/common/templates-official/steps/get-delegation-sas.yml create mode 100644 eng/common/templates-official/steps/get-federated-access-token.yml create mode 100644 eng/common/templates/steps/enable-internal-runtimes.yml create mode 100644 eng/common/templates/steps/get-delegation-sas.yml create mode 100644 eng/common/templates/steps/get-federated-access-token.yml diff --git a/NuGet.config b/NuGet.config index ca1f5e248d72..600ebd405c65 100644 --- a/NuGet.config +++ b/NuGet.config @@ -24,6 +24,10 @@ + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 206c729e37e1..236f30263401 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -483,22 +483,22 @@ - + https://github.com/dotnet/arcade - c214b6ad17aedca4fa48294d80f6c52ef2463081 + 8b879da4e449c48d99f3f642fc429379a64e8fe8 - + https://github.com/dotnet/arcade - c214b6ad17aedca4fa48294d80f6c52ef2463081 + 8b879da4e449c48d99f3f642fc429379a64e8fe8 - + https://github.com/dotnet/arcade - c214b6ad17aedca4fa48294d80f6c52ef2463081 + 8b879da4e449c48d99f3f642fc429379a64e8fe8 - + https://github.com/dotnet/arcade - c214b6ad17aedca4fa48294d80f6c52ef2463081 + 8b879da4e449c48d99f3f642fc429379a64e8fe8 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 734ba59756cd..7e8c301c485f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -35,7 +35,7 @@ 7.0.0 4.0.0 7.0.0 - 8.0.0-beta.24311.3 + 8.0.0-beta.24352.1 7.0.0-preview.22423.2 8.0.0 4.3.0 @@ -210,7 +210,7 @@ 6.12.0 6.1.0 - 8.0.0-beta.24311.3 + 8.0.0-beta.24352.1 4.18.4 1.3.2 8.0.0-beta.23607.1 diff --git a/eng/common/post-build/publish-using-darc.ps1 b/eng/common/post-build/publish-using-darc.ps1 index 5a3a32ea8d75..238945cb5ab4 100644 --- a/eng/common/post-build/publish-using-darc.ps1 +++ b/eng/common/post-build/publish-using-darc.ps1 @@ -2,7 +2,6 @@ param( [Parameter(Mandatory=$true)][int] $BuildId, [Parameter(Mandatory=$true)][int] $PublishingInfraVersion, [Parameter(Mandatory=$true)][string] $AzdoToken, - [Parameter(Mandatory=$true)][string] $MaestroToken, [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net', [Parameter(Mandatory=$true)][string] $WaitPublishingFinish, [Parameter(Mandatory=$false)][string] $ArtifactsPublishingAdditionalParameters, @@ -31,13 +30,13 @@ try { } & $darc add-build-to-channel ` - --id $buildId ` - --publishing-infra-version $PublishingInfraVersion ` - --default-channels ` - --source-branch main ` - --azdev-pat $AzdoToken ` - --bar-uri $MaestroApiEndPoint ` - --password $MaestroToken ` + --id $buildId ` + --publishing-infra-version $PublishingInfraVersion ` + --default-channels ` + --source-branch main ` + --azdev-pat "$AzdoToken" ` + --bar-uri "$MaestroApiEndPoint" ` + --ci ` @optionalParams if ($LastExitCode -ne 0) { diff --git a/eng/common/templates-official/job/publish-build-assets.yml b/eng/common/templates-official/job/publish-build-assets.yml index 589ac80a18b7..d01739c12857 100644 --- a/eng/common/templates-official/job/publish-build-assets.yml +++ b/eng/common/templates-official/job/publish-build-assets.yml @@ -76,13 +76,16 @@ jobs: - task: NuGetAuthenticate@1 - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Build Assets inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/sdk-task.ps1 + arguments: > + -task PublishBuildAssets -restore -msbuildEngine dotnet /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests' - /p:BuildAssetRegistryToken=$(MaestroAccessToken) /p:MaestroApiEndpoint=https://maestro-prod.westus2.cloudapp.azure.com /p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }} /p:OfficialBuildId=$(Build.BuildNumber) @@ -144,7 +147,6 @@ jobs: arguments: -BuildId $(BARBuildId) -PublishingInfraVersion 3 -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' - -MaestroToken '$(MaestroApiAccessToken)' -WaitPublishingFinish true -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/templates-official/job/source-build.yml b/eng/common/templates-official/job/source-build.yml index f193dfbe2366..f983033bb028 100644 --- a/eng/common/templates-official/job/source-build.yml +++ b/eng/common/templates-official/job/source-build.yml @@ -31,6 +31,12 @@ parameters: # container and pool. platform: {} + # If set to true and running on a non-public project, + # Internal blob storage locations will be enabled. + # This is not enabled by default because many repositories do not need internal sources + # and do not need to have the required service connections approved in the pipeline. + enableInternalSources: false + jobs: - job: ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }} displayName: Source-Build (${{ parameters.platform.name }}) @@ -62,6 +68,8 @@ jobs: clean: all steps: + - ${{ if eq(parameters.enableInternalSources, true) }}: + - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml - template: /eng/common/templates-official/steps/source-build.yml parameters: platform: ${{ parameters.platform }} diff --git a/eng/common/templates-official/jobs/source-build.yml b/eng/common/templates-official/jobs/source-build.yml index 08e5db9bb116..5cf6a269c0b6 100644 --- a/eng/common/templates-official/jobs/source-build.yml +++ b/eng/common/templates-official/jobs/source-build.yml @@ -21,6 +21,12 @@ parameters: # one job runs on 'defaultManagedPlatform'. platforms: [] + # If set to true and running on a non-public project, + # Internal nuget and blob storage locations will be enabled. + # This is not enabled by default because many repositories do not need internal sources + # and do not need to have the required service connections approved in the pipeline. + enableInternalSources: false + jobs: - ${{ if ne(parameters.allCompletedJobId, '') }}: @@ -38,9 +44,11 @@ jobs: parameters: jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ platform }} + enableInternalSources: ${{ parameters.enableInternalSources }} - ${{ if eq(length(parameters.platforms), 0) }}: - template: /eng/common/templates-official/job/source-build.yml parameters: jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ parameters.defaultManagedPlatform }} + enableInternalSources: ${{ parameters.enableInternalSources }} diff --git a/eng/common/templates-official/post-build/post-build.yml b/eng/common/templates-official/post-build/post-build.yml index da1f40958b45..0dfa387e7b78 100644 --- a/eng/common/templates-official/post-build/post-build.yml +++ b/eng/common/templates-official/post-build/post-build.yml @@ -272,14 +272,16 @@ stages: - task: NuGetAuthenticate@1 - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Using Darc inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 arguments: -BuildId $(BARBuildId) -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' - -MaestroToken '$(MaestroApiAccessToken)' -WaitPublishingFinish true -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/templates-official/steps/enable-internal-runtimes.yml b/eng/common/templates-official/steps/enable-internal-runtimes.yml new file mode 100644 index 000000000000..93a8394a666b --- /dev/null +++ b/eng/common/templates-official/steps/enable-internal-runtimes.yml @@ -0,0 +1,28 @@ +# Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' +# variable with the base64-encoded SAS token, by default + +parameters: +- name: federatedServiceConnection + type: string + default: 'dotnetbuilds-internal-read' +- name: outputVariableName + type: string + default: 'dotnetbuilds-internal-container-read-token-base64' +- name: expiryInHours + type: number + default: 1 +- name: base64Encode + type: boolean + default: true + +steps: +- ${{ if ne(variables['System.TeamProject'], 'public') }}: + - template: /eng/common/templates-official/steps/get-delegation-sas.yml + parameters: + federatedServiceConnection: ${{ parameters.federatedServiceConnection }} + outputVariableName: ${{ parameters.outputVariableName }} + expiryInHours: ${{ parameters.expiryInHours }} + base64Encode: ${{ parameters.base64Encode }} + storageAccount: dotnetbuilds + container: internal + permissions: rl diff --git a/eng/common/templates-official/steps/get-delegation-sas.yml b/eng/common/templates-official/steps/get-delegation-sas.yml new file mode 100644 index 000000000000..c0e8f91317f0 --- /dev/null +++ b/eng/common/templates-official/steps/get-delegation-sas.yml @@ -0,0 +1,43 @@ +parameters: +- name: federatedServiceConnection + type: string +- name: outputVariableName + type: string +- name: expiryInHours + type: number + default: 1 +- name: base64Encode + type: boolean + default: false +- name: storageAccount + type: string +- name: container + type: string +- name: permissions + type: string + default: 'rl' + +steps: +- task: AzureCLI@2 + displayName: 'Generate delegation SAS Token for ${{ parameters.storageAccount }}/${{ parameters.container }}' + inputs: + azureSubscription: ${{ parameters.federatedServiceConnection }} + scriptType: 'pscore' + scriptLocation: 'inlineScript' + inlineScript: | + # Calculate the expiration of the SAS token and convert to UTC + $expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") + + $sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv + + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to generate SAS token." + exit 1 + } + + if ('${{ parameters.base64Encode }}' -eq 'true') { + $sas = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($sas)) + } + + Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$sas" diff --git a/eng/common/templates-official/steps/get-federated-access-token.yml b/eng/common/templates-official/steps/get-federated-access-token.yml new file mode 100644 index 000000000000..e3786cef6dfd --- /dev/null +++ b/eng/common/templates-official/steps/get-federated-access-token.yml @@ -0,0 +1,28 @@ +parameters: +- name: federatedServiceConnection + type: string +- name: outputVariableName + type: string +# Resource to get a token for. Common values include: +# - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps +# - 'https://storage.azure.com/' for storage +# Defaults to Azure DevOps +- name: resource + type: string + default: '499b84ac-1321-427f-aa17-267ca6975798' + +steps: +- task: AzureCLI@2 + displayName: 'Getting federated access token for feeds' + inputs: + azureSubscription: ${{ parameters.federatedServiceConnection }} + scriptType: 'pscore' + scriptLocation: 'inlineScript' + inlineScript: | + $accessToken = az account get-access-token --query accessToken --resource ${{ parameters.resource }} --output tsv + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to get access token for resource '${{ parameters.resource }}'" + exit 1 + } + Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$accessToken" diff --git a/eng/common/templates/job/publish-build-assets.yml b/eng/common/templates/job/publish-build-assets.yml index 8ec0151def21..9fd69fa7c9b7 100644 --- a/eng/common/templates/job/publish-build-assets.yml +++ b/eng/common/templates/job/publish-build-assets.yml @@ -74,13 +74,16 @@ jobs: - task: NuGetAuthenticate@1 - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Build Assets inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/sdk-task.ps1 + arguments: > + -task PublishBuildAssets -restore -msbuildEngine dotnet /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests' - /p:BuildAssetRegistryToken=$(MaestroAccessToken) /p:MaestroApiEndpoint=https://maestro.dot.net /p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }} /p:OfficialBuildId=$(Build.BuildNumber) @@ -140,7 +143,6 @@ jobs: arguments: -BuildId $(BARBuildId) -PublishingInfraVersion 3 -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' - -MaestroToken '$(MaestroApiAccessToken)' -WaitPublishingFinish true -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/templates/job/source-build.yml b/eng/common/templates/job/source-build.yml index 8a3deef2b727..c0ff472b697b 100644 --- a/eng/common/templates/job/source-build.yml +++ b/eng/common/templates/job/source-build.yml @@ -31,6 +31,12 @@ parameters: # container and pool. platform: {} + # If set to true and running on a non-public project, + # Internal blob storage locations will be enabled. + # This is not enabled by default because many repositories do not need internal sources + # and do not need to have the required service connections approved in the pipeline. + enableInternalSources: false + jobs: - job: ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }} displayName: Source-Build (${{ parameters.platform.name }}) @@ -61,6 +67,8 @@ jobs: clean: all steps: + - ${{ if eq(parameters.enableInternalSources, true) }}: + - template: /eng/common/templates/steps/enable-internal-runtimes.yml - template: /eng/common/templates/steps/source-build.yml parameters: platform: ${{ parameters.platform }} diff --git a/eng/common/templates/jobs/source-build.yml b/eng/common/templates/jobs/source-build.yml index a15b07eb51d9..5f46bfa895c1 100644 --- a/eng/common/templates/jobs/source-build.yml +++ b/eng/common/templates/jobs/source-build.yml @@ -21,6 +21,12 @@ parameters: # one job runs on 'defaultManagedPlatform'. platforms: [] + # If set to true and running on a non-public project, + # Internal nuget and blob storage locations will be enabled. + # This is not enabled by default because many repositories do not need internal sources + # and do not need to have the required service connections approved in the pipeline. + enableInternalSources: false + jobs: - ${{ if ne(parameters.allCompletedJobId, '') }}: @@ -38,9 +44,11 @@ jobs: parameters: jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ platform }} + enableInternalSources: ${{ parameters.enableInternalSources }} - ${{ if eq(length(parameters.platforms), 0) }}: - template: /eng/common/templates/job/source-build.yml parameters: jobNamePrefix: ${{ parameters.jobNamePrefix }} platform: ${{ parameters.defaultManagedPlatform }} + enableInternalSources: ${{ parameters.enableInternalSources }} diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index aba44a25a338..2db4933468fd 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -268,14 +268,16 @@ stages: - task: NuGetAuthenticate@1 - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Using Darc inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 arguments: -BuildId $(BARBuildId) -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' - -MaestroToken '$(MaestroApiAccessToken)' -WaitPublishingFinish true -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/templates/post-build/setup-maestro-vars.yml b/eng/common/templates/post-build/setup-maestro-vars.yml index 0c87f149a4ad..64b9abc68504 100644 --- a/eng/common/templates/post-build/setup-maestro-vars.yml +++ b/eng/common/templates/post-build/setup-maestro-vars.yml @@ -11,13 +11,14 @@ steps: artifactName: ReleaseConfigs checkDownloadedFiles: true - - task: PowerShell@2 + - task: AzureCLI@2 name: setReleaseVars displayName: Set Release Configs Vars inputs: - targetType: inline - pwsh: true - script: | + azureSubscription: "Darc: Maestro Production" + scriptType: pscore + scriptLocation: inlineScript + inlineScript: | try { if (!$Env:PromoteToMaestroChannels -or $Env:PromoteToMaestroChannels.Trim() -eq '') { $Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt @@ -31,15 +32,16 @@ steps: $AzureDevOpsBuildId = $Env:Build_BuildId } else { - $buildApiEndpoint = "${Env:MaestroApiEndPoint}/api/builds/${Env:BARBuildId}?api-version=${Env:MaestroApiVersion}" + . $(Build.SourcesDirectory)\eng\common\tools.ps1 + $darc = Get-Darc + $buildInfo = & $darc get-build ` + --id ${{ parameters.BARBuildId }} ` + --extended ` + --output-format json ` + --ci ` + | convertFrom-Json - $apiHeaders = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]' - $apiHeaders.Add('Accept', 'application/json') - $apiHeaders.Add('Authorization',"Bearer ${Env:MAESTRO_API_TOKEN}") - - $buildInfo = try { Invoke-WebRequest -Method Get -Uri $buildApiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" } - - $BarId = $Env:BARBuildId + $BarId = ${{ parameters.BARBuildId }} $Channels = $Env:PromoteToMaestroChannels -split "," $Channels = $Channels -join "][" $Channels = "[$Channels]" @@ -65,6 +67,4 @@ steps: exit 1 } env: - MAESTRO_API_TOKEN: $(MaestroApiAccessToken) - BARBuildId: ${{ parameters.BARBuildId }} PromoteToMaestroChannels: ${{ parameters.PromoteToChannelIds }} diff --git a/eng/common/templates/steps/enable-internal-runtimes.yml b/eng/common/templates/steps/enable-internal-runtimes.yml new file mode 100644 index 000000000000..54dc9416c519 --- /dev/null +++ b/eng/common/templates/steps/enable-internal-runtimes.yml @@ -0,0 +1,28 @@ +# Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' +# variable with the base64-encoded SAS token, by default + +parameters: +- name: federatedServiceConnection + type: string + default: 'dotnetbuilds-internal-read' +- name: outputVariableName + type: string + default: 'dotnetbuilds-internal-container-read-token-base64' +- name: expiryInHours + type: number + default: 1 +- name: base64Encode + type: boolean + default: true + +steps: +- ${{ if ne(variables['System.TeamProject'], 'public') }}: + - template: /eng/common/templates/steps/get-delegation-sas.yml + parameters: + federatedServiceConnection: ${{ parameters.federatedServiceConnection }} + outputVariableName: ${{ parameters.outputVariableName }} + expiryInHours: ${{ parameters.expiryInHours }} + base64Encode: ${{ parameters.base64Encode }} + storageAccount: dotnetbuilds + container: internal + permissions: rl diff --git a/eng/common/templates/steps/get-delegation-sas.yml b/eng/common/templates/steps/get-delegation-sas.yml new file mode 100644 index 000000000000..c0e8f91317f0 --- /dev/null +++ b/eng/common/templates/steps/get-delegation-sas.yml @@ -0,0 +1,43 @@ +parameters: +- name: federatedServiceConnection + type: string +- name: outputVariableName + type: string +- name: expiryInHours + type: number + default: 1 +- name: base64Encode + type: boolean + default: false +- name: storageAccount + type: string +- name: container + type: string +- name: permissions + type: string + default: 'rl' + +steps: +- task: AzureCLI@2 + displayName: 'Generate delegation SAS Token for ${{ parameters.storageAccount }}/${{ parameters.container }}' + inputs: + azureSubscription: ${{ parameters.federatedServiceConnection }} + scriptType: 'pscore' + scriptLocation: 'inlineScript' + inlineScript: | + # Calculate the expiration of the SAS token and convert to UTC + $expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") + + $sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv + + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to generate SAS token." + exit 1 + } + + if ('${{ parameters.base64Encode }}' -eq 'true') { + $sas = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($sas)) + } + + Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$sas" diff --git a/eng/common/templates/steps/get-federated-access-token.yml b/eng/common/templates/steps/get-federated-access-token.yml new file mode 100644 index 000000000000..c8c49cc0e8f0 --- /dev/null +++ b/eng/common/templates/steps/get-federated-access-token.yml @@ -0,0 +1,28 @@ +parameters: +- name: federatedServiceConnection + type: string +- name: outputVariableName + type: string +# Resource to get a token for. Common values include: +# - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps +# - 'https://storage.azure.com/' for storage +# Defaults to Azure DevOps +- name: resource + type: string + default: '499b84ac-1321-427f-aa17-267ca6975798' + +steps: +- task: AzureCLI@2 + displayName: 'Getting federated access token for feeds' + inputs: + azureSubscription: ${{ parameters.federatedServiceConnection }} + scriptType: 'pscore' + scriptLocation: 'inlineScript' + inlineScript: | + $accessToken = az account get-access-token --query accessToken --resource ${{ parameters.resource }} --output tsv + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to get access token for resource '${{ parameters.resource }}'" + exit 1 + } + Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true]$accessToken" \ No newline at end of file diff --git a/global.json b/global.json index d2af4d682074..ddd87ad0324e 100644 --- a/global.json +++ b/global.json @@ -14,7 +14,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24311.3", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24311.3" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24352.1", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24352.1" } } From 00b43c9bb0db31d4e26642d71594f11050e149b9 Mon Sep 17 00:00:00 2001 From: "Matt Mitchell (.NET)" Date: Tue, 2 Jul 2024 09:25:56 -0700 Subject: [PATCH 141/159] Use delegation SAS for internal builds --- .vsts-ci-richnav.yml | 37 +++++------ .vsts-ci.yml | 6 +- .vsts-pr.yml | 18 ++---- eng/build-pr.yml | 143 ++++++++++++++++++++++--------------------- eng/build.yml | 143 ++++++++++++++++++++++--------------------- 5 files changed, 174 insertions(+), 173 deletions(-) diff --git a/.vsts-ci-richnav.yml b/.vsts-ci-richnav.yml index 2b254e9b8f72..1995db108e1d 100644 --- a/.vsts-ci-richnav.yml +++ b/.vsts-ci-richnav.yml @@ -26,7 +26,7 @@ stages: richCodeNavigationEnvironment: 'production' pool: name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals windows.vs2019.amd64.open + demands: ImageOverride -equals windows.vs2019.amd64.open timeoutInMinutes: 180 strategy: matrix: @@ -45,6 +45,7 @@ stages: - _SignArgs: '' - _InternalRuntimeDownloadArgs: '' steps: + - template: /eng/common/templates/steps/enable-internal-runtimes.yml - powershell: eng\common\build.ps1 -restore -ci @@ -65,23 +66,23 @@ stages: TestFullMSBuild: 'true' SYSTEM_ACCESSTOKEN: $(System.AccessToken) - - task: CopyFiles@2 - displayName: Gather Logs - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' - Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* - SymStore/$(_BuildConfig)/**/* - TargetFolder: '$(Build.ArtifactStagingDirectory)' - continueOnError: true + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts' + Contents: | + log/$(_BuildConfig)/**/* + TestResults/$(_BuildConfig)/**/* + SymStore/$(_BuildConfig)/**/* + TargetFolder: '$(Build.ArtifactStagingDirectory)' + continueOnError: true condition: always() - - task: PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' - publishLocation: Container - continueOnError: true + - task: PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' + publishLocation: Container + continueOnError: true condition: always() diff --git a/.vsts-ci.yml b/.vsts-ci.yml index dae1b70901af..f6a97ff62c1e 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -36,10 +36,9 @@ variables: value: /p:OfficialBuilder=Microsoft - name: Codeql.Enabled value: true - - group: DotNetBuilds storage account read tokens - name: _InternalRuntimeDownloadArgs - value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal - /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) + value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal + /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - group: DotNet-CLI-SDLValidation-Params - template: /eng/common/templates-official/variables/pool-providers.yml @@ -115,6 +114,7 @@ extends: value: '' - template: /eng/common/templates-official/job/source-build.yml@self parameters: + enableInternalSources: true platform: name: 'Managed' container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8' diff --git a/.vsts-pr.yml b/.vsts-pr.yml index de5c9f6f8d18..3cc8ded3296d 100644 --- a/.vsts-pr.yml +++ b/.vsts-pr.yml @@ -18,14 +18,8 @@ pr: variables: - name: teamName value: Roslyn-Project-System - - name: _DotNetPublishToBlobFeed - value: false - name: _CIBuild value: -restore -build -sign -pack -ci - - name: _DotNetArtifactsCategory - value: .NETCore - - name: _DotNetValidationArtifactsCategory - value: .NETCore - ${{ if or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), eq(variables['Build.Reason'], 'Manual')) }}: - name: PostBuildSign value: false @@ -44,10 +38,9 @@ variables: value: /p:OfficialBuilder=Microsoft - name: Codeql.Enabled value: true - - group: DotNetBuilds storage account read tokens - name: _InternalRuntimeDownloadArgs - value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal - /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) + value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal + /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - group: DotNet-CLI-SDLValidation-Params - template: /eng/common/templates/variables/pool-providers.yml @@ -64,9 +57,9 @@ stages: name: $(DncEngInternalBuildPool) demands: ImageOverride -equals windows.vs2019.amd64 steps: - - publish: $(Build.SourcesDirectory)\eng\BuildConfiguration - artifact: BuildConfiguration - displayName: Publish Build Config + - publish: $(Build.SourcesDirectory)\eng\BuildConfiguration + artifact: BuildConfiguration + displayName: Publish Build Config - template: /eng/build-pr.yml parameters: agentOs: Windows_NT @@ -94,6 +87,7 @@ stages: _Test: '' - template: /eng/common/templates/job/source-build.yml parameters: + enableInternalSources: true platform: name: 'Managed' container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8' diff --git a/eng/build-pr.yml b/eng/build-pr.yml index 23f394e6f943..e86d00ffded0 100644 --- a/eng/build-pr.yml +++ b/eng/build-pr.yml @@ -56,7 +56,7 @@ jobs: - _OfficialBuildIdArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER) - _SignArgs: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName) - _PerfIterations: 25 - + steps: - ${{ if ne(variables['System.TeamProject'], 'public') }}: - task: PowerShell@2 @@ -66,6 +66,7 @@ jobs: arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + - template: /eng/common/templates/steps/enable-internal-runtimes.yml - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -98,7 +99,7 @@ jobs: SYSTEM_ACCESSTOKEN: $(System.AccessToken) HelixAccessToken: $(_HelixApiToken) RunAoTTests: 'false' - + - ${{ if eq(parameters.agentOs, 'Windows_NT_FullFramework') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -130,7 +131,7 @@ jobs: TestFullMSBuild: 'true' SYSTEM_ACCESSTOKEN: $(System.AccessToken) HelixAccessToken: $(_HelixApiToken) - + - ${{ if eq(parameters.agentOs, 'Windows_NT_TestAsTools') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -142,7 +143,7 @@ jobs: displayName: Build env: BuildConfig: $(_BuildConfig) - + - ${{ if notIn(parameters.agentOs, 'Windows_NT', 'Windows_NT_FullFramework', 'Windows_NT_TestAsTools') }}: - script: eng/common/build.sh $(_CIBuild) @@ -173,35 +174,35 @@ jobs: RunAoTTests: 'false' - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: xUnit - testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' - testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' - buildPlatform: '$(BuildPlatform)' - buildConfiguration: '$(_BuildConfig)' + displayName: Publish Test Results + inputs: + testResultsFormat: xUnit + testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' + testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' + buildPlatform: '$(BuildPlatform)' + buildConfiguration: '$(_BuildConfig)' condition: always() - - task: CopyFiles@2 - displayName: Gather Logs - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' - Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts' + Contents: | + log/$(_BuildConfig)/**/* + TestResults/$(_BuildConfig)/**/* SymStore/$(_BuildConfig)/**/* tmp/$(_BuildConfig)/**/*.binlog - TargetFolder: '$(Build.ArtifactStagingDirectory)' - continueOnError: true + TargetFolder: '$(Build.ArtifactStagingDirectory)' + continueOnError: true condition: always() - - - task: PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' - publishLocation: Container - continueOnError: true + + - task: PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' + publishLocation: Container + continueOnError: true condition: always() # AoT Jobs @@ -247,6 +248,7 @@ jobs: arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + - template: /eng/common/templates/steps/enable-internal-runtimes.yml - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -314,26 +316,26 @@ jobs: RunAoTTests: 'true' - ${{ if in(parameters.agentOs, 'Windows_NT', 'Darwin') }}: - - task: CopyFiles@2 - displayName: Gather Logs - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' - Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts' + Contents: | + log/$(_BuildConfig)/**/* + TestResults/$(_BuildConfig)/**/* SymStore/$(_BuildConfig)/**/* tmp/$(_BuildConfig)/**/*.binlog - TargetFolder: '$(Build.ArtifactStagingDirectory)' - continueOnError: true + TargetFolder: '$(Build.ArtifactStagingDirectory)' + continueOnError: true condition: always() - - task: PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' - publishLocation: Container - continueOnError: true + - task: PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' + publishLocation: Container + continueOnError: true condition: always() # TemplateEngine Jobs @@ -379,6 +381,7 @@ jobs: arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + - template: /eng/common/templates/steps/enable-internal-runtimes.yml - ${{ if contains(parameters.agentOs, 'Windows_NT') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -446,35 +449,35 @@ jobs: /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/dotnet-new.IntegrationTests.binlog $(_InternalRuntimeDownloadArgs) displayName: Run dotnet new Integration Tests - + - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: xUnit - testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' - testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' - buildPlatform: '$(BuildPlatform)' - buildConfiguration: '$(_BuildConfig)' + displayName: Publish Test Results + inputs: + testResultsFormat: xUnit + testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' + testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' + buildPlatform: '$(BuildPlatform)' + buildConfiguration: '$(_BuildConfig)' condition: always() - - - task: CopyFiles@2 - displayName: Gather Logs - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' - Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* + + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts' + Contents: | + log/$(_BuildConfig)/**/* + TestResults/$(_BuildConfig)/**/* SymStore/$(_BuildConfig)/**/* tmp/$(_BuildConfig)/**/*.binlog - TargetFolder: '$(Build.ArtifactStagingDirectory)' - continueOnError: true + TargetFolder: '$(Build.ArtifactStagingDirectory)' + continueOnError: true condition: always() - - - task: PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' - publishLocation: Container - continueOnError: true + + - task: PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' + publishLocation: Container + continueOnError: true condition: always() diff --git a/eng/build.yml b/eng/build.yml index ba6ee57efb91..c65b75901aba 100644 --- a/eng/build.yml +++ b/eng/build.yml @@ -67,7 +67,7 @@ jobs: value: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName) - name: _PerfIterations value: 25 - + steps: - ${{ if ne(variables['System.TeamProject'], 'public') }}: - task: PowerShell@2 @@ -77,6 +77,7 @@ jobs: arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -109,7 +110,7 @@ jobs: SYSTEM_ACCESSTOKEN: $(System.AccessToken) HelixAccessToken: $(_HelixApiToken) RunAoTTests: 'false' - + - ${{ if eq(parameters.agentOs, 'Windows_NT_FullFramework') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -141,7 +142,7 @@ jobs: TestFullMSBuild: 'true' SYSTEM_ACCESSTOKEN: $(System.AccessToken) HelixAccessToken: $(_HelixApiToken) - + - ${{ if eq(parameters.agentOs, 'Windows_NT_TestAsTools') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -153,7 +154,7 @@ jobs: displayName: Build env: BuildConfig: $(_BuildConfig) - + - ${{ if notIn(parameters.agentOs, 'Windows_NT', 'Windows_NT_FullFramework', 'Windows_NT_TestAsTools') }}: - script: eng/common/build.sh $(_CIBuild) @@ -184,35 +185,35 @@ jobs: RunAoTTests: 'false' - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: xUnit - testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' - testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' - buildPlatform: '$(BuildPlatform)' - buildConfiguration: '$(_BuildConfig)' + displayName: Publish Test Results + inputs: + testResultsFormat: xUnit + testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' + testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' + buildPlatform: '$(BuildPlatform)' + buildConfiguration: '$(_BuildConfig)' condition: always() - - task: CopyFiles@2 - displayName: Gather Logs - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' - Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts' + Contents: | + log/$(_BuildConfig)/**/* + TestResults/$(_BuildConfig)/**/* SymStore/$(_BuildConfig)/**/* tmp/$(_BuildConfig)/**/*.binlog - TargetFolder: '$(Build.ArtifactStagingDirectory)' - continueOnError: true + TargetFolder: '$(Build.ArtifactStagingDirectory)' + continueOnError: true condition: always() - - - task: 1ES.PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' - publishLocation: Container - continueOnError: true + + - task: 1ES.PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' + publishLocation: Container + continueOnError: true condition: always() # AoT Jobs @@ -271,6 +272,7 @@ jobs: arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -338,26 +340,26 @@ jobs: RunAoTTests: 'true' - ${{ if in(parameters.agentOs, 'Windows_NT', 'Darwin') }}: - - task: CopyFiles@2 - displayName: Gather Logs - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' - Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts' + Contents: | + log/$(_BuildConfig)/**/* + TestResults/$(_BuildConfig)/**/* SymStore/$(_BuildConfig)/**/* tmp/$(_BuildConfig)/**/*.binlog - TargetFolder: '$(Build.ArtifactStagingDirectory)' - continueOnError: true + TargetFolder: '$(Build.ArtifactStagingDirectory)' + continueOnError: true condition: always() - - task: 1ES.PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' - publishLocation: Container - continueOnError: true + - task: 1ES.PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' + publishLocation: Container + continueOnError: true condition: always() # TemplateEngine Jobs @@ -416,6 +418,7 @@ jobs: arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml - ${{ if contains(parameters.agentOs, 'Windows_NT') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -483,35 +486,35 @@ jobs: /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/dotnet-new.IntegrationTests.binlog $(_InternalRuntimeDownloadArgs) displayName: Run dotnet new Integration Tests - + - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: xUnit - testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' - testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' - buildPlatform: '$(BuildPlatform)' - buildConfiguration: '$(_BuildConfig)' + displayName: Publish Test Results + inputs: + testResultsFormat: xUnit + testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' + testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' + buildPlatform: '$(BuildPlatform)' + buildConfiguration: '$(_BuildConfig)' condition: always() - - - task: CopyFiles@2 - displayName: Gather Logs - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' - Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* + + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts' + Contents: | + log/$(_BuildConfig)/**/* + TestResults/$(_BuildConfig)/**/* SymStore/$(_BuildConfig)/**/* tmp/$(_BuildConfig)/**/*.binlog - TargetFolder: '$(Build.ArtifactStagingDirectory)' - continueOnError: true + TargetFolder: '$(Build.ArtifactStagingDirectory)' + continueOnError: true condition: always() - - - task: 1ES.PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' - publishLocation: Container - continueOnError: true + + - task: 1ES.PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' + publishLocation: Container + continueOnError: true condition: always() From 6e6354143ae04e592e30b6a9f2e6b5a07e8f02c4 Mon Sep 17 00:00:00 2001 From: "Matt Mitchell (.NET)" Date: Tue, 2 Jul 2024 09:36:03 -0700 Subject: [PATCH 142/159] update arcade --- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 4 ++-- global.json | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4750cd7614c9..dbbe73c275d0 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -479,22 +479,22 @@ - + https://github.com/dotnet/arcade - 761c516b64fee3941d8909d24205ced835eed83e + 8b879da4e449c48d99f3f642fc429379a64e8fe8 - + https://github.com/dotnet/arcade - 761c516b64fee3941d8909d24205ced835eed83e + 8b879da4e449c48d99f3f642fc429379a64e8fe8 - + https://github.com/dotnet/arcade - 761c516b64fee3941d8909d24205ced835eed83e + 8b879da4e449c48d99f3f642fc429379a64e8fe8 - + https://github.com/dotnet/arcade - 761c516b64fee3941d8909d24205ced835eed83e + 8b879da4e449c48d99f3f642fc429379a64e8fe8 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 1cfc52f00d55..7fc64489260e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -35,7 +35,7 @@ 8.0.0 4.0.0 8.0.0 - 8.0.0-beta.24328.2 + 8.0.0-beta.24352.1 7.0.0-preview.22423.2 8.0.0 4.3.0 @@ -210,7 +210,7 @@ 6.12.0 6.1.0 - 8.0.0-beta.24328.2 + 8.0.0-beta.24352.1 4.18.4 1.3.2 8.0.0-beta.23607.1 diff --git a/global.json b/global.json index 74e605301f20..ddd87ad0324e 100644 --- a/global.json +++ b/global.json @@ -14,7 +14,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24328.2", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24328.2" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24352.1", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24352.1" } } From 16db5b6717b4c223bd0a657951f0abc898223373 Mon Sep 17 00:00:00 2001 From: "Matt Mitchell (.NET)" Date: Tue, 2 Jul 2024 09:25:56 -0700 Subject: [PATCH 143/159] Use delegation SAS for internal builds --- .vsts-ci-richnav.yml | 37 +++++------ .vsts-ci.yml | 6 +- .vsts-pr.yml | 18 ++---- eng/build-pr.yml | 143 ++++++++++++++++++++++--------------------- eng/build.yml | 143 ++++++++++++++++++++++--------------------- 5 files changed, 174 insertions(+), 173 deletions(-) diff --git a/.vsts-ci-richnav.yml b/.vsts-ci-richnav.yml index 2b254e9b8f72..1995db108e1d 100644 --- a/.vsts-ci-richnav.yml +++ b/.vsts-ci-richnav.yml @@ -26,7 +26,7 @@ stages: richCodeNavigationEnvironment: 'production' pool: name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals windows.vs2019.amd64.open + demands: ImageOverride -equals windows.vs2019.amd64.open timeoutInMinutes: 180 strategy: matrix: @@ -45,6 +45,7 @@ stages: - _SignArgs: '' - _InternalRuntimeDownloadArgs: '' steps: + - template: /eng/common/templates/steps/enable-internal-runtimes.yml - powershell: eng\common\build.ps1 -restore -ci @@ -65,23 +66,23 @@ stages: TestFullMSBuild: 'true' SYSTEM_ACCESSTOKEN: $(System.AccessToken) - - task: CopyFiles@2 - displayName: Gather Logs - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' - Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* - SymStore/$(_BuildConfig)/**/* - TargetFolder: '$(Build.ArtifactStagingDirectory)' - continueOnError: true + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts' + Contents: | + log/$(_BuildConfig)/**/* + TestResults/$(_BuildConfig)/**/* + SymStore/$(_BuildConfig)/**/* + TargetFolder: '$(Build.ArtifactStagingDirectory)' + continueOnError: true condition: always() - - task: PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' - publishLocation: Container - continueOnError: true + - task: PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' + publishLocation: Container + continueOnError: true condition: always() diff --git a/.vsts-ci.yml b/.vsts-ci.yml index c1f1474f17e7..1d77a6699c99 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -36,10 +36,9 @@ variables: value: /p:OfficialBuilder=Microsoft - name: Codeql.Enabled value: true - - group: DotNetBuilds storage account read tokens - name: _InternalRuntimeDownloadArgs - value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal - /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) + value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal + /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - group: DotNet-CLI-SDLValidation-Params - template: /eng/common/templates-official/variables/pool-providers.yml @@ -115,6 +114,7 @@ extends: value: '' - template: /eng/common/templates-official/job/source-build.yml@self parameters: + enableInternalSources: true platform: name: 'Managed' container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9' diff --git a/.vsts-pr.yml b/.vsts-pr.yml index f5605dbdabd9..668b3b1e47b9 100644 --- a/.vsts-pr.yml +++ b/.vsts-pr.yml @@ -18,14 +18,8 @@ pr: variables: - name: teamName value: Roslyn-Project-System - - name: _DotNetPublishToBlobFeed - value: false - name: _CIBuild value: -restore -build -sign -pack -ci - - name: _DotNetArtifactsCategory - value: .NETCore - - name: _DotNetValidationArtifactsCategory - value: .NETCore - ${{ if or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), eq(variables['Build.Reason'], 'Manual')) }}: - name: PostBuildSign value: false @@ -44,10 +38,9 @@ variables: value: /p:OfficialBuilder=Microsoft - name: Codeql.Enabled value: true - - group: DotNetBuilds storage account read tokens - name: _InternalRuntimeDownloadArgs - value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal - /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) + value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal + /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - group: DotNet-CLI-SDLValidation-Params - template: /eng/common/templates/variables/pool-providers.yml @@ -64,9 +57,9 @@ stages: name: $(DncEngInternalBuildPool) demands: ImageOverride -equals windows.vs2019.amd64 steps: - - publish: $(Build.SourcesDirectory)\eng\BuildConfiguration - artifact: BuildConfiguration - displayName: Publish Build Config + - publish: $(Build.SourcesDirectory)\eng\BuildConfiguration + artifact: BuildConfiguration + displayName: Publish Build Config - template: /eng/build-pr.yml parameters: agentOs: Windows_NT @@ -94,6 +87,7 @@ stages: _Test: '' - template: /eng/common/templates/job/source-build.yml parameters: + enableInternalSources: true platform: name: 'Managed' container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9' diff --git a/eng/build-pr.yml b/eng/build-pr.yml index 23f394e6f943..e86d00ffded0 100644 --- a/eng/build-pr.yml +++ b/eng/build-pr.yml @@ -56,7 +56,7 @@ jobs: - _OfficialBuildIdArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER) - _SignArgs: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName) - _PerfIterations: 25 - + steps: - ${{ if ne(variables['System.TeamProject'], 'public') }}: - task: PowerShell@2 @@ -66,6 +66,7 @@ jobs: arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + - template: /eng/common/templates/steps/enable-internal-runtimes.yml - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -98,7 +99,7 @@ jobs: SYSTEM_ACCESSTOKEN: $(System.AccessToken) HelixAccessToken: $(_HelixApiToken) RunAoTTests: 'false' - + - ${{ if eq(parameters.agentOs, 'Windows_NT_FullFramework') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -130,7 +131,7 @@ jobs: TestFullMSBuild: 'true' SYSTEM_ACCESSTOKEN: $(System.AccessToken) HelixAccessToken: $(_HelixApiToken) - + - ${{ if eq(parameters.agentOs, 'Windows_NT_TestAsTools') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -142,7 +143,7 @@ jobs: displayName: Build env: BuildConfig: $(_BuildConfig) - + - ${{ if notIn(parameters.agentOs, 'Windows_NT', 'Windows_NT_FullFramework', 'Windows_NT_TestAsTools') }}: - script: eng/common/build.sh $(_CIBuild) @@ -173,35 +174,35 @@ jobs: RunAoTTests: 'false' - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: xUnit - testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' - testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' - buildPlatform: '$(BuildPlatform)' - buildConfiguration: '$(_BuildConfig)' + displayName: Publish Test Results + inputs: + testResultsFormat: xUnit + testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' + testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' + buildPlatform: '$(BuildPlatform)' + buildConfiguration: '$(_BuildConfig)' condition: always() - - task: CopyFiles@2 - displayName: Gather Logs - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' - Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts' + Contents: | + log/$(_BuildConfig)/**/* + TestResults/$(_BuildConfig)/**/* SymStore/$(_BuildConfig)/**/* tmp/$(_BuildConfig)/**/*.binlog - TargetFolder: '$(Build.ArtifactStagingDirectory)' - continueOnError: true + TargetFolder: '$(Build.ArtifactStagingDirectory)' + continueOnError: true condition: always() - - - task: PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' - publishLocation: Container - continueOnError: true + + - task: PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' + publishLocation: Container + continueOnError: true condition: always() # AoT Jobs @@ -247,6 +248,7 @@ jobs: arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + - template: /eng/common/templates/steps/enable-internal-runtimes.yml - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -314,26 +316,26 @@ jobs: RunAoTTests: 'true' - ${{ if in(parameters.agentOs, 'Windows_NT', 'Darwin') }}: - - task: CopyFiles@2 - displayName: Gather Logs - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' - Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts' + Contents: | + log/$(_BuildConfig)/**/* + TestResults/$(_BuildConfig)/**/* SymStore/$(_BuildConfig)/**/* tmp/$(_BuildConfig)/**/*.binlog - TargetFolder: '$(Build.ArtifactStagingDirectory)' - continueOnError: true + TargetFolder: '$(Build.ArtifactStagingDirectory)' + continueOnError: true condition: always() - - task: PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' - publishLocation: Container - continueOnError: true + - task: PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' + publishLocation: Container + continueOnError: true condition: always() # TemplateEngine Jobs @@ -379,6 +381,7 @@ jobs: arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + - template: /eng/common/templates/steps/enable-internal-runtimes.yml - ${{ if contains(parameters.agentOs, 'Windows_NT') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -446,35 +449,35 @@ jobs: /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/dotnet-new.IntegrationTests.binlog $(_InternalRuntimeDownloadArgs) displayName: Run dotnet new Integration Tests - + - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: xUnit - testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' - testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' - buildPlatform: '$(BuildPlatform)' - buildConfiguration: '$(_BuildConfig)' + displayName: Publish Test Results + inputs: + testResultsFormat: xUnit + testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' + testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' + buildPlatform: '$(BuildPlatform)' + buildConfiguration: '$(_BuildConfig)' condition: always() - - - task: CopyFiles@2 - displayName: Gather Logs - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' - Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* + + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts' + Contents: | + log/$(_BuildConfig)/**/* + TestResults/$(_BuildConfig)/**/* SymStore/$(_BuildConfig)/**/* tmp/$(_BuildConfig)/**/*.binlog - TargetFolder: '$(Build.ArtifactStagingDirectory)' - continueOnError: true + TargetFolder: '$(Build.ArtifactStagingDirectory)' + continueOnError: true condition: always() - - - task: PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' - publishLocation: Container - continueOnError: true + + - task: PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' + publishLocation: Container + continueOnError: true condition: always() diff --git a/eng/build.yml b/eng/build.yml index ba6ee57efb91..c65b75901aba 100644 --- a/eng/build.yml +++ b/eng/build.yml @@ -67,7 +67,7 @@ jobs: value: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName) - name: _PerfIterations value: 25 - + steps: - ${{ if ne(variables['System.TeamProject'], 'public') }}: - task: PowerShell@2 @@ -77,6 +77,7 @@ jobs: arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -109,7 +110,7 @@ jobs: SYSTEM_ACCESSTOKEN: $(System.AccessToken) HelixAccessToken: $(_HelixApiToken) RunAoTTests: 'false' - + - ${{ if eq(parameters.agentOs, 'Windows_NT_FullFramework') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -141,7 +142,7 @@ jobs: TestFullMSBuild: 'true' SYSTEM_ACCESSTOKEN: $(System.AccessToken) HelixAccessToken: $(_HelixApiToken) - + - ${{ if eq(parameters.agentOs, 'Windows_NT_TestAsTools') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -153,7 +154,7 @@ jobs: displayName: Build env: BuildConfig: $(_BuildConfig) - + - ${{ if notIn(parameters.agentOs, 'Windows_NT', 'Windows_NT_FullFramework', 'Windows_NT_TestAsTools') }}: - script: eng/common/build.sh $(_CIBuild) @@ -184,35 +185,35 @@ jobs: RunAoTTests: 'false' - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: xUnit - testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' - testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' - buildPlatform: '$(BuildPlatform)' - buildConfiguration: '$(_BuildConfig)' + displayName: Publish Test Results + inputs: + testResultsFormat: xUnit + testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' + testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' + buildPlatform: '$(BuildPlatform)' + buildConfiguration: '$(_BuildConfig)' condition: always() - - task: CopyFiles@2 - displayName: Gather Logs - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' - Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts' + Contents: | + log/$(_BuildConfig)/**/* + TestResults/$(_BuildConfig)/**/* SymStore/$(_BuildConfig)/**/* tmp/$(_BuildConfig)/**/*.binlog - TargetFolder: '$(Build.ArtifactStagingDirectory)' - continueOnError: true + TargetFolder: '$(Build.ArtifactStagingDirectory)' + continueOnError: true condition: always() - - - task: 1ES.PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' - publishLocation: Container - continueOnError: true + + - task: 1ES.PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' + publishLocation: Container + continueOnError: true condition: always() # AoT Jobs @@ -271,6 +272,7 @@ jobs: arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -338,26 +340,26 @@ jobs: RunAoTTests: 'true' - ${{ if in(parameters.agentOs, 'Windows_NT', 'Darwin') }}: - - task: CopyFiles@2 - displayName: Gather Logs - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' - Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts' + Contents: | + log/$(_BuildConfig)/**/* + TestResults/$(_BuildConfig)/**/* SymStore/$(_BuildConfig)/**/* tmp/$(_BuildConfig)/**/*.binlog - TargetFolder: '$(Build.ArtifactStagingDirectory)' - continueOnError: true + TargetFolder: '$(Build.ArtifactStagingDirectory)' + continueOnError: true condition: always() - - task: 1ES.PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' - publishLocation: Container - continueOnError: true + - task: 1ES.PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' + publishLocation: Container + continueOnError: true condition: always() # TemplateEngine Jobs @@ -416,6 +418,7 @@ jobs: arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml - ${{ if contains(parameters.agentOs, 'Windows_NT') }}: - powershell: eng\common\build.ps1 $(_CIBuild) @@ -483,35 +486,35 @@ jobs: /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/dotnet-new.IntegrationTests.binlog $(_InternalRuntimeDownloadArgs) displayName: Run dotnet new Integration Tests - + - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: xUnit - testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' - testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' - buildPlatform: '$(BuildPlatform)' - buildConfiguration: '$(_BuildConfig)' + displayName: Publish Test Results + inputs: + testResultsFormat: xUnit + testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' + testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' + buildPlatform: '$(BuildPlatform)' + buildConfiguration: '$(_BuildConfig)' condition: always() - - - task: CopyFiles@2 - displayName: Gather Logs - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' - Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* + + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts' + Contents: | + log/$(_BuildConfig)/**/* + TestResults/$(_BuildConfig)/**/* SymStore/$(_BuildConfig)/**/* tmp/$(_BuildConfig)/**/*.binlog - TargetFolder: '$(Build.ArtifactStagingDirectory)' - continueOnError: true + TargetFolder: '$(Build.ArtifactStagingDirectory)' + continueOnError: true condition: always() - - - task: 1ES.PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' - publishLocation: Container - continueOnError: true + + - task: 1ES.PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' + publishLocation: Container + continueOnError: true condition: always() From c43ba3da23c10630abd872066925ac21ca0b09cd Mon Sep 17 00:00:00 2001 From: Sean Reeser Date: Tue, 2 Jul 2024 10:45:27 -0700 Subject: [PATCH 144/159] Update branding to 8.0.108 --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index 5f6dd851d6bb..76c18b493aa4 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -11,7 +11,7 @@ - 8.0.107 + 8.0.108 true release From 6c179f9edd4eecaa6057d29f5378204b6359dac1 Mon Sep 17 00:00:00 2001 From: Sean Reeser Date: Tue, 2 Jul 2024 10:45:33 -0700 Subject: [PATCH 145/159] Update branding to 8.0.304 --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index 734ba59756cd..e5bd247428a1 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -11,7 +11,7 @@ - 8.0.303 + 8.0.304 8.0.300 true From 44b1d455ba57002586294cc201686ef06fa71ae9 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 2 Jul 2024 20:42:32 +0000 Subject: [PATCH 146/159] Update dependencies from https://github.com/dotnet/templating build 20240702.6 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.107-servicing.24270.5 -> To Version 8.0.108-servicing.24352.6 --- NuGet.config | 6 +----- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/NuGet.config b/NuGet.config index ae2cc237c36b..eefb44e5fcbc 100644 --- a/NuGet.config +++ b/NuGet.config @@ -18,11 +18,7 @@ - - - - - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9a60d356a9e2..11c19a03ac44 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,17 +1,17 @@ - + https://github.com/dotnet/templating - 224824ff7d90e091d7ed93bf056ff70c9d0d6ab9 + 1e9fcff25e09469c1418595a104dd687a962b5d2 - + https://github.com/dotnet/templating - 224824ff7d90e091d7ed93bf056ff70c9d0d6ab9 + 1e9fcff25e09469c1418595a104dd687a962b5d2 - + https://github.com/dotnet/templating - 224824ff7d90e091d7ed93bf056ff70c9d0d6ab9 + 1e9fcff25e09469c1418595a104dd687a962b5d2 diff --git a/eng/Versions.props b/eng/Versions.props index c740170ddbc5..3d6e24a0190a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -134,13 +134,13 @@ - 8.0.107 + 8.0.108 $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 8.0.107-servicing.24270.5 + 8.0.108-servicing.24352.6 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion) From 998bc07240639aeb60efeac53d7240249fa0aaf1 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 2 Jul 2024 22:00:11 +0000 Subject: [PATCH 147/159] Update dependencies from https://github.com/dotnet/templating build 20240702.11 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.107-servicing.24270.5 -> To Version 8.0.108-servicing.24352.11 --- NuGet.config | 2 +- eng/Version.Details.xml | 10 +++++----- eng/Versions.props | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/NuGet.config b/NuGet.config index eefb44e5fcbc..beb25dd60189 100644 --- a/NuGet.config +++ b/NuGet.config @@ -18,7 +18,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 11c19a03ac44..5aff599fa8e1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,15 +3,15 @@ https://github.com/dotnet/templating - 1e9fcff25e09469c1418595a104dd687a962b5d2 + 63ab5964b1d51fb2cdd355f240439efd0a198e15 - + https://github.com/dotnet/templating - 1e9fcff25e09469c1418595a104dd687a962b5d2 + 63ab5964b1d51fb2cdd355f240439efd0a198e15 - + https://github.com/dotnet/templating - 1e9fcff25e09469c1418595a104dd687a962b5d2 + 63ab5964b1d51fb2cdd355f240439efd0a198e15 diff --git a/eng/Versions.props b/eng/Versions.props index 3d6e24a0190a..414e202fd882 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -140,7 +140,7 @@ $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 8.0.108-servicing.24352.6 + 8.0.108-servicing.24352.11 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion) From 3983df98ec110c33e4f1e037a448599c051e8e50 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Tue, 2 Jul 2024 16:20:57 -0700 Subject: [PATCH 148/159] Update to the 8.0.6 build --- eng/Version.Details.xml | 140 ++++++++++++++++++++-------------------- eng/Versions.props | 34 +++++----- 2 files changed, 87 insertions(+), 87 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 00d39d28ae76..153331f41320 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -10,46 +10,46 @@ https://github.com/dotnet/templating 64bdb6f59b7017e77580fdb5bd62fd4a9bfcd7cf - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 087e15321bb712ef6fe8b0ba6f8bd12facf92629 + 3b8b000a0e115700b18265d8ec8c6307056dc94d - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 087e15321bb712ef6fe8b0ba6f8bd12facf92629 + 3b8b000a0e115700b18265d8ec8c6307056dc94d - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 087e15321bb712ef6fe8b0ba6f8bd12facf92629 + 3b8b000a0e115700b18265d8ec8c6307056dc94d - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 087e15321bb712ef6fe8b0ba6f8bd12facf92629 + 3b8b000a0e115700b18265d8ec8c6307056dc94d - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 087e15321bb712ef6fe8b0ba6f8bd12facf92629 + 3b8b000a0e115700b18265d8ec8c6307056dc94d - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 087e15321bb712ef6fe8b0ba6f8bd12facf92629 + 3b8b000a0e115700b18265d8ec8c6307056dc94d - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 087e15321bb712ef6fe8b0ba6f8bd12facf92629 + 3b8b000a0e115700b18265d8ec8c6307056dc94d https://dev.azure.com/dnceng/internal/_git/dotnet-runtime 5535e31a712343a63f5d7d796cd874e563e5ac14 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 087e15321bb712ef6fe8b0ba6f8bd12facf92629 + 3b8b000a0e115700b18265d8ec8c6307056dc94d - - https://github.com/dotnet/emsdk - 71359b18c2d83c01a68bf155244a65962a7e8c8e + + https://dev.azure.com/dnceng/internal/_git/dotnet-emsdk + 6a447a096ee9b580465138e4944699db298c12c7 https://github.com/dotnet/msbuild @@ -107,13 +107,13 @@ https://github.com/dotnet/roslyn 92051d4c24bc13ff58232104a647910bf22cd105 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 + b8139c5ee58f1708b0e3368a1b241400edd6cbc4 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 + b8139c5ee58f1708b0e3368a1b241400edd6cbc4 https://github.com/nuget/nuget.client @@ -196,9 +196,9 @@ https://github.com/microsoft/vstest 910ca0dcc779068418464794f5af570eda195222 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 087e15321bb712ef6fe8b0ba6f8bd12facf92629 + 3b8b000a0e115700b18265d8ec8c6307056dc94d https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -216,70 +216,70 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime 5535e31a712343a63f5d7d796cd874e563e5ac14 - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - dda23bbe00c4a4bfdd3732783f0cce37c11a4f40 + a57b7a3727ee289642a69a78ffa0eab48ec161d8 - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - dda23bbe00c4a4bfdd3732783f0cce37c11a4f40 + a57b7a3727ee289642a69a78ffa0eab48ec161d8 - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - dda23bbe00c4a4bfdd3732783f0cce37c11a4f40 + a57b7a3727ee289642a69a78ffa0eab48ec161d8 - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - dda23bbe00c4a4bfdd3732783f0cce37c11a4f40 + a57b7a3727ee289642a69a78ffa0eab48ec161d8 - + https://dev.azure.com/dnceng/internal/_git/dotnet-wpf - b5af29a8f41f880f38fd015c6bcb7aeb816fcef6 + 86a51738adbb65141dea966de2cce47ae2061812 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 + b8139c5ee58f1708b0e3368a1b241400edd6cbc4 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 + b8139c5ee58f1708b0e3368a1b241400edd6cbc4 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 + b8139c5ee58f1708b0e3368a1b241400edd6cbc4 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 + b8139c5ee58f1708b0e3368a1b241400edd6cbc4 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 + b8139c5ee58f1708b0e3368a1b241400edd6cbc4 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 + b8139c5ee58f1708b0e3368a1b241400edd6cbc4 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 + b8139c5ee58f1708b0e3368a1b241400edd6cbc4 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 + b8139c5ee58f1708b0e3368a1b241400edd6cbc4 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 + b8139c5ee58f1708b0e3368a1b241400edd6cbc4 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 + b8139c5ee58f1708b0e3368a1b241400edd6cbc4 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 + b8139c5ee58f1708b0e3368a1b241400edd6cbc4 https://github.com/dotnet/razor @@ -294,21 +294,21 @@ https://github.com/dotnet/razor ea83da42ade2a5e193507d780559d79f0cb16c75 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 + b8139c5ee58f1708b0e3368a1b241400edd6cbc4 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 + b8139c5ee58f1708b0e3368a1b241400edd6cbc4 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 + b8139c5ee58f1708b0e3368a1b241400edd6cbc4 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 + b8139c5ee58f1708b0e3368a1b241400edd6cbc4 https://github.com/dotnet/xdt @@ -425,9 +425,9 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime 5535e31a712343a63f5d7d796cd874e563e5ac14 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 + b8139c5ee58f1708b0e3368a1b241400edd6cbc4 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -457,9 +457,9 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime 5535e31a712343a63f5d7d796cd874e563e5ac14 - + https://dev.azure.com/dnceng/internal/_git/dotnet-winforms - 6c37c986b6c8fc0669b38a03a03445a75b8227a6 + b0051e354c0e48009444fb4907a6ce61ac497910 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -467,7 +467,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 087e15321bb712ef6fe8b0ba6f8bd12facf92629 + 3b8b000a0e115700b18265d8ec8c6307056dc94d https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 253e5eeeb3a7..02a425cf4b49 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -50,22 +50,22 @@ - 8.0.5 - 8.0.5-servicing.24216.15 - 8.0.5 + 8.0.6 + 8.0.6-servicing.24267.15 + 8.0.6 $(MicrosoftNETCoreAppRuntimewinx64PackageVersion) 8.0.0 - 8.0.5 - 8.0.5-servicing.24216.15 + 8.0.6 + 8.0.6-servicing.24267.15 8.0.0 $(MicrosoftExtensionsDependencyModelPackageVersion) 8.0.0 8.0.1 8.0.0 - 8.0.5 + 8.0.6 8.0.0 8.0.0 - 8.0.5 + 8.0.6 8.0.0 8.0.0 8.0.0 @@ -73,7 +73,7 @@ 8.0.0 8.0.0 8.0.0 - 8.0.5 + 8.0.6 8.0.0 8.0.1 8.0.0 @@ -166,13 +166,13 @@ - 8.0.5 - 8.0.5-servicing.24224.4 - 8.0.5-servicing.24224.4 - 8.0.5-servicing.24224.4 - 8.0.5-servicing.24224.4 - 8.0.5-servicing.24224.4 - 8.0.5 + 8.0.6 + 8.0.6-servicing.24269.9 + 8.0.6-servicing.24269.9 + 8.0.6-servicing.24269.9 + 8.0.6-servicing.24269.9 + 8.0.6-servicing.24269.9 + 8.0.6 @@ -182,7 +182,7 @@ - 8.0.5-servicing.24217.2 + 8.0.6-servicing.24269.6 @@ -226,7 +226,7 @@ - 8.0.5 + 8.0.6 $(MicrosoftNETWorkloadEmscriptenCurrentManifest80100PackageVersion) 8.0.100$([System.Text.RegularExpressions.Regex]::Match($(EmscriptenWorkloadManifestVersion), `-rtm|-[A-z]*\.*\d*`)) From 50386dab8c284577a4f2276013da9d74d395e514 Mon Sep 17 00:00:00 2001 From: Farhad Alizada Date: Thu, 20 Jun 2024 17:12:55 +0200 Subject: [PATCH 149/159] Onboard new inter-branch merge flow [Workflow] --- .github/workflows/inter-branch-merge-flow.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/inter-branch-merge-flow.yml diff --git a/.github/workflows/inter-branch-merge-flow.yml b/.github/workflows/inter-branch-merge-flow.yml new file mode 100644 index 000000000000..20246c14fc58 --- /dev/null +++ b/.github/workflows/inter-branch-merge-flow.yml @@ -0,0 +1,13 @@ +name: Inter-branch merge workflow +on: + push: + branches: + - release/** + +permissions: + contents: write + pull-requests: write + +jobs: + Merge: + uses: dotnet/arcade/.github/workflows/inter-branch-merge-base.yml@main \ No newline at end of file From 7b5d22d296c1f1af61d05546800c8bcbd3b1cce8 Mon Sep 17 00:00:00 2001 From: Farhad Alizada Date: Thu, 20 Jun 2024 17:12:55 +0200 Subject: [PATCH 150/159] Onboard new inter-branch merge flow [Workflow] --- .github/workflows/inter-branch-merge-flow.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/inter-branch-merge-flow.yml diff --git a/.github/workflows/inter-branch-merge-flow.yml b/.github/workflows/inter-branch-merge-flow.yml new file mode 100644 index 000000000000..20246c14fc58 --- /dev/null +++ b/.github/workflows/inter-branch-merge-flow.yml @@ -0,0 +1,13 @@ +name: Inter-branch merge workflow +on: + push: + branches: + - release/** + +permissions: + contents: write + pull-requests: write + +jobs: + Merge: + uses: dotnet/arcade/.github/workflows/inter-branch-merge-base.yml@main \ No newline at end of file From ec352ada40101218b0ee0f1284a26c8f355f1323 Mon Sep 17 00:00:00 2001 From: Farhad Alizada Date: Thu, 20 Jun 2024 17:12:55 +0200 Subject: [PATCH 151/159] Onboard new inter-branch merge flow [Workflow] --- .github/workflows/inter-branch-merge-flow.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/inter-branch-merge-flow.yml diff --git a/.github/workflows/inter-branch-merge-flow.yml b/.github/workflows/inter-branch-merge-flow.yml new file mode 100644 index 000000000000..20246c14fc58 --- /dev/null +++ b/.github/workflows/inter-branch-merge-flow.yml @@ -0,0 +1,13 @@ +name: Inter-branch merge workflow +on: + push: + branches: + - release/** + +permissions: + contents: write + pull-requests: write + +jobs: + Merge: + uses: dotnet/arcade/.github/workflows/inter-branch-merge-base.yml@main \ No newline at end of file From a57fa160ddfb60852eaeecdae8843228903b8590 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 3 Jul 2024 12:53:51 +0000 Subject: [PATCH 152/159] Update dependencies from https://github.com/dotnet/templating build 20240702.15 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.303-servicing.24314.2 -> To Version 8.0.304-servicing.24352.15 --- NuGet.config | 7 +------ eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/NuGet.config b/NuGet.config index 6d31162866f4..6063c455bcd8 100644 --- a/NuGet.config +++ b/NuGet.config @@ -23,12 +23,7 @@ - - - - - - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index eb4fcf62a22b..98551aaa87b9 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,17 +1,17 @@ - + https://github.com/dotnet/templating - 2c8137bda50484d21e263aaac51dad537ba57cc8 + 350f32942e8db0ab82b6ecc1c5710de386298e55 - + https://github.com/dotnet/templating - 2c8137bda50484d21e263aaac51dad537ba57cc8 + 350f32942e8db0ab82b6ecc1c5710de386298e55 - + https://github.com/dotnet/templating - 2c8137bda50484d21e263aaac51dad537ba57cc8 + 350f32942e8db0ab82b6ecc1c5710de386298e55 diff --git a/eng/Versions.props b/eng/Versions.props index 06206dacfaba..59a9db5432be 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -138,13 +138,13 @@ - 8.0.303 + 8.0.304 $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 8.0.303-servicing.24314.2 + 8.0.304-servicing.24352.15 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion) From dfdc8399579a25a4ad473aedd80c810b07f2a54c Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 3 Jul 2024 13:03:12 +0000 Subject: [PATCH 153/159] Update dependencies from https://github.com/dotnet/templating build 20240702.8 Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.400-preview.24330.1 -> To Version 8.0.400-preview.24352.8 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 153331f41320..965a31e72dff 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,14 +1,14 @@ - + https://github.com/dotnet/templating - 64bdb6f59b7017e77580fdb5bd62fd4a9bfcd7cf + c869b5d516b7fced50f5f3768e05ae002ebdc2c4 - + https://github.com/dotnet/templating - 64bdb6f59b7017e77580fdb5bd62fd4a9bfcd7cf + c869b5d516b7fced50f5f3768e05ae002ebdc2c4 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index 02a425cf4b49..f7da3b26f21c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -138,13 +138,13 @@ - 8.0.400-preview.24330.1 + 8.0.400-preview.24352.8 $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 8.0.400-preview.24330.1 + 8.0.400-preview.24352.8 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion) From 0ca3a28804b6f2dde4cc0acad1facbe3b1a1f637 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 3 Jul 2024 13:03:39 +0000 Subject: [PATCH 154/159] Update dependencies from https://github.com/dotnet/roslyn build 20240702.5 Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.CodeAnalysis.CSharp.CodeStyle , Microsoft.CodeAnalysis.CSharp.Features , Microsoft.CodeAnalysis.CSharp.Workspaces , Microsoft.CodeAnalysis.Workspaces.MSBuild , Microsoft.Net.Compilers.Toolset From Version 4.11.0-3.24329.1 -> To Version 4.11.0-3.24352.5 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 153331f41320..d34beb031797 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -78,34 +78,34 @@ 32b81fa7a51d0fa630b534ead8ded8c7432f2c2b - + https://github.com/dotnet/roslyn - 92051d4c24bc13ff58232104a647910bf22cd105 + e6021ed45fa138501d126703ecd15d02a1ccc9c1 - + https://github.com/dotnet/roslyn - 92051d4c24bc13ff58232104a647910bf22cd105 + e6021ed45fa138501d126703ecd15d02a1ccc9c1 - + https://github.com/dotnet/roslyn - 92051d4c24bc13ff58232104a647910bf22cd105 + e6021ed45fa138501d126703ecd15d02a1ccc9c1 - + https://github.com/dotnet/roslyn - 92051d4c24bc13ff58232104a647910bf22cd105 + e6021ed45fa138501d126703ecd15d02a1ccc9c1 - + https://github.com/dotnet/roslyn - 92051d4c24bc13ff58232104a647910bf22cd105 + e6021ed45fa138501d126703ecd15d02a1ccc9c1 - + https://github.com/dotnet/roslyn - 92051d4c24bc13ff58232104a647910bf22cd105 + e6021ed45fa138501d126703ecd15d02a1ccc9c1 - + https://github.com/dotnet/roslyn - 92051d4c24bc13ff58232104a647910bf22cd105 + e6021ed45fa138501d126703ecd15d02a1ccc9c1 https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore diff --git a/eng/Versions.props b/eng/Versions.props index 02a425cf4b49..02a0d2df51ae 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -155,13 +155,13 @@ - 4.11.0-3.24329.1 - 4.11.0-3.24329.1 - 4.11.0-3.24329.1 - 4.11.0-3.24329.1 - 4.11.0-3.24329.1 - 4.11.0-3.24329.1 - 4.11.0-3.24329.1 + 4.11.0-3.24352.5 + 4.11.0-3.24352.5 + 4.11.0-3.24352.5 + 4.11.0-3.24352.5 + 4.11.0-3.24352.5 + 4.11.0-3.24352.5 + 4.11.0-3.24352.5 $(MicrosoftNetCompilersToolsetPackageVersion) From 280789298508f6bfa88f3bad156c2912338d4f91 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Wed, 3 Jul 2024 22:08:24 -0400 Subject: [PATCH 155/159] Update VM tests to install required runtimes --- .../Framework/VMTestBase.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/Tests/dotnet-MsiInstallation.Tests/Framework/VMTestBase.cs b/src/Tests/dotnet-MsiInstallation.Tests/Framework/VMTestBase.cs index 91f49bce6520..d53cf471be04 100644 --- a/src/Tests/dotnet-MsiInstallation.Tests/Framework/VMTestBase.cs +++ b/src/Tests/dotnet-MsiInstallation.Tests/Framework/VMTestBase.cs @@ -66,8 +66,23 @@ protected void InstallSdk(bool deployStage2 = true) .Should() .Pass(); - VM.CreateRunCommand($@"c:\SdkTesting\{SdkInstallerFileName}", "/quiet") - .WithDescription($"Install SDK {SdkInstallerVersion}") + var sdkTestingDir = VM.GetRemoteDirectory(@"c:\SdkTesting"); + List runtimeInstallers = new List(); + string installerPrefix = "dotnet-runtime-"; + string installerSuffix = "-win-x64.exe"; + foreach (var file in sdkTestingDir.Files.Select(Path.GetFileName)) + { + if (file.StartsWith(installerPrefix) && file.EndsWith(installerSuffix)) + { + runtimeInstallers.Add(file); + } + } + + VM.CreateActionGroup($"Install SDK {SdkInstallerVersion}", + [ + VM.CreateRunCommand($@"c:\SdkTesting\{SdkInstallerFileName}", "/quiet"), + ..runtimeInstallers.Select(i => VM.CreateRunCommand($@"c:\SdkTesting\{i}", "/quiet")) + ]) .Execute() .Should() .Pass(); From 8ebaffd3ca0cfe34d7fa7ea8678d1f09360a13da Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Wed, 3 Jul 2024 22:15:51 -0400 Subject: [PATCH 156/159] Fix installing and updating workloads with global.json-specified workload set version --- .../dotnet-workload/install/WorkloadInstallCommand.cs | 5 ++++- .../dotnet-workload/update/WorkloadUpdateCommand.cs | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs index 621c7c47d365..f722aefbe3a8 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs @@ -141,7 +141,6 @@ public override int Execute() Reporter.WriteLine(string.Format(LocalizableStrings.WorkloadAlreadyInstalled, string.Join(" ", previouslyInstalledWorkloads)).Yellow()); } workloadIds = workloadIds.Concat(installedWorkloads).Distinct(); - workloadIds = WriteSDKInstallRecordsForVSWorkloads(workloadIds); if (!_skipManifestUpdate) { @@ -168,6 +167,10 @@ public override int Execute() } UpdateWorkloadManifests(context, offlineCache); } + + // This depends on getting the available workloads, so it needs to run after manifests hae potentially been installed + workloadIds = WriteSDKInstallRecordsForVSWorkloads(workloadIds); + _workloadInstaller.InstallWorkloads(workloadIds, _sdkFeatureBand, context, offlineCache); // Write workload installation records diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs index f340dcc83136..11086d14c710 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs @@ -94,13 +94,17 @@ public override int Execute() Reporter.WriteLine(); try { - var workloadIds = WriteSDKInstallRecordsForVSWorkloads(GetUpdatableWorkloads()); + IEnumerable workloadIds = Enumerable.Empty(); DirectoryPath? offlineCache = string.IsNullOrWhiteSpace(_fromCacheOption) ? null : new DirectoryPath(_fromCacheOption); RunInNewTransaction(context => { UpdateWorkloadManifests(context, offlineCache); + + // This depends on getting the available workloads, so it needs to run after manifests hae potentially been installed + workloadIds = WriteSDKInstallRecordsForVSWorkloads(GetUpdatableWorkloads()); + _workloadInstaller.InstallWorkloads(workloadIds, _sdkFeatureBand, context, offlineCache); }); From c36fd963d6570ba9e85aa6bdc8a024865a523ec7 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 4 Jul 2024 04:13:02 +0000 Subject: [PATCH 157/159] Update dependencies from https://github.com/dotnet/templating build 20240703.3 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.108-servicing.24352.11 -> To Version 8.0.108-servicing.24353.3 --- NuGet.config | 4 +--- eng/Version.Details.xml | 10 +++++----- eng/Versions.props | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/NuGet.config b/NuGet.config index 067127178290..70962b57c453 100644 --- a/NuGet.config +++ b/NuGet.config @@ -18,9 +18,7 @@ - - - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0dba6effce27..5e87481bfd0d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,15 +3,15 @@ https://github.com/dotnet/templating - 63ab5964b1d51fb2cdd355f240439efd0a198e15 + 5cab53780897ef7a8e212e10732af54c0a7e597f - + https://github.com/dotnet/templating - 63ab5964b1d51fb2cdd355f240439efd0a198e15 + 5cab53780897ef7a8e212e10732af54c0a7e597f - + https://github.com/dotnet/templating - 63ab5964b1d51fb2cdd355f240439efd0a198e15 + 5cab53780897ef7a8e212e10732af54c0a7e597f diff --git a/eng/Versions.props b/eng/Versions.props index 1a73e42d3ad1..9967c964b6ff 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -140,7 +140,7 @@ $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 8.0.108-servicing.24352.11 + 8.0.108-servicing.24353.3 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion) From 628a8c99ad235be87701b52934c48ecce3e8f04f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 4 Jul 2024 12:37:45 +0000 Subject: [PATCH 158/159] Update dependencies from https://github.com/dotnet/templating build 20240703.4 Microsoft.SourceBuild.Intermediate.templating , Microsoft.TemplateEngine.Abstractions , Microsoft.TemplateEngine.Mocks From Version 8.0.304-servicing.24352.15 -> To Version 8.0.304-servicing.24353.4 --- NuGet.config | 2 +- eng/Version.Details.xml | 10 +++++----- eng/Versions.props | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/NuGet.config b/NuGet.config index 6063c455bcd8..f2b8048de71b 100644 --- a/NuGet.config +++ b/NuGet.config @@ -23,7 +23,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 98551aaa87b9..19602a05c4e0 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,15 +3,15 @@ https://github.com/dotnet/templating - 350f32942e8db0ab82b6ecc1c5710de386298e55 + 411e499037ec280f6bb2c9d3baf94bb309406f61 - + https://github.com/dotnet/templating - 350f32942e8db0ab82b6ecc1c5710de386298e55 + 411e499037ec280f6bb2c9d3baf94bb309406f61 - + https://github.com/dotnet/templating - 350f32942e8db0ab82b6ecc1c5710de386298e55 + 411e499037ec280f6bb2c9d3baf94bb309406f61 diff --git a/eng/Versions.props b/eng/Versions.props index 59a9db5432be..26a183dab0cf 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -144,7 +144,7 @@ $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - 8.0.304-servicing.24352.15 + 8.0.304-servicing.24353.4 $(MicrosoftTemplateEngineMocksPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineMocksPackageVersion) From 84834e72023961c3bc8d2a4f0b9c24150149bcbc Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Thu, 4 Jul 2024 10:52:38 -0400 Subject: [PATCH 159/159] Update tests --- src/Tests/dotnet-MsiInstallation.Tests/MsiInstallerTests.cs | 1 + src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tests/dotnet-MsiInstallation.Tests/MsiInstallerTests.cs b/src/Tests/dotnet-MsiInstallation.Tests/MsiInstallerTests.cs index c557ba6ed856..213e5deb43db 100644 --- a/src/Tests/dotnet-MsiInstallation.Tests/MsiInstallerTests.cs +++ b/src/Tests/dotnet-MsiInstallation.Tests/MsiInstallerTests.cs @@ -137,6 +137,7 @@ public void SdkInstallation() } else { + // TODO: This doesn't work if we've installed additional runtimes to support the SDK VM.GetRemoteDirectory($@"c:\Program Files\dotnet") .Should() .NotExist(); diff --git a/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs b/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs index e580c8ad4d0f..109de42139aa 100644 --- a/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs +++ b/src/Tests/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs @@ -189,8 +189,7 @@ public void UpdateWorkloadSetWithoutAvailableManifests() VM.CreateRunCommand("dotnet", "workload", "update", "--source", @"c:\SdkTesting\workloadsets") .Execute() .Should() - .Pass() - .And.HaveStdOutContaining("No workload update found"); + .Fail(); VM.CreateRunCommand("dotnet", "workload", "search") .WithIsReadOnly(true)