New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing test case. #1644

Merged
merged 2 commits into from Apr 25, 2016
Jump to file or symbol
Failed to load files and symbols.
+4 −5
Diff settings

Always

Just for now

@@ -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
@@ -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)
View
@@ -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)