I've run into an issue where NuGet packs up a project but doesn't include any dependencies even though the project has many packages included and installed via Nuget.
First part of the issue:
The issue occurs because from time to time when updating packages within VS 2010 Nuget will update the packages.config but will not download the new binaries to the ./packages folder, so the old version would remain in the packages folder but a new one will be referenced in packages.config. I don't really have any clues on why and when this happens - it just happens on random.
When this does happen I would go into packages folder and delete the old package folder, remove the package and reinstall it, effectively adding the new version.
However, if we delete the entire packages folder:
1. If we didn't touch packages.config the project will still build, even if we cleaned it before - it will copy the binaries into the bin folder - I have no clue from where? Packages restore disabled.
2. If we enable package restore and run nuget install packages.config, Nuget will copy the packages each into its own folder within the project folder (not in the top packages folder) - so this is another issue, why doesn't it copy the packages to the root packages folder?
3. In both of the described cases, the pack command will leave out dependencies and the .nupkg file will have "No dependencies".
4. If we manually recreate the packages folder and manually copy the individual package folder from within the project folder to the packages folder and then run the pack command, .nupkg will have the correct dependencies listed.
Comments: >>I've run into an issue where NuGet packs up a project but doesn't include any dependencies even though >> the project has many packages included and installed via Nuget. this looks to be dupe of http://nuget.codeplex.com/workitem/936 >>The issue occurs because from time to time when updating packages within VS 2010 Nuget will update the >>packages.config but will not download the new binaries to the ./packages folder, so the old version would >>remain in the packages folder but a new one will be referenced in packages.config. I don't really have any >>clues on why and when this happens - it just happens on random. can you please try it with the latest NuGet version there were some bug fixes and if it works for you now. >>1. If we didn't touch packages.config the project will still build, even if we cleaned it before - it will copy >>the binaries into the bin folder - I have no clue from where? Packages restore disabled. when you build binaries it gets copied to bin folder and hence it references from there. you need to enable package restore so that next time you build it restores the packages for you. More info can be found here http://docs.nuget.org/docs/workflows/using-nuget-without-committing-packages (ok in step2 I saw you enabled it :) >> If we enable package restore and run nuget install packages.config, Nuget will copy the packages each >>into its own folder within the project folder (not in the top packages folder) - so this is another issue, >>why doesn't it copy the packages to the root packages folder? nuget install provides -OutputDirectory to install in a specific dir. by default it installs in the current directory. Actually, if you build the project with package restore it would automatically download the packages for you. you could see more about nuget install command by typing nuget help install Hope this helps.
First part of the issue:
The issue occurs because from time to time when updating packages within VS 2010 Nuget will update the packages.config but will not download the new binaries to the ./packages folder, so the old version would remain in the packages folder but a new one will be referenced in packages.config. I don't really have any clues on why and when this happens - it just happens on random.
When this does happen I would go into packages folder and delete the old package folder, remove the package and reinstall it, effectively adding the new version.
However, if we delete the entire packages folder:
1. If we didn't touch packages.config the project will still build, even if we cleaned it before - it will copy the binaries into the bin folder - I have no clue from where? Packages restore disabled.
2. If we enable package restore and run nuget install packages.config, Nuget will copy the packages each into its own folder within the project folder (not in the top packages folder) - so this is another issue, why doesn't it copy the packages to the root packages folder?
3. In both of the described cases, the pack command will leave out dependencies and the .nupkg file will have "No dependencies".
4. If we manually recreate the packages folder and manually copy the individual package folder from within the project folder to the packages folder and then run the pack command, .nupkg will have the correct dependencies listed.
Comments: >>I've run into an issue where NuGet packs up a project but doesn't include any dependencies even though >> the project has many packages included and installed via Nuget. this looks to be dupe of http://nuget.codeplex.com/workitem/936 >>The issue occurs because from time to time when updating packages within VS 2010 Nuget will update the >>packages.config but will not download the new binaries to the ./packages folder, so the old version would >>remain in the packages folder but a new one will be referenced in packages.config. I don't really have any >>clues on why and when this happens - it just happens on random. can you please try it with the latest NuGet version there were some bug fixes and if it works for you now. >>1. If we didn't touch packages.config the project will still build, even if we cleaned it before - it will copy >>the binaries into the bin folder - I have no clue from where? Packages restore disabled. when you build binaries it gets copied to bin folder and hence it references from there. you need to enable package restore so that next time you build it restores the packages for you. More info can be found here http://docs.nuget.org/docs/workflows/using-nuget-without-committing-packages (ok in step2 I saw you enabled it :) >> If we enable package restore and run nuget install packages.config, Nuget will copy the packages each >>into its own folder within the project folder (not in the top packages folder) - so this is another issue, >>why doesn't it copy the packages to the root packages folder? nuget install provides -OutputDirectory to install in a specific dir. by default it installs in the current directory. Actually, if you build the project with package restore it would automatically download the packages for you. you could see more about nuget install command by typing nuget help install Hope this helps.