Search code examples
.netnuget

NuGet unable to find the version of a package


Running the command

nuget.exe restore .\MySolution.sln

gives this error:

Unable to find version '1.0.0' of package 'Microsoft.Net.Compilers'.

where the package has previously been installed and restored, but it has somehow become corrupt.


Solution

  • It turns out simply updating the NuGet version via

    nuget.exe update -self
    

    to update from 2.8.0 to 3.4.4 was sufficient, and the package now restores correctly.