I know I'm late to the party but here is a really good tutorial on how to fix this issue. I used this to fix my project.
Close down Visual Studio If the solution you are trying to migrate is
open in Visual Studio, then changes may be lost. Visual Studio may
overwrite/ignore your changes in some cases and the NuGet extension
will also try to re-enable Package Restore when it sees some projects
in the solution are missing it.
If you are using TFS Remove the NuGet.exe and NuGet.targets files from
the solution's .nuget folder. Make sure the files themselves are also
removed from the solution workspace. Retain the NuGet.Config file to
continue to bypass adding packages to source control. Edit each
project file (e.g., .csproj, .vbproj) in the solution and remove any
references to the NuGet.targets file. Open the project file(s) in the
editor of your choice and remove the following settings:
true ... ...
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download
them. For more information, see
http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is
{0}.
If you are not
using TFS Remove the .nuget folder from your solution. Make sure the
folder itself is also removed from the solution workspace. Edit each
project file (e.g., .csproj, .vbproj) in the solution and remove any
references to the NuGet.targets file. Open the project file(s) in the
editor of your choice and remove the following settings:
true ... ...
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download
them. For more information, see
http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is
{0}.
Migration Script
Many users have requested a migration tool to disable the
MSBuild-based package restore and convert to Automatic Package
Restore. The NuGet team has decided not to provide a supported tool
for this because of the high probability of edge cases that would be
unhandled. However, Owen Johnson has authored a PowerShell script that
can work in many cases. It's available on GitHub and can be used at
your own risk. In other words, be sure to commit to source control
before running it, just in case it doesn't work in your scenario.
Nuget.target Fix