When I enable package restore in a solution, nuget should look for .gitignore and .hgignore files in the same folder as the solution, and:
- If it finds "packages", do nothing
- If it finds "#packages" or "# packages", uncomment it
- If it finds nothing, add "packages" to the end of the file, perhaps with a # Added by Nuget package restore comment above it.
Popping a dialog to ask if it's okay to make that change would be a bonus. And in that case, you could also check one level up from the solution folder, for those who put the solution in a src folder.
- If it finds "packages", do nothing
- If it finds "#packages" or "# packages", uncomment it
- If it finds nothing, add "packages" to the end of the file, perhaps with a # Added by Nuget package restore comment above it.
Popping a dialog to ask if it's okay to make that change would be a bonus. And in that case, you could also check one level up from the solution folder, for those who put the solution in a src folder.