You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ProjectInSolution.AbsolutePath currently returns the result of Path.Combine() which leaves in relative path segments like ..\. When parsing a solution and getting the paths to projects, this places the burden on the caller to normalize the path.
Create a solution with relative paths containing ..\
Parse the solution with the SolutionFile API
Call the AbsolutePath property on one of the ProjectInSolution objects.
Expected Behavior
AbsolutePath property returns a normalized full path.
Actual Behavior
AbsolutePath property returns a path containing ..\ segments.
Issue Description
ProjectInSolution.AbsolutePath
currently returns the result ofPath.Combine()
which leaves in relative path segments like..\
. When parsing a solution and getting the paths to projects, this places the burden on the caller to normalize the path.msbuild/src/Build/Construction/Solution/ProjectInSolution.cs
Line 165 in 1ff34e8
Steps to Reproduce
Create a solution with relative paths containing
..\
Parse the solution with the
SolutionFile
APICall the
AbsolutePath
property on one of theProjectInSolution
objects.Expected Behavior
AbsolutePath
property returns a normalized full path.Actual Behavior
AbsolutePath
property returns a path containing..\
segments.Analysis
Versions & Configurations
All versions of MSBuild
This manifested into this bug: NuGet/Home#10307
And its worked around in MSBuild's own codebase:
msbuild/src/Build/Graph/GraphBuilder.cs
Lines 293 to 298 in 1ff34e8
The text was updated successfully, but these errors were encountered: