@@ -2762,6 +2762,9 @@ type FSharpProjectFileInfo (fsprojFileName:string, ?properties, ?enableLogging)
2762
2762
yield i.FinalItemSpec
2763
2763
for i in project.GetEvaluatedItemsByName( " ChildProjectReferences" ) do
2764
2764
yield i.FinalItemSpec ]
2765
+ // Duplicate slashes sometimes appear in the output here, which prevents
2766
+ // them from matching keys used in FSharpProjectOptions.ReferencedProjects
2767
+ |> List.map ( fun ( s : string ) -> s.Replace( " //" , " /" ))
2765
2768
2766
2769
outFileOpt, directory, getItems, references, projectReferences, getProp project, project.FullFileName
2767
2770
@@ -3155,19 +3158,19 @@ type FSharpChecker(projectCacheSize, keepAssemblyContents, keepAllBackgroundReso
3155
3158
#if SILVERLIGHT
3156
3159
#else
3157
3160
#if FX_ ATLEAST_ 45
3158
- member ic.GetProjectOptionsFromProjectFile ( projectFileName , ? properties : ( string * string ) list , ? loadedTimeStamp ) =
3159
- let parsedProject = FSharpProjectFileInfo ( projectFileName , ?properties = properties )
3160
- let args = parsedProject.Options |> Array.ofList
3161
-
3162
- let projectOptions = ic.GetProjectOptionsFromCommandLineArgs ( projectFileName , args , ?loadedTimeStamp = loadedTimeStamp )
3163
- let referencedProjectOptions =
3164
- [| for file in parsedProject.ProjectReferences do
3165
- if Path.GetExtension ( file ) = " .fsproj " then
3166
- yield file , ic.GetProjectOptionsFromProjectFile ( file , ?properties = properties , ?loadedTimeStamp = loadedTimeStamp ) |]
3167
-
3168
- { projectOptions
3169
- with ReferencedProjects = referencedProjectOptions }
3170
-
3161
+ member ic.GetProjectOptionsFromProjectFile ( projectFileName , ? properties : ( string * string ) list , ? loadedTimeStamp ) =
3162
+ let rec getOptions file : Option < string > * FSharpProjectOptions =
3163
+ let parsedProject = FSharpProjectFileInfo.Parse ( file , ?properties = properties )
3164
+ let projectOptions = ic.GetProjectOptionsFromCommandLineArgs ( file , Array.ofList parsedProject.Options , ?loadedTimeStamp = loadedTimeStamp )
3165
+ let referencedProjectOptions =
3166
+ [| for file in parsedProject.ProjectReferences do
3167
+ if Path.GetExtension ( file) = " .fsproj " then
3168
+ match getOptions file with
3169
+ | Some outFile , opts -> yield outFile , opts
3170
+ | None , _ -> () |]
3171
+ parsedProject.OutputFile , { projectOptions with ReferencedProjects = referencedProjectOptions }
3172
+
3173
+ snd ( getOptions projectFileName )
3171
3174
#endif
3172
3175
#endif
3173
3176
0 commit comments