Here is a quick fix. It captures every .csproj file in the current directory and checks each link. For assemblies referenced by the GAC, only the name is displayed. For assemblies outside the GAC, the full assembly path is displayed.
$projectFiles = get-childitem . *.csproj -Recurse foreach( $projectFile in $projectFiles ) { $projectXml = [xml] (get-content $projectFile.FullName) $projectDir = $projectFile.DirectoryName Write-Host "# $($projectFile.FullName) #" foreach( $itemGroup in $projectXml.Project.ItemGroup ) { if( $itemGroup.Reference.Count -eq 0 ) { continue } foreach( $reference in $itemGroup.Reference ) { if( $reference.Include -eq $null ) { continue } if( $reference.HintPath -eq $null ) { Write-Host ("{0}" -f $reference.Include) } else { $fullpath = $reference.HintPath if(-not [System.IO.Path]::IsPathRooted( $fullpath ) ) { $fullPath = (join-path $projectDir $fullpath) $fullPath = [System.IO.Path]::GetFullPath("$fullPath") } Write-Host $fullPath } } } Write-Host '' }
Please note that by default there are some registry entries that MSBuild searches to find link locations that do not have hint paths. You can see where MSBuild looks and where it finds assemblies by compiling them with detailed logging:
msbuild My.csproj /t:build /v:d
source share