Created
March 23, 2016 14:47
-
-
Save jdforsythe/3297fc91bb2a29ce4b77 to your computer and use it in GitHub Desktop.
Find all VS projects that reference a Nuget Package as a dependency 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" | |
echo "Finding all projects using NuGet package for ${1}" | |
# find all nested folders with a packages.config file (where the NuGet package references are stored) | |
# loop through the results | |
find ${2:-"${DEFAULT_VS_PROJECT_TOP_LEVEL_FOLDER}"} -name "packages.config" -exec grep -l "${1}" {} \; | while read -r filename ; do | |
echo $(basename "$(dirname "$filename")") | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment