VS: --resolve-package-references=only starts building if the project has no packages to restore
If you execute cmake --build <build_dir> --resolve-package-references=only
on a build dir of a project that has no package references, then cmake starts building, which is unexpected.
It seems this may be due to the following condition in cmGlobalVisualStudio10Generator.cxx:
...
// If a restore is required, evaluate the restore mode.
if (requiresRestore) {
if (restoreMode == PackageResolveMode::OnlyResolve) {
// Only invoke the restore target on the project.
makeCommand.Add("/t:Restore");
} else {
...
I would expect the above command to do nothing if there are no packages to restore (but certainly not to start building).