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

When loading a project, use metadata references when possible. #1836

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Workspaces/MSBuildWorkspaceLoader.cs
Expand Up @@ -51,6 +51,9 @@ internal static class MSBuildWorkspaceLoader
{
try
{
// In the case of loading a specific project, we don't want to load referenced projects, which is very time consuming, when there is already
// a build on disk we can pull metadata from.
workspace.LoadMetadataForReferencedProjects = true;
Copy link
Member Author

Choose a reason for hiding this comment

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

I assumed this wouldn't be useful in the solution loading case, since referenced projects would likely be part of the solution. Thinking about it again, it isn't strictly necessary, so this may just need to be enabled generally.

await workspace.OpenProjectAsync(solutionOrProjectPath, msbuildLogger: binlog, cancellationToken: cancellationToken).ConfigureAwait(false);
}
catch (InvalidOperationException)
Expand Down