Open
Description
See dotnet/cli#9117 and #2010
It has always been incorrect in general to to msbuild /t:restore;build
or <MSBuild Targets="Restore;Build"
because evaluation is shared and so build doesn't see the targets pulled down from nuget. #2010 adds a hard dependency on the ProjectAssetsFile being set by the generated props file in restore, which means that the first run of these incorrect patterns will always fail now instead of sometimes getting lucky. Note that lucky could be silent bad behavior.
Options I see:
- Improve the error message to hint that the cause of the error may be that restore and build were attempted in the same evaluation.
- Improve the message and also downgrade it to a warning.
- Revert the change.
I would like to do (1) because we've lost a lot of time debugging subtly broken builds with this incorrect pattern, but we should think carefully about it.
cc @livarcocc @dsplaisted @wli3 @rrelyea @rohit21agrawal @nkolev92
Metadata
Metadata
Assignees
Labels
No labels