Created
April 30, 2014 05:13
-
-
Save aaronpowell/d798507cbca08d86b41a to your computer and use it in GitHub Desktop.
Find csproj files referencing an assembly
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
Get-ChildItem -Filter *.csproj -Recurse | | |
Select-Object -Property FullName,@{N="Xml"; E = { | |
Select-Xml -Path $_.FullName -XPath //b:Reference -Namespace @{b='http://schemas.microsoft.com/developer/msbuild/2003'} | | |
Select-Object -ExpandProperty Node | | |
Select-Object -Property Include, HintPath | | |
Where-Object { $_.HintPath -ne $null } | | |
Where-Object { $_.Include -eq "My.Assembly.Name" } | |
} } | | |
Where-Object { $_.Xml -ne $null } | | |
Out-GridView |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment