Skip to content

Commit

Permalink
Merge pull request #478 from rneatherway/project-cracking-fix-child-r…
Browse files Browse the repository at this point in the history
…eferences

Project cracking fix child references
  • Loading branch information
dsyme committed Dec 2, 2015
2 parents 9ba8aef + b9734d1 commit 01721a1
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions src/fsharp/FSharp.Compiler.Service.ProjectCracker.Exe/Program.fs
Expand Up @@ -378,20 +378,23 @@ module Program =
// C# referenced projects, as we don't look at them otherwise.
let referencedProjectOutputs =
if runningOnMono then
[| yield! Array.map (fun (s,_) -> "-r:" + s) referencedProjectOptions
for file in parsedProject.ProjectReferences do
let ext = Path.GetExtension(file)
if ext = ".csproj" || ext = ".vbproj" then
let parsedProject = FSharpProjectFileInfo.Parse(file, properties=properties, enableLogging=false)
match parsedProject.OutputFile with
| None -> ()
| Some f -> yield "-r:" + f |]
[ yield! Array.map (fun (s,_) -> "-r:" + s) referencedProjectOptions
for file in parsedProject.ProjectReferences do
let ext = Path.GetExtension(file)
if ext = ".csproj" || ext = ".vbproj" then
let parsedProject = FSharpProjectFileInfo.Parse(file, properties=properties, enableLogging=false)
match parsedProject.OutputFile with
| None -> ()
| Some f -> yield "-r:" + f ]
else
[||]
[]

// On some versions of Mono the referenced projects are already
// correctly included, so we make sure not to introduce duplicates
|> List.filter (fun r -> not (Set.contains r (set parsedProject.Options)))

let options = { ProjectFile = file
Options = Array.append (Array.ofList (parsedProject.Options))
referencedProjectOutputs
Options = Array.ofSeq (parsedProject.Options @ referencedProjectOutputs)
ReferencedProjectOptions = referencedProjectOptions
LogOutput = parsedProject.LogOutput }

Expand Down

0 comments on commit 01721a1

Please sign in to comment.