Skip to content

Instantly share code, notes, and snippets.

@shishkin
Created October 21, 2010 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shishkin/638859 to your computer and use it in GitHub Desktop.
Save shishkin/638859 to your computer and use it in GitHub Desktop.
PowerShell: Copies *.pdb files from current folder to GAC. Multiple assembly versions are not supported.
resolve-path *.pdb | % {
$pdb = $_
$fileName = split-path $pdb -leaf
$assembly = [io.path]::GetFileNameWithoutExtension($fileName)
$gac = "$env:windir\assembly\GAC_MSIL\$assembly"
if (test-path $gac) {
resolve-path "$gac\*" | % {
copy $pdb -destination $_ -force
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment