Reputation: 280
I know I can restore my nuget packages through the Nuget Package Manager, and that nuget packages are restored if they are missing while building.
However, I was wondering if I don't have any nuget packages missing is there anything different that happens when I build or rebuild a solution in terms of what happens with the nuget packages?
Upvotes: 1
Views: 954
Reputation: 101
If you have a project that has a lot of C++ / C# / and C++/CLI interop code you can also have projects that will call the nuget command line directly to restore packages to folders that don't have a version number in them. This is so that interop projects can get access to the contents of the nuget packages for referencing. The Nuget UI doesn't allow interop projects to include nuget packages directly in a lot of cases.
Upvotes: 1
Reputation: 218
Did you also disable the NuGet source for the original server? NuGet or Visual Studio is somehow aware of where a package originally came from and most likely would not require that all packages come from your local NuGet source. It can pull from multiple sources during restore.
If you disabled the original server source, I’m not sure if NuGet still tries to restore from that server based on its cached information.
Also, if no new versions of a package found, it will probably appear like a restore never happened for those packages.
Upvotes: 1
Reputation: 280
By doing the following experiment it seems like nuget packages don't get restored on a rebuilt if they are not missing:
I don't thing the rest of the nuget packages were restored because my local folder doesn't have those nugets that came from the server
Upvotes: 1