Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Make sure Guid in project reference is parsed well
  • Loading branch information
Krzysztof-Cieslak committed Jun 18, 2016
commit ac143edf35e6602fdda9a62a6302ea4d4b854af5
9 changes: 6 additions & 3 deletions src/Paket.Core/ProjectFile.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ module ProjectFile =
| _ -> Guid.Empty

let getInterProjectDependencies project =
let forceGetInnerText node name =
let forceGetName node name =
match node |> getNode name with
| Some n -> Some n.InnerText
| None ->
Expand All @@ -1052,6 +1052,9 @@ module ProjectFile =
Some <| fi.Name.Replace(fi.Extension,"")
| None -> None

let forceGetInnerText node name =
node |> getNode name |> Option.map (fun n -> n.InnerText)

[for node in project.Document |> getDescendants "ProjectReference" ->
let path =
let normalizedPath = node.Attributes.["Include"].Value |> normalizePath
Expand All @@ -1067,8 +1070,8 @@ module ProjectFile =
Path.Combine(di.FullName,path) |> Path.GetFullPath

RelativePath = path.Replace("/","\\")
Name = forceGetInnerText node "Name"
GUID = forceGetInnerText node "Project" |> Option.map Guid.Parse }]
Name = forceGetName node "Name"
GUID = (forceGetInnerText node "Project") |> Option.map Guid.Parse }]

let replaceNuGetPackagesFile project =
let noneAndContentNodes =
Expand Down