Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Workspaces/MSBuild/Core/MSBuild/SolutionFileReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ internal partial class SolutionFileReader
var builder = ImmutableArray.CreateBuilder<(string ProjectPath, string ProjectGuid)>();
foreach (var projectModel in solutionModel.SolutionProjects)
{
Contract.ThrowIfFalse(pathResolver.TryGetAbsoluteProjectPath(projectModel.FilePath, baseDirectory, DiagnosticReportingMode.Throw, out var absoluteProjectPath));
// If we are filtering based on a solution filter, then we need to verify the project is included.
if (!projectFilter.IsEmpty)
{
Contract.ThrowIfFalse(pathResolver.TryGetAbsoluteProjectPath(projectModel.FilePath, baseDirectory, DiagnosticReportingMode.Throw, out var absoluteProjectPath));
if (!projectFilter.Contains(absoluteProjectPath))
{
continue;
}
}

builder.Add((projectModel.FilePath, projectModel.Id.ToString()));
builder.Add((absoluteProjectPath, projectModel.Id.ToString()));
}

return builder.ToImmutable();
Expand Down
Loading