I have a C# solution containing different projects. On those projects, I have some normal nuget packages like Newtonsoft.Json, EntityFramework , etc. But when I checkout my source on another machine, and build it, it won't copy the Dlls
I've committed the whole solution folder to git and I can see the package folder and the contents in Bitbucket. What did I do wrong?
P.S: I know that I can run below to restore my packages, but that is a big pain.
P.S.S: I've searched and saw this and this. I am looking for a way to prevent it from happening again
nuget install packages.config
The idiomatic way to use NuGet (unlike npm, for example, where it's typical to commit
node_packages) is to commit only your
packages.config. Visual Studio will detect missing packages in the
packages/ folder and restore them on build, and
nuget restore at the command line will do the same.
The reason for this is that binaries are larger than text files, and not diffable (i.e. storing a delta isn't possible). I'm not sure git even works that way as svn did, but the authors of nuget aren't writing just for those using git.
If you're concerned about packages going missing, I have two points:
nuget installwill not.