I wrote a tool to do exactly this as part of NuGet.Extensions : https://github.com/BenPhegan/NuGet.Extensions
Its (imaginatively) called "nugetify". It does most of what you want, however it:
1) Is currently only built against NuGet 1.7 (not a real problem as you can run multiple versions of NuGet side-by-side)
2) Does not constrain to version.
The constrain to version thing can be fixed in part by using another tool in the NuGet.Extensions set called "findassembly". You can run this against your lib directory, and it will tell you which packages contain the assemblies in the directory. You can then stage the correct version once you know the package (again, theres a command for that called "clone") and you will then have the right versions on an internal feed.
It is then a case of calling "nugetify" on the solutions one by one, and checking the package resolution is correct.
We have done literally hundreds of solution upgrade from a central lib directory to using NuGet, and once we had this tool it became pretty trivial.
Its (imaginatively) called "nugetify". It does most of what you want, however it:
1) Is currently only built against NuGet 1.7 (not a real problem as you can run multiple versions of NuGet side-by-side)
2) Does not constrain to version.
The constrain to version thing can be fixed in part by using another tool in the NuGet.Extensions set called "findassembly". You can run this against your lib directory, and it will tell you which packages contain the assemblies in the directory. You can then stage the correct version once you know the package (again, theres a command for that called "clone") and you will then have the right versions on an internal feed.
It is then a case of calling "nugetify" on the solutions one by one, and checking the package resolution is correct.
We have done literally hundreds of solution upgrade from a central lib directory to using NuGet, and once we had this tool it became pretty trivial.