Skip to content

Commit 4f686c2

Browse files
authored
Remove workaround for manifest changes (#75197)
1 parent 6d33609 commit 4f686c2

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -141,37 +141,6 @@ private bool InstallAllManifests()
141141
return true;
142142
}
143143

144-
// HACK BEGIN - because sdk doesn't yet have the net6/net7 manifest names in the known workloads
145-
// list
146-
string? txtPath = Directory.EnumerateFiles(Path.Combine(SdkWithNoWorkloadInstalledPath, "sdk"), "IncludedWorkloadManifests.txt",
147-
new EnumerationOptions { RecurseSubdirectories = true, MaxRecursionDepth = 2})
148-
.FirstOrDefault();
149-
if (txtPath is null)
150-
throw new LogAsErrorException($"Could not find IncludedWorkloadManifests.txt in {SdkWithNoWorkloadInstalledPath}");
151-
152-
string stampPath = Path.Combine(Path.GetDirectoryName(txtPath)!, ".stamp");
153-
if (!File.Exists(stampPath))
154-
{
155-
Log.LogMessage(MessageImportance.High, $"txtPath: {txtPath}");
156-
string newTxt = File.ReadAllText(txtPath)
157-
.Replace("microsoft.net.workload.mono.toolchain",
158-
$"microsoft.net.workload.mono.toolchain.net6{Environment.NewLine}microsoft.net.workload.mono.toolchain.net7")
159-
.Replace("microsoft.net.workload.emscripten",
160-
$"microsoft.net.workload.emscripten.net6{Environment.NewLine}microsoft.net.workload.emscripten.net7");
161-
File.WriteAllText(txtPath, newTxt);
162-
File.WriteAllText(stampPath, "");
163-
}
164-
165-
string p = Path.Combine(SdkWithNoWorkloadInstalledPath, "sdk-manifests", "7.0.100", "microsoft.net.workload.mono.toolchain");
166-
Log.LogMessage(MessageImportance.High, $"Deleting {p}");
167-
if (Directory.Exists(p))
168-
Directory.Delete(p, recursive: true);
169-
p = Path.Combine(SdkWithNoWorkloadInstalledPath, "sdk-manifests", "7.0.100", "microsoft.net.workload.emscripten");
170-
Log.LogMessage(MessageImportance.High, $"Deleting {p}");
171-
if (Directory.Exists(p))
172-
Directory.Delete(p, recursive: true);
173-
// HACK END
174-
175144
string nugetConfigContents = GetNuGetConfig();
176145
HashSet<string> manifestsInstalled = new();
177146
foreach (ITaskItem workload in WorkloadIds)

0 commit comments

Comments
 (0)