6
votes

I updated my VS to 15.7.3 version today and now my Nuget panel with installed packages is empty. Not empty but showing only System.Runtime.

I have a packages.config file in my project and everything worked just fine before the update.

Also the solution wont build. It is showing the following error

This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets. C:\Users\User\Source\Repos\xxxx1-sol\xxxx1\xxxx1.csproj 6039    

What might be the problem ?

Update 1

I tried installing all of the packages again and after I installed a couple of them I saw this in References

References window

Update 2:

I tried deleting the .packages folder before installing the packages again via Nuget and the folder .packages was not created

My project path is C:\Users\User\Source\Repos\Project123-Git

Also I see that now I have a folder .nuget at C:\Users\User.nuget that has the folder packages in it.

I also tried deleting the file packages.config but Nuget still has my newly installed packages even if packages.config does not exsist

1
It did not help :( - exe.bat
Does your packages.config still contain a list of those packages now? If yes, please try to delete the target <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> ... </Target> in your project file .csproj, then execute the command "update-package -reinstall" in the Package Manager Console window. - Leo Liu-MSFT
@LeoLiu-MSFT Yes, all my packages are still in packages.confing but deleting the "EnsureNuGet..." did not change anything :( - the Nuget installed panel is still empty - exe.bat
Imho your NuGet Package Manager is not up to date. Go to Tools -> Extensions and Updates -> Updates -> Visual Studio Gallery and check what version you have there. - Peska

1 Answers

2
votes

After a suggestion on Github Nuget page I managed to find a solution

https://github.com/NuGet/Home/issues/7013

I unloaded the project, opened the project file and removed all the PackageReference nodes from it. I then deleted the obj folder and Nuget started recognizing my packages again. Project now builds just fine.

Thank you all for your help