From 406f7ed42300583f03f08260a6b25df5357675b6 Mon Sep 17 00:00:00 2001 From: Forgind Date: Tue, 25 Jul 2023 16:08:41 -0700 Subject: [PATCH 01/21] Create task to parse json files --- src/core-sdk-tasks/JsonPropertyParser.cs | 54 ++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/core-sdk-tasks/JsonPropertyParser.cs diff --git a/src/core-sdk-tasks/JsonPropertyParser.cs b/src/core-sdk-tasks/JsonPropertyParser.cs new file mode 100644 index 000000000..ae023280e --- /dev/null +++ b/src/core-sdk-tasks/JsonPropertyParser.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using Microsoft.Build.Framework; +using Microsoft.Build.Utilities; +using Newtonsoft.Json.Linq; + +namespace Microsoft.DotNet.Cli.Build +{ + public class JsonPropertyParser : Task + { + [Required] + public string Filename + { + get; + set; + } + + [Required] + public string Path + { + get; + set; + } + + [Output] + public string Value + { + get; + private set; + } + + public override bool Execute() + { + try + { + using (var sr = new StreamReader(Filename)) + { + var json = sr.ReadToEnd(); + var o = JObject.Parse(json); + Value = o.SelectToken(Path).Value(); + } + } + catch (Exception e) + { + Log.LogErrorFromException(e); + } + + return !Log.HasLoggedErrors; + } + } +} From 1a59a906851c652d33526ec0c298d219828a488f Mon Sep 17 00:00:00 2001 From: Forgind Date: Tue, 25 Jul 2023 16:08:53 -0700 Subject: [PATCH 02/21] Add to UsingTask (and sort) --- src/redist/targets/BuildCoreSdkTasks.targets | 29 ++++++++++---------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/redist/targets/BuildCoreSdkTasks.targets b/src/redist/targets/BuildCoreSdkTasks.targets index afd5d21bd..491a7cf1b 100644 --- a/src/redist/targets/BuildCoreSdkTasks.targets +++ b/src/redist/targets/BuildCoreSdkTasks.targets @@ -19,27 +19,28 @@ Properties="ArtifactsDir=$(ArtifactsDir)tasks\"/> + + + + + + - - - - - - - - - - - - - - + + + + + + + + + From 9606060377ead89aca0ccd45325bf73c95461829 Mon Sep 17 00:00:00 2001 From: Forgind Date: Wed, 26 Jul 2023 15:14:04 -0700 Subject: [PATCH 03/21] Tweak task to make it more general --- src/core-sdk-tasks/JsonPropertyParser.cs | 37 ++++++++++++++---------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/src/core-sdk-tasks/JsonPropertyParser.cs b/src/core-sdk-tasks/JsonPropertyParser.cs index ae023280e..d8e10e398 100644 --- a/src/core-sdk-tasks/JsonPropertyParser.cs +++ b/src/core-sdk-tasks/JsonPropertyParser.cs @@ -1,8 +1,5 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; using Newtonsoft.Json.Linq; @@ -12,21 +9,21 @@ namespace Microsoft.DotNet.Cli.Build public class JsonPropertyParser : Task { [Required] - public string Filename + public string[] JFilenames { get; set; } [Required] - public string Path + public string[] JPaths { get; set; } [Output] - public string Value + public ITaskItem[] Value { get; private set; @@ -34,18 +31,28 @@ namespace Microsoft.DotNet.Cli.Build public override bool Execute() { - try + Value = new TaskItem[JFilenames.Length]; + for (var i = 0; i < JFilenames.Length; i++) { - using (var sr = new StreamReader(Filename)) + Value[i] = new TaskItem(JFilenames[i]); + try { - var json = sr.ReadToEnd(); - var o = JObject.Parse(json); - Value = o.SelectToken(Path).Value(); + using (var sr = new StreamReader(JFilenames[i])) + { + var json = sr.ReadToEnd(); + var o = JObject.Parse(json); + foreach (var path in JPaths) + { + var lastDot = path.LastIndexOf('.'); + var name = lastDot == -1 ? path : path.Substring(lastDot + 1); + Value[i].SetMetadata(name, o.SelectToken(path).Value()); + } + } + } + catch (Exception e) + { + Log.LogErrorFromException(e); } - } - catch (Exception e) - { - Log.LogErrorFromException(e); } return !Log.HasLoggedErrors; From 198f9ca7d6cf2c4a97474a7501d7d7d83a232d56 Mon Sep 17 00:00:00 2001 From: Forgind Date: Wed, 26 Jul 2023 15:14:15 -0700 Subject: [PATCH 04/21] Use task to create BaselineManifest.json --- src/redist/targets/BundledManifests.targets | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/redist/targets/BundledManifests.targets b/src/redist/targets/BundledManifests.targets index f4a425bc6..a0f146506 100644 --- a/src/redist/targets/BundledManifests.targets +++ b/src/redist/targets/BundledManifests.targets @@ -104,6 +104,21 @@ - + + + + + + + + + + + + + + + + From f76662028cdc8c4509e024473183e3d8bd4993be Mon Sep 17 00:00:00 2001 From: Forgind Date: Thu, 27 Jul 2023 12:58:00 -0700 Subject: [PATCH 05/21] Add some copyright headers --- src/core-sdk-tasks/CollatePackageDownloads.cs | 5 ++++- src/core-sdk-tasks/GenerateSdkRuntimeIdentifierChain.cs | 5 ++++- .../GetLinuxNativeInstallerDependencyVersions.cs | 5 ++++- src/core-sdk-tasks/GetRuntimePackRids.cs | 5 ++++- src/core-sdk-tasks/JsonPropertyParser.cs | 3 +++ 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/core-sdk-tasks/CollatePackageDownloads.cs b/src/core-sdk-tasks/CollatePackageDownloads.cs index 1e0c8ab9e..9e31720fe 100644 --- a/src/core-sdk-tasks/CollatePackageDownloads.cs +++ b/src/core-sdk-tasks/CollatePackageDownloads.cs @@ -1,4 +1,7 @@ -using System; +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/src/core-sdk-tasks/GenerateSdkRuntimeIdentifierChain.cs b/src/core-sdk-tasks/GenerateSdkRuntimeIdentifierChain.cs index 028f1aa32..1e5c9d33e 100644 --- a/src/core-sdk-tasks/GenerateSdkRuntimeIdentifierChain.cs +++ b/src/core-sdk-tasks/GenerateSdkRuntimeIdentifierChain.cs @@ -1,4 +1,7 @@ -using System; +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/src/core-sdk-tasks/GetLinuxNativeInstallerDependencyVersions.cs b/src/core-sdk-tasks/GetLinuxNativeInstallerDependencyVersions.cs index 195ac196b..d4f324ce3 100644 --- a/src/core-sdk-tasks/GetLinuxNativeInstallerDependencyVersions.cs +++ b/src/core-sdk-tasks/GetLinuxNativeInstallerDependencyVersions.cs @@ -1,4 +1,7 @@ -using System; +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/src/core-sdk-tasks/GetRuntimePackRids.cs b/src/core-sdk-tasks/GetRuntimePackRids.cs index fa7b9b483..f03128599 100644 --- a/src/core-sdk-tasks/GetRuntimePackRids.cs +++ b/src/core-sdk-tasks/GetRuntimePackRids.cs @@ -1,4 +1,7 @@ -using System; +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/src/core-sdk-tasks/JsonPropertyParser.cs b/src/core-sdk-tasks/JsonPropertyParser.cs index d8e10e398..8f80e57f3 100644 --- a/src/core-sdk-tasks/JsonPropertyParser.cs +++ b/src/core-sdk-tasks/JsonPropertyParser.cs @@ -1,3 +1,6 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + using System; using System.IO; using Microsoft.Build.Framework; From 63faf3282d0c5aa53cb6eecfa981cf4036dbfbcc Mon Sep 17 00:00:00 2001 From: Forgind Date: Fri, 28 Jul 2023 12:20:25 -0700 Subject: [PATCH 06/21] Progress --- src/redist/targets/BundledManifests.targets | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/redist/targets/BundledManifests.targets b/src/redist/targets/BundledManifests.targets index a0f146506..bae041b3f 100644 --- a/src/redist/targets/BundledManifests.targets +++ b/src/redist/targets/BundledManifests.targets @@ -119,6 +119,15 @@ +<<<<<<< Updated upstream +======= + + BaselineManifest + BaselineManifest + + + +>>>>>>> Stashed changes From 465fe07004f18734aecad45ea922a64c4c78aa1f Mon Sep 17 00:00:00 2001 From: Forgind Date: Mon, 31 Jul 2023 09:49:10 -0700 Subject: [PATCH 07/21] PR feedback --- src/core-sdk-tasks/JsonPropertyParser.cs | 64 -------------------- src/redist/targets/BuildCoreSdkTasks.targets | 1 - src/redist/targets/BundledManifests.targets | 27 +++------ 3 files changed, 10 insertions(+), 82 deletions(-) delete mode 100644 src/core-sdk-tasks/JsonPropertyParser.cs diff --git a/src/core-sdk-tasks/JsonPropertyParser.cs b/src/core-sdk-tasks/JsonPropertyParser.cs deleted file mode 100644 index 8f80e57f3..000000000 --- a/src/core-sdk-tasks/JsonPropertyParser.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System; -using System.IO; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using Newtonsoft.Json.Linq; - -namespace Microsoft.DotNet.Cli.Build -{ - public class JsonPropertyParser : Task - { - [Required] - public string[] JFilenames - { - get; - set; - } - - [Required] - public string[] JPaths - { - get; - set; - } - - [Output] - public ITaskItem[] Value - { - get; - private set; - } - - public override bool Execute() - { - Value = new TaskItem[JFilenames.Length]; - for (var i = 0; i < JFilenames.Length; i++) - { - Value[i] = new TaskItem(JFilenames[i]); - try - { - using (var sr = new StreamReader(JFilenames[i])) - { - var json = sr.ReadToEnd(); - var o = JObject.Parse(json); - foreach (var path in JPaths) - { - var lastDot = path.LastIndexOf('.'); - var name = lastDot == -1 ? path : path.Substring(lastDot + 1); - Value[i].SetMetadata(name, o.SelectToken(path).Value()); - } - } - } - catch (Exception e) - { - Log.LogErrorFromException(e); - } - } - - return !Log.HasLoggedErrors; - } - } -} diff --git a/src/redist/targets/BuildCoreSdkTasks.targets b/src/redist/targets/BuildCoreSdkTasks.targets index 491a7cf1b..6268b743f 100644 --- a/src/redist/targets/BuildCoreSdkTasks.targets +++ b/src/redist/targets/BuildCoreSdkTasks.targets @@ -35,7 +35,6 @@ - diff --git a/src/redist/targets/BundledManifests.targets b/src/redist/targets/BundledManifests.targets index bae041b3f..a9d6feadf 100644 --- a/src/redist/targets/BundledManifests.targets +++ b/src/redist/targets/BundledManifests.targets @@ -105,29 +105,22 @@ - - - + + $(Version)-baseline.$(_PatchNumber) + $(Version) + $(RedistLayoutPath)sdk-manifests\$(NetFeatureBand)\workloadsets\$(WorkloadSetVersion) + - - - + + - + + -<<<<<<< Updated upstream - -======= - - BaselineManifest - BaselineManifest - - - ->>>>>>> Stashed changes + From db5ede1a12386149912b2908b3d7ddd6e4b33431 Mon Sep 17 00:00:00 2001 From: Forgind Date: Tue, 1 Aug 2023 17:12:42 -0700 Subject: [PATCH 08/21] Switch to VersionPrefix and _BuildNumberLabels --- src/redist/targets/BundledManifests.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redist/targets/BundledManifests.targets b/src/redist/targets/BundledManifests.targets index a9d6feadf..23987058f 100644 --- a/src/redist/targets/BundledManifests.targets +++ b/src/redist/targets/BundledManifests.targets @@ -106,7 +106,7 @@ DestinationFolder="$(RedistLayoutPath)sdk-manifests/%(DestinationPath)"/> - $(Version)-baseline.$(_PatchNumber) + $(VersionPrefix)-baseline$(_BuildNumberLabels) $(Version) $(RedistLayoutPath)sdk-manifests\$(NetFeatureBand)\workloadsets\$(WorkloadSetVersion) From bee2ea53d34bf75abc740feebeed2ffa68ec6876 Mon Sep 17 00:00:00 2001 From: Forgind Date: Wed, 2 Aug 2023 16:40:38 -0700 Subject: [PATCH 09/21] stabilize version --- eng/Versions.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index 2c2d40c52..c49800909 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -10,12 +10,12 @@ 1 00 $(VersionMajor).$(VersionMinor).$(VersionSDKMinor)$(VersionFeature) - rc + rtm 1 $(VersionMajor).$(VersionMinor) $(MajorMinorVersion).$(VersionSDKMinor) - false + true release From c6abdacb6a22502a1ca5671dd2a463c8c9d79084 Mon Sep 17 00:00:00 2001 From: Forgind Date: Mon, 7 Aug 2023 18:13:17 -0700 Subject: [PATCH 10/21] Delete version line --- src/redist/targets/BundledManifests.targets | 1 - 1 file changed, 1 deletion(-) diff --git a/src/redist/targets/BundledManifests.targets b/src/redist/targets/BundledManifests.targets index a19db2106..e9b7749cf 100644 --- a/src/redist/targets/BundledManifests.targets +++ b/src/redist/targets/BundledManifests.targets @@ -116,7 +116,6 @@ - From 52892915bdadd7ff4e8ab0c651f20e1a42b0cdb4 Mon Sep 17 00:00:00 2001 From: Forgind Date: Mon, 7 Aug 2023 18:16:03 -0700 Subject: [PATCH 11/21] Revert "stabilize version" This reverts commit bee2ea53d34bf75abc740feebeed2ffa68ec6876. --- eng/Versions.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index c8f8b3823..f32317ad5 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -10,12 +10,12 @@ 1 00 $(VersionMajor).$(VersionMinor).$(VersionSDKMinor)$(VersionFeature) - rtm + rc 1 $(VersionMajor).$(VersionMinor) $(MajorMinorVersion).$(VersionSDKMinor) - true + false release From 58289cf822c257d13c78fbb610ac6c931de9a919 Mon Sep 17 00:00:00 2001 From: Forgind Date: Tue, 8 Aug 2023 10:38:20 -0700 Subject: [PATCH 12/21] Add feature band --- src/redist/targets/BundledManifests.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redist/targets/BundledManifests.targets b/src/redist/targets/BundledManifests.targets index e9b7749cf..d74478a55 100644 --- a/src/redist/targets/BundledManifests.targets +++ b/src/redist/targets/BundledManifests.targets @@ -116,7 +116,7 @@ - + From 331711fafb50571501bfeee06f8d72aa7ff8eec1 Mon Sep 17 00:00:00 2001 From: Forgind Date: Tue, 8 Aug 2023 11:27:36 -0700 Subject: [PATCH 13/21] Switch to full version --- src/redist/targets/BundledManifests.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redist/targets/BundledManifests.targets b/src/redist/targets/BundledManifests.targets index d74478a55..f073ebe25 100644 --- a/src/redist/targets/BundledManifests.targets +++ b/src/redist/targets/BundledManifests.targets @@ -116,7 +116,7 @@ - + From 2dfb8d0a578a67de244904143c67f9b74679e81f Mon Sep 17 00:00:00 2001 From: Forgind Date: Tue, 8 Aug 2023 14:38:29 -0700 Subject: [PATCH 14/21] Switch to another Version --- src/redist/targets/BundledManifests.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redist/targets/BundledManifests.targets b/src/redist/targets/BundledManifests.targets index f073ebe25..39d5df2fb 100644 --- a/src/redist/targets/BundledManifests.targets +++ b/src/redist/targets/BundledManifests.targets @@ -108,7 +108,7 @@ $(VersionPrefix)-baseline$(_BuildNumberLabels) $(Version) - $(RedistLayoutPath)sdk-manifests\$(NetFeatureBand)\workloadsets\$(WorkloadSetVersion) + $(RedistLayoutPath)sdk-manifests\$(Version)\workloadsets\$(WorkloadSetVersion) From e0acb5805e14ef2441842e41e18f154d50ff716a Mon Sep 17 00:00:00 2001 From: Forgind Date: Tue, 8 Aug 2023 16:52:30 -0700 Subject: [PATCH 15/21] Use Manifests' feature band --- src/redist/targets/BundledManifests.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/redist/targets/BundledManifests.targets b/src/redist/targets/BundledManifests.targets index 39d5df2fb..6b926f159 100644 --- a/src/redist/targets/BundledManifests.targets +++ b/src/redist/targets/BundledManifests.targets @@ -108,7 +108,7 @@ $(VersionPrefix)-baseline$(_BuildNumberLabels) $(Version) - $(RedistLayoutPath)sdk-manifests\$(Version)\workloadsets\$(WorkloadSetVersion) + $(RedistLayoutPath)sdk-manifests\$(NetFeatureBand)\workloadsets\$(WorkloadSetVersion) @@ -116,7 +116,7 @@ - + From d78a0b791203c608bbf3c81618ef511336df87f7 Mon Sep 17 00:00:00 2001 From: Forgind Date: Thu, 10 Aug 2023 09:19:55 -0700 Subject: [PATCH 16/21] Check for baseline manifest as well --- test/EndToEnd/ValidateInsertedManifests.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/EndToEnd/ValidateInsertedManifests.cs b/test/EndToEnd/ValidateInsertedManifests.cs index cdede126c..ffd5dd329 100644 --- a/test/EndToEnd/ValidateInsertedManifests.cs +++ b/test/EndToEnd/ValidateInsertedManifests.cs @@ -31,7 +31,12 @@ namespace EndToEnd.Tests string manifestFile = manifestDir.GetFile("WorkloadManifest.json").FullName; - File.Exists(manifestFile).Should().BeTrue(); + var baselineFile = manifestDir.GetFile("Baseline.WorkloadSet.json").FullName; + if (!(new FileInfo(baselineFile).Exists)) + { + new FileInfo(manifestFile).Exists.Should().BeTrue(); + } + using var fileStream = new FileStream(manifestFile, FileMode.Open, FileAccess.Read); Action readManifest = () => WorkloadManifestReader.ReadWorkloadManifest(manifestId, fileStream, manifestFile); readManifest.ShouldNotThrow("manifestId:" + manifestId + " manifestFile:" + manifestFile + "is invalid"); From 0220e2614c29f28bd6ed85f6b08308d3cdaa3b52 Mon Sep 17 00:00:00 2001 From: Forgind Date: Thu, 10 Aug 2023 09:35:04 -0700 Subject: [PATCH 17/21] =?UTF-8?q?Fix=20the=20fix=20=F0=9F=98=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/EndToEnd/ValidateInsertedManifests.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/EndToEnd/ValidateInsertedManifests.cs b/test/EndToEnd/ValidateInsertedManifests.cs index ffd5dd329..eafb8ba56 100644 --- a/test/EndToEnd/ValidateInsertedManifests.cs +++ b/test/EndToEnd/ValidateInsertedManifests.cs @@ -35,11 +35,10 @@ namespace EndToEnd.Tests if (!(new FileInfo(baselineFile).Exists)) { new FileInfo(manifestFile).Exists.Should().BeTrue(); + using var fileStream = new FileStream(manifestFile, FileMode.Open, FileAccess.Read); + Action readManifest = () => WorkloadManifestReader.ReadWorkloadManifest(manifestId, fileStream, manifestFile); + readManifest.ShouldNotThrow("manifestId:" + manifestId + " manifestFile:" + manifestFile + "is invalid"); } - - using var fileStream = new FileStream(manifestFile, FileMode.Open, FileAccess.Read); - Action readManifest = () => WorkloadManifestReader.ReadWorkloadManifest(manifestId, fileStream, manifestFile); - readManifest.ShouldNotThrow("manifestId:" + manifestId + " manifestFile:" + manifestFile + "is invalid"); } } From 6910bc54d909bf2fdd1d1cd55c39cffaacf3afa9 Mon Sep 17 00:00:00 2001 From: Forgind <12969783+Forgind@users.noreply.github.com> Date: Thu, 17 Aug 2023 13:59:48 -0700 Subject: [PATCH 18/21] Update src/redist/targets/BundledManifests.targets Co-authored-by: Daniel Plaisted --- src/redist/targets/BundledManifests.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redist/targets/BundledManifests.targets b/src/redist/targets/BundledManifests.targets index 6b926f159..9e35b84e3 100644 --- a/src/redist/targets/BundledManifests.targets +++ b/src/redist/targets/BundledManifests.targets @@ -120,6 +120,6 @@ - + From f360881561cf02ee14969dbad7c55453eaab9fb6 Mon Sep 17 00:00:00 2001 From: Forgind Date: Thu, 7 Sep 2023 10:52:14 -0700 Subject: [PATCH 19/21] PR comments --- test/EndToEnd/ValidateInsertedManifests.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/EndToEnd/ValidateInsertedManifests.cs b/test/EndToEnd/ValidateInsertedManifests.cs index eafb8ba56..ccf6b39b1 100644 --- a/test/EndToEnd/ValidateInsertedManifests.cs +++ b/test/EndToEnd/ValidateInsertedManifests.cs @@ -31,8 +31,7 @@ namespace EndToEnd.Tests string manifestFile = manifestDir.GetFile("WorkloadManifest.json").FullName; - var baselineFile = manifestDir.GetFile("Baseline.WorkloadSet.json").FullName; - if (!(new FileInfo(baselineFile).Exists)) + if (!string.Equals(manifestId, "workloadsets")) { new FileInfo(manifestFile).Exists.Should().BeTrue(); using var fileStream = new FileStream(manifestFile, FileMode.Open, FileAccess.Read); From 6d6e5309a930e66b060db43f021e9481834741a4 Mon Sep 17 00:00:00 2001 From: Forgind Date: Fri, 8 Sep 2023 11:54:56 -0700 Subject: [PATCH 20/21] First --> Last --- test/EndToEnd/ValidateInsertedManifests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/EndToEnd/ValidateInsertedManifests.cs b/test/EndToEnd/ValidateInsertedManifests.cs index ccf6b39b1..0a8e4d917 100644 --- a/test/EndToEnd/ValidateInsertedManifests.cs +++ b/test/EndToEnd/ValidateInsertedManifests.cs @@ -22,7 +22,7 @@ namespace EndToEnd.Tests public void ManifestReaderCanReadManifests() { var sdkManifestDir = Path.Combine(Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest), "sdk-manifests"); - var sdkversionDir = new DirectoryInfo(sdkManifestDir).EnumerateDirectories().First(); + var sdkversionDir = new DirectoryInfo(sdkManifestDir).EnumerateDirectories().Last(); foreach (var manifestVersionDir in sdkversionDir.EnumerateDirectories()) { foreach (var manifestDir in manifestVersionDir.EnumerateDirectories()) From 1b03f4b2b44d42e820806e21779f6641fdbe2481 Mon Sep 17 00:00:00 2001 From: Forgind Date: Fri, 8 Sep 2023 12:15:03 -0700 Subject: [PATCH 21/21] Fix test? --- test/EndToEnd/ValidateInsertedManifests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/EndToEnd/ValidateInsertedManifests.cs b/test/EndToEnd/ValidateInsertedManifests.cs index 0a8e4d917..778c07ea7 100644 --- a/test/EndToEnd/ValidateInsertedManifests.cs +++ b/test/EndToEnd/ValidateInsertedManifests.cs @@ -22,12 +22,12 @@ namespace EndToEnd.Tests public void ManifestReaderCanReadManifests() { var sdkManifestDir = Path.Combine(Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest), "sdk-manifests"); - var sdkversionDir = new DirectoryInfo(sdkManifestDir).EnumerateDirectories().Last(); + var sdkversionDir = new DirectoryInfo(sdkManifestDir).EnumerateDirectories().First(); foreach (var manifestVersionDir in sdkversionDir.EnumerateDirectories()) { foreach (var manifestDir in manifestVersionDir.EnumerateDirectories()) { - var manifestId = manifestDir.Name; + var manifestId = manifestVersionDir.Name; string manifestFile = manifestDir.GetFile("WorkloadManifest.json").FullName;