5

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

exe.bat
  • 340
  • 1
  • 2
  • 17
  • Check this SO link: https://stackoverflow.com/questions/22909506/this-project-references-nuget-packages-that-are-missing-on-this-computer – Mohsin Mehmood Jun 09 '18 at 22:17
  • It did not help :( – exe.bat Jun 10 '18 at 10:44
  • Does your `packages.config` still contain a list of those packages now? If yes, please try to delete the target ` ... ` in your project file .csproj, then execute the command "update-package -reinstall" in the Package Manager Console window. – Leo Liu Jun 11 '18 at 06:52
  • @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 Jun 11 '18 at 10:34
  • 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 Jun 11 '18 at 19:50
  • @Peska I dont have Visual Studio Gallery in Extensions and Updates – exe.bat Jun 11 '18 at 19:59
  • Click Help -> About Microsoft Visual Studio. Then find NuGet Package Manager there. What is your version? – Peska Jun 12 '18 at 06:02
  • @Peska Version 4.6.0 – exe.bat Jun 12 '18 at 07:59

1 Answers1

1

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

exe.bat
  • 340
  • 1
  • 2
  • 17