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 running MSBuild static graph restore display additional log messages when project format is not known to MSBuild #4126

Merged
merged 9 commits into from
Jul 9, 2021

Conversation

kartheekp-ms
Copy link
Contributor

@kartheekp-ms kartheekp-ms commented Jun 26, 2021

Bug

Fixes: NuGet/Home#10363

Regression? Last working version:

Description

MSBuild static graph restore silently ignores projects in solution whose format is not known to MSBuild. Added following log messages which will be displayed at Normal verbosity.

  • The solution did not have any projects to restore, ensure that all projects are known to be MSBuild and that the projects exist. message will be logged when solution file doesn't have any projects to restore.
  • The solution contains {count} project(s) "{list of projects}" that are not known to MSBuild. Ensure that all projects are known to be MSBuild before running restore on the solution. message will be logged when a solution has projects whose format is not known to MSBuild.

For some reason, MSBuild verbosity argument is not passed to NuGet. Hence NuGet always runs static graph restore logic in Normal verbosity. It is very much possible that I am missing something. Happy to learn based on the feedback from the team.

_loggingQueueLazy = new Lazy<ConsoleLoggingQueue>(() => new ConsoleLoggingQueue(LoggerVerbosity.Normal));

PR Checklist

  • PR has a meaningful title

  • PR has a linked issue.

  • Described changes

  • Tests

    • Automated tests added
  • Documentation

    • N/A

@kartheekp-ms kartheekp-ms changed the title Dev kartheekp ms known to be ms build format When running MSBuild static graph restore display additional log messages when project format is not known to MSBuild Jun 26, 2021
@kartheekp-ms kartheekp-ms marked this pull request as ready for review June 28, 2021 14:55
@kartheekp-ms kartheekp-ms requested a review from a team as a code owner June 28, 2021 14:55
@nkolev92
Copy link
Member

For some reason, MSBuild verbosity argument is not passed to NuGet. Hence NuGet always runs static graph restore logic in Normal verbosity. It is very much possible that I am missing something. Happy to learn based on the feedback from the team.

If you look at https://github.com/nuget/home/issues?q=is%3Aopen+is%3Aissue+label%3AArea%3ARestoreStaticGraph, you will find NuGet/Home#9026, which calls out this problem.

@kartheekp-ms kartheekp-ms force-pushed the dev-kartheekp-ms-KnownToBeMSBuildFormat branch 2 times, most recently from 8a0ee13 to ef123e2 Compare July 6, 2021 17:12
@kartheekp-ms kartheekp-ms force-pushed the dev-kartheekp-ms-KnownToBeMSBuildFormat branch from ef123e2 to 2031bed Compare July 6, 2021 21:06
@kartheekp-ms
Copy link
Contributor Author

@NuGet/nuget-client team, I am waiting for second approval or additional feedback.

@kartheekp-ms kartheekp-ms merged commit 3feb16f into dev Jul 9, 2021
@kartheekp-ms kartheekp-ms deleted the dev-kartheekp-ms-KnownToBeMSBuildFormat branch July 9, 2021 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants