Skip to content

Commit d8512e1

Browse files
authored
WorkloadRestoreCommand.DiscoverAllProjects: Return full paths (#47415)
1 parent 239328b commit d8512e1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Cli/dotnet/commands/dotnet-workload/restore/WorkloadRestoreCommand.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,11 @@ internal static List<string> DiscoverAllProjects(string currentDirectory,
136136
.Select(Path.GetFullPath).ToList();
137137
}
138138

139-
foreach (string file in slnFiles)
139+
foreach (string solutionFilePath in slnFiles)
140140
{
141-
var solutionFile = SlnFileFactory.CreateFromFileOrDirectory(file);
142-
projectFiles.AddRange(solutionFile.SolutionProjects.Select(p => p.FilePath));
141+
var solutionFile = SlnFileFactory.CreateFromFileOrDirectory(solutionFilePath);
142+
projectFiles.AddRange(solutionFile.SolutionProjects.Select(
143+
p => Path.GetFullPath(p.FilePath, Path.GetDirectoryName(solutionFilePath))));
143144
}
144145

145146
if (projectFiles.Count == 0)

0 commit comments

Comments
 (0)