@@ -41,14 +41,6 @@ public class InstallWorkloadFromArtifacts : Task
4141
4242 private const string s_nugetInsertionTag = "<!-- TEST_RESTORE_SOURCES_INSERTION_LINE -->" ;
4343 private string AllManifestsStampPath => Path . Combine ( SdkWithNoWorkloadInstalledPath , ".all-manifests.stamp" ) ;
44- private static readonly string [ ] s_manifestIds = new [ ]
45- {
46- "microsoft.net.workload.mono.toolchain" ,
47- "microsoft.net.workload.emscripten.net6" ,
48- "microsoft.net.workload.emscripten.net7" ,
49- "microsoft.net.workload.mono.toolchain.net6" ,
50- "microsoft.net.workload.mono.toolchain.net7"
51- } ;
5244
5345 public override bool Execute ( )
5446 {
@@ -154,8 +146,6 @@ private bool InstallAllManifests()
154146 return true ;
155147 }
156148
157- ExecuteHackForInstallerMismatch ( ) ;
158-
159149 string nugetConfigContents = GetNuGetConfig ( ) ;
160150 HashSet < string > manifestsInstalled = new ( ) ;
161151 foreach ( ITaskItem workload in WorkloadIds )
@@ -185,43 +175,6 @@ private bool InstallAllManifests()
185175 File . WriteAllText ( AllManifestsStampPath , string . Empty ) ;
186176
187177 return true ;
188-
189- void ExecuteHackForInstallerMismatch ( )
190- {
191- // HACK - because sdk doesn't yet have the version-less manifest names in the known
192- // workloads list
193- string ? txtPath = Directory . EnumerateFiles ( Path . Combine ( SdkWithNoWorkloadInstalledPath , "sdk" ) , "IncludedWorkloadManifests.txt" ,
194- new EnumerationOptions { RecurseSubdirectories = true , MaxRecursionDepth = 2 } )
195- . FirstOrDefault ( ) ;
196- if ( txtPath is null )
197- throw new LogAsErrorException ( $ "Could not find IncludedWorkloadManifests.txt in { SdkWithNoWorkloadInstalledPath } ") ;
198-
199- string stampPath = Path . Combine ( Path . GetDirectoryName ( txtPath ) ! , ".stamp" ) ;
200- if ( File . Exists ( stampPath ) )
201- return ;
202-
203- List < string > lines = File . ReadAllLines ( txtPath ) . ToList ( ) ;
204- int originalCount = lines . Count ;
205-
206- // we want to insert the manifests in a fixed order
207- // so first remove all of them
208- foreach ( string manifestId in s_manifestIds )
209- lines . Remove ( manifestId ) ;
210- // .. and then insert
211- lines . AddRange ( s_manifestIds ) ;
212-
213- // currently using emscripten.net7 instead of this,
214- // so remove it from the list
215- lines . Remove ( "microsoft.net.workload.emscripten" ) ;
216-
217- if ( lines . Count != originalCount )
218- {
219- // Update the file only if we are making any changes
220- File . WriteAllText ( txtPath , string . Join ( Environment . NewLine , lines ) ) ;
221- }
222-
223- File . WriteAllText ( stampPath , "" ) ;
224- }
225178 }
226179
227180 private bool InstallPacks ( InstallWorkloadRequest req , string nugetConfigContents )
0 commit comments