Open dtivel opened 7 years ago
Just hit this with nuget.exe 4.9.2.5706 after adding this local package source that accidentally retained protocolVersion="3"
from another line:
<add key="local" value="D:\git\DevCore\bin\Debug\Packages" protocolVersion="3" />
nuget restore C:\Users\andarno\source\repos\SampleServiceHubUser MSBuild auto-detection: using msbuild version '16.1.68.42340' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\bin'. Restoring packages for C:\Users\andarno\source\repos\SampleServiceHubUser\SampleServiceHubUser\SampleServiceHubUser.csproj... Restoring packages for C:\Users\andarno\source\repos\SampleServiceHubUser\EchoService\EchoService.csproj... Object reference not set to an instance of an object.
Note the unhelpful error message. I was only able to determine the root cause being the inappropriate xml attribute after attaching a debugger to nuget.exe and observing first chance exceptions.
Repro steps:
Result:
The visible
NullReferenceException
exception reproes on 3.6.0 beta 1, 3.5.0, 3.4.4, but not 3.3.0.Observation: The
-Source
command line option without the project's NuGet.Config file handles the input more gracefully.