Skip to content
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

Have ProjectInSolution.AbsolutePath return a normalized path #5950

Merged

Conversation

jeffkl
Copy link
Contributor

@jeffkl jeffkl commented Dec 9, 2020

This change updates ProjectInSolution.AbsolutePath to return a normalized path. At the moment it simply returns the result of a Path.Combine() which leaves ..\ path segments in place and does not contain OS-specific path separators.

Fixes #5949 and NuGet/Home#10307

@jeffkl jeffkl force-pushed the fix-projectinsolution-absolutepath branch from 46ffea4 to 74b8fc6 Compare December 10, 2020 16:48
@jeffkl jeffkl changed the title WIP Have ProjectInSolution.AbsolutePath return a normalized path Dec 10, 2020
@jeffkl jeffkl force-pushed the fix-projectinsolution-absolutepath branch from 85d8ddb to b4d19f6 Compare December 11, 2020 18:17
@jeffkl jeffkl marked this pull request as ready for review December 11, 2020 18:55
Copy link
Member

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally I'd like it interactive rebased to have a commit for the shouldly migration and a separate commit for the actual change.

@jeffkl jeffkl force-pushed the fix-projectinsolution-absolutepath branch from c1dbf39 to fc8e5cf Compare December 15, 2020 16:50
@rainersigwald rainersigwald merged commit 136652d into dotnet:master Dec 16, 2020
jeffkl added a commit to jeffkl/msbuild that referenced this pull request Mar 10, 2021
dotnet#5950 introduced a call to `Path.GetFullPath()` to get a path that is normalized.  However, in some cases Visual Studio stores unsupported paths which will cause `Path.GetFullPath()` to throw.

`Path.GetFullPath()` can also throw a `PathTooLongException` which is now handled.

Fixes dotnet#6236
benvillalobos pushed a commit to benvillalobos/msbuild that referenced this pull request Mar 16, 2021
dotnet#5950 introduced a call to `Path.GetFullPath()` to get a path that is normalized.  However, in some cases Visual Studio stores unsupported paths which will cause `Path.GetFullPath()` to throw.

`Path.GetFullPath()` can also throw a `PathTooLongException` which is now handled.

Fixes dotnet#6236
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ProjectInSolution.AbsolutePath should return a normalized full path
3 participants