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