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

Track used project reference by their file name #54280

Merged

Conversation

JoeRobich
Copy link
Member

Resolves #54262

Used project references are reported differently that package references by the compiler. We can track them separately and match them with referenced projects by their filename.

@JoeRobich JoeRobich requested a review from a team as a code owner June 22, 2021 00:56
@JoeRobich JoeRobich changed the base branch from main to release/dev16.11 June 22, 2021 00:56
}

// Remove the project file name now that we've identified it.
usedProjectFileNames.ExceptWith(projectAssemblyFileNames);
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need to happen when we add to the unusedReferenceBuilder as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

We don't because the check that adds a project to the unusedReferenceBuilder ensures that usedProjectFileNames doesn't contain any of the projectAssemblyFileNames.

Co-authored-by: Andrew Hall <ryzngard@live.com>
@JoeRobich
Copy link
Member Author

@vatsalyaagrawal For 16.11 Preview 3

@vatsalyaagrawal vatsalyaagrawal added this to the 16.11 milestone Jun 22, 2021
@JoeRobich JoeRobich merged commit 959382f into dotnet:release/dev16.11 Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Remove unused references" invalid suggestion to remove project reference
3 participants