Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nuget installed panel empty after VS 2017 update

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

like image 540
exe.bat Avatar asked Jun 09 '18 15:06

exe.bat


People also ask

What happens when a NuGet package is installed?

NuGet creates a subfolder for each package identifier, then creates subfolders for each installed version of the package. NuGet installs package dependencies as required. This process might update package versions in the process, as described in Dependency Resolution.

How do I force a NuGet package to reinstall?

Switch to the Browse tab, search for the package name, select it, then select Install). For all packages, delete the package folder, then run nuget install . For a single package, delete the package folder and use nuget install <id> to reinstall the same one.


1 Answers

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

like image 148
exe.bat Avatar answered Nov 03 '22 00:11

exe.bat