Skip to content

Instantly share code, notes, and snippets.

@MatthewKing
Last active August 29, 2015 14:03
Show Gist options
  • Save MatthewKing/53ea42bcc8a95c886820 to your computer and use it in GitHub Desktop.
Save MatthewKing/53ea42bcc8a95c886820 to your computer and use it in GitHub Desktop.
Get a ClickOnce Application Reference from a ClickOnce Application Deployment Manifest.
function Get-ApplicationReference([string] $deploymentManifestPath) {
[xml]$content = Get-Content $deploymentManifestPath
$identity = $content.assembly.assemblyIdentity
$codebase = $content.assembly.deployment.deploymentProvider.codebase
$appref = '{0}#{1}, Culture={2}, PublicKeyToken={3}, processorArchitecture={4}' -f $codebase, $identity.name, 'neutral', $identity.publicKeyToken, $identity.processorArchitecture
return $appref
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment