Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix handling of relative paths when using graph builds with implicit …
…restore (#7361) Fixes #5898 Context Executing projects changes the cwd, which makes relative paths behave unexpectedly. So when an implicit restore happens (/restore), then the cwd is different than what it was originally. For non-graph builds, this isn't a problem as the BuildRequestData gets the full path of the project file before the implicit restore, so there effectively are no relative paths to deal with. However, this was not the case for GraphBuildRequestData, so doing a build with /retore, /graph, and a relative path to a project file was erroring incorrectly. Changes Made The ProjectGraphEntryPoint constructor will now get the full path of the project file, similar to what BuildRequestData does today. I also followed all uses of ProjectGraphEntryPoint.ProjectFile and removed any normalization since it's now always done already. Testing I tested this change calling msbuild on a relative path with graph on/off and restore on/off. It now behaves as expected.
- Loading branch information