title: Require .csproj nuget packages to exist when building solution
body: <p>I'm creating an app to automatically update nuget packages in a solution and build it to be sure they are still compatible.</p>
  <p>Scenario:</p>
  <p><code>&lt;PackageReference Include=&quot;Dapper&quot; Version=&quot;1.50.5&quot; /&gt;</code>
  Clean/Build package with correct package version. It Succeeds.</p>
  <p>Then I edit the version in the .csproj with garbage text.</p>
  <p><code>&lt;PackageReference Include=&quot;Dapper&quot; Version=&quot;dasdasdasdqw3&quot; /&gt;</code>
  It still succeeds. However it does log the error:
  <code> Error occurred while restoring NuGet packages: Invalid restore input. Missing required property 'Name'.</code></p>
  <p>My understanding is that it is using the previous successful version from the <code>\.nuget\packages</code> folder.</p>
  <p>Is there a way to have the build fail if the package could not be restored that does not involve deleting it from <code>\.nuget\packages</code>?</p>