diff --git a/Parsers.Common/VisualStudio/Projects/Project.cs b/Parsers.Common/VisualStudio/Projects/Project.cs index 63fec6a..18b9002 100644 --- a/Parsers.Common/VisualStudio/Projects/Project.cs +++ b/Parsers.Common/VisualStudio/Projects/Project.cs @@ -141,6 +141,9 @@ public static Project Load(string path, string projectName) throw new FileNotFoundException("Could not find project file: " + path); } + // Make sure to use the full path + path = FileSystem.Path.GetFullPath(path); + try { string projectDir = FileSystem.Path.GetDirectoryName(path); diff --git a/Parsers.Common/VisualStudio/Solution.cs b/Parsers.Common/VisualStudio/Solution.cs index 0bceb8c..8514677 100644 --- a/Parsers.Common/VisualStudio/Solution.cs +++ b/Parsers.Common/VisualStudio/Solution.cs @@ -31,6 +31,9 @@ protected Solution(string path) throw new FileNotFoundException("Could not find the specified solution file '" + path + "'."); } + // Make sure to use the full path + path = _fileSystem.Path.GetFullPath(path); + SolutionPath = path; SolutionDirectory = _fileSystem.Path.GetDirectoryName(path); @@ -88,7 +91,7 @@ public static Solution Load(string solutionPath, ILogCollector logCollector = nu } /// - /// Loads the a project of the solution. + /// Loads the project of the solution. /// /// The project of the solution. /// The loaded project. diff --git a/Parsers.Common/VisualStudio/SolutionItem.cs b/Parsers.Common/VisualStudio/SolutionItem.cs index bd6c98f..0986d53 100644 --- a/Parsers.Common/VisualStudio/SolutionItem.cs +++ b/Parsers.Common/VisualStudio/SolutionItem.cs @@ -63,7 +63,7 @@ protected SolutionItem(Solution solution, Guid guid, string name, string path) /// Gets the absolute path of the item. /// /// The absolute path of the item. - public string AbsolutePath => _fileSystem.Path.Combine(Solution.SolutionDirectory, RelativePath); + public string AbsolutePath => _fileSystem.Path.GetFullPath(_fileSystem.Path.Combine(Solution.SolutionDirectory, RelativePath)); /// /// Gets the parent item.