Kae Travis

Installing the Package Support Framework (PSF) Using PowerShell

This blog provides an example of installing the Package Support Framework (PSF) using PowerShell.

We’ve discussed previously what the Package Support Framework (PSF) for MSIX is, and how we can use it to create fixups for MSIX packages. We also outlined how to manually obtain the PSF files required to fix our MSIX applications. But this post provides a more automated approach of installing PSF for MSIX:

Write-Host "Installing PSF..."
$nuget = get-packagesource | Where-Object ProviderName -eq "Nuget"
if ($nuget -eq $null) {
Register-PackageSource -Name nuget.org -Location https://www.nuget.org/api/v2 -ProviderName NuGet
Install-Package -Name Microsoft.PackageSupportFramework -ProviderName Nuget -Force
} else {
$package = Get-Package | Where-Object Name -eq "Microsoft.PackageSupportFramework"
if ($nuget -eq $null) {
Install-Package -Name Microsoft.PackageSupportFramework -ProviderName Nuget -Force
}
}
$nupkg = Get-Package | Where-Object Name -eq "Microsoft.PackageSupportFramework" | Select -ExpandProperty Source
$psfBinFolder = (get-item $nupkg).Directory.FullName + "\bin\"
write-host "The PSF bin folder is $psfBinFolder"
Write-host "Finished"
Installing the Package Support Framework (PSF) Using PowerShell
Installing the Package Support Framework (PSF) Using PowerShell

Leave a Reply