Summary
We should warn users when they use the Restore target specifically (-t:Restore) instead of /restore during a build - this is very often a mistake and we should point users to the correct version.
Background and Motivation
Users of the new CLI-based MSBuild property/item syntax often run into issues with uninitialized repositories, so they add -t:Restore and then wonder why their tooling only works after the first run. This is the core reason, and we should guide them to using the switch.
Proposed Feature
When
- Restore is part of the targets list, and
- a project contains NuGet packages, and
- a nuget dependency file was created during the build
- then issue a warning so the user knows they should use /restore instead of /t:Restore
Alternative Designs
No response