@@ -208,6 +208,7 @@ type TestHostServices() =
208208
209209/// One Roslyn project instance of a multi-targeted F# project: its extra defines and the
210210/// synthetic files left out of it, as VS does per target framework.
211+ [<Struct>]
211212type TargetInstance =
212213 {
213214 Defines: string list
@@ -410,8 +411,8 @@ type RoslynTestHelpers private () =
410411 let projects =
411412 syntheticProject.GetAllProjects()
412413 |> Seq.distinctBy _. Name
413- |> Seq.map ( fun project -> project, ProjectId.CreateNewId())
414- |> Seq.toList
414+ |> Seq.map ( fun project -> struct ( project, ProjectId.CreateNewId() ))
415+ |> Seq.toArray
415416
416417 let projectIds = dict [ for project, id in projects -> project.Name, id ]
417418
@@ -441,10 +442,15 @@ type RoslynTestHelpers private () =
441442 project.GetProjectOptions checker
442443 |> RoslynTestHelpers.SetProjectOptions id solution
443444
444- solution, checker
445+ struct ( solution, checker)
445446
447+ /// <summary >
446448 /// One Roslyn project per target instance, all sharing the .fsproj path and the document file
447449 /// paths, like the per-target-framework projects VS creates for a multi-targeted project.
450+ /// </summary >
451+ /// <param name =" syntheticProject " >The project every instance is made from; it must not depend on other projects.</param >
452+ /// <param name =" instances " >One Roslyn project per entry: its extra defines and the synthetic files left out of it.</param >
453+ /// <returns >The solution and the id of each instance's project, in the order of <paramref name =" instances " />.</returns >
448454 static member CreateMultiTargetSolution ( syntheticProject : SyntheticProject , instances : TargetInstance list ) =
449455 assert ( syntheticProject.DependsOn = [])
450456
@@ -457,13 +463,13 @@ type RoslynTestHelpers private () =
457463 for instance in instances ->
458464 let excludedPaths =
459465 HashSet(
460- [
466+ seq {
461467 for fileId in instance.ExcludedFileIds do
462468 syntheticProject.GetFilePath fileId
463469
464470 if ( syntheticProject.Find fileId) .HasSignatureFile then
465471 syntheticProject.GetSignatureFilePath fileId
466- ] ,
472+ } ,
467473 StringComparer.OrdinalIgnoreCase
468474 )
469475
@@ -495,7 +501,7 @@ type RoslynTestHelpers private () =
495501 |]
496502 }
497503
498- id, projectInfo, instanceOptions
504+ struct ( id, projectInfo, instanceOptions)
499505 ]
500506
501507 let solution =
@@ -504,7 +510,7 @@ type RoslynTestHelpers private () =
504510 for id, _, instanceOptions in instances do
505511 RoslynTestHelpers.SetProjectOptions id solution instanceOptions
506512
507- solution, [ for id, _, _ in instances -> id ]
513+ struct ( solution, [ for id, _, _ in instances -> id ])
508514
509515 static member GetFsDocument ( code , ? customProjectOption : string , ? customEditorOptions ) =
510516 let customProjectOptions =
0 commit comments