Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 3 additions & 4 deletions src/Paket.Core/ProjectFile.fs
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,8 @@ module ProjectFile =
let libReferenceNode =
let name =
match fileItem.BuildAction with
| BuildAction.Reference ->
let n = FileInfo(fileItem.Include).Name.TrimEnd('\\').Split('\\') |> Array.last
n.Replace(Path.GetExtension n,"")
| BuildAction.Reference ->
fileItem.Include |> normalizePath |> Path.GetFileNameWithoutExtension
| _ -> fileItem.Include

createNode (string fileItem.BuildAction) project
Expand Down Expand Up @@ -520,7 +519,7 @@ module ProjectFile =
|> getDescendants (string fileItem.BuildAction)
|> List.filter (fun node ->
match node |> getAttribute "Include" with
| Some path when path.StartsWith (Path.GetDirectoryName fileItem.Include) -> true
| Some path when path.StartsWith (fileItem.Include |> normalizePath |> Path.GetDirectoryName |> windowsPath) -> true
| _ -> false)


Expand Down
2 changes: 1 addition & 1 deletion src/Paket.Core/Utils.fs
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ let askYesNo question =
getAnswer()

let inline normalizePath(path:string) = path.Replace("\\",Path.DirectorySeparatorChar.ToString()).Replace("/",Path.DirectorySeparatorChar.ToString()).TrimEnd(Path.DirectorySeparatorChar)

let inline windowsPath (path:string) = path.Replace(Path.DirectorySeparatorChar, '\\')
/// Gets all files with the given pattern
let inline FindAllFiles(folder, pattern) = DirectoryInfo(folder).GetFiles(pattern, SearchOption.AllDirectories)

Expand Down