Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove workaround for manifest changes
  • Loading branch information
lewing committed Sep 7, 2022
commit d833293bb86b07886b9c3cff28f145167675ab0c
31 changes: 0 additions & 31 deletions src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,37 +141,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<string> manifestsInstalled = new();
foreach (ITaskItem workload in WorkloadIds)
Expand Down