From 6b7aece60acc516deab7fe5067063b02429bb885 Mon Sep 17 00:00:00 2001 From: Aleksey Kliger Date: Wed, 7 Sep 2022 10:23:01 -0400 Subject: [PATCH] [WorkloadBuildTasks] remove the workload manifest net6/net7 hack Starting with 7.0.100-rc.2.22457.6 we already have the versioned net6/net7 toolchains, so the hack isn't needed anymore (and in fact, breaks workload installation during testing) --- .../InstallWorkloadFromArtifacts.cs | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs b/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs index 1e77d5905f5a9b..05cc88a48d796c 100644 --- a/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs +++ b/src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs @@ -139,37 +139,6 @@ private bool InstallAllManifests() return true; } - // HACK BEGIN - because sdk doesn't yet have the net6/net7 manifest names in the known workloads - // list - string? txtPath = Directory.EnumerateFiles(Path.Combine(SdkWithNoWorkloadInstalledPath, "sdk"), "IncludedWorkloadManifests.txt", - new EnumerationOptions { RecurseSubdirectories = true, MaxRecursionDepth = 2}) - .FirstOrDefault(); - if (txtPath is null) - throw new LogAsErrorException($"Could not find IncludedWorkloadManifests.txt in {SdkWithNoWorkloadInstalledPath}"); - - string stampPath = Path.Combine(Path.GetDirectoryName(txtPath)!, ".stamp"); - if (!File.Exists(stampPath)) - { - Log.LogMessage(MessageImportance.High, $"txtPath: {txtPath}"); - string newTxt = File.ReadAllText(txtPath) - .Replace("microsoft.net.workload.mono.toolchain", - $"microsoft.net.workload.mono.toolchain.net6{Environment.NewLine}microsoft.net.workload.mono.toolchain.net7") - .Replace("microsoft.net.workload.emscripten", - $"microsoft.net.workload.emscripten.net6{Environment.NewLine}microsoft.net.workload.emscripten.net7"); - File.WriteAllText(txtPath, newTxt); - File.WriteAllText(stampPath, ""); - } - - string p = Path.Combine(SdkWithNoWorkloadInstalledPath, "sdk-manifests", "7.0.100", "microsoft.net.workload.mono.toolchain"); - Log.LogMessage(MessageImportance.High, $"Deleting {p}"); - if (Directory.Exists(p)) - Directory.Delete(p, recursive: true); - p = Path.Combine(SdkWithNoWorkloadInstalledPath, "sdk-manifests", "7.0.100", "microsoft.net.workload.emscripten"); - Log.LogMessage(MessageImportance.High, $"Deleting {p}"); - if (Directory.Exists(p)) - Directory.Delete(p, recursive: true); - // HACK END - string nugetConfigContents = GetNuGetConfig(); HashSet manifestsInstalled = new(); foreach (ITaskItem workload in WorkloadIds)