Created
March 23, 2016 14:24
-
-
Save jdforsythe/e0781c6b270f03f70f3c to your computer and use it in GitHub Desktop.
List all VS projects with their NuGet dependencies from a top-level dev folder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DEFAULT_VS_PROJECT_TOP_LEVEL_FOLDER="/e/dev/internal-apps" | |
# find all nested folders with a packages.config file (where the NuGet package references are stored) | |
# loop through the results | |
find ${1:-"${DEFAULT_VS_PROJECT_TOP_LEVEL_FOLDER}"} -name "packages.config" | while read -r filename ; do | |
echo | |
echo $(basename "$(dirname "$filename")") | |
cat "$filename" | grep "<package " | sed -n 's/.*id="\([^"]*\).*version="\([^"]*\).*/\1@\2/p' | sed 's/^/ |-/' | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment