diff --git a/build/vsts-prerequisites.ps1 b/build/vsts-prerequisites.ps1 index c6bf84e1..9899c467 100644 --- a/build/vsts-prerequisites.ps1 +++ b/build/vsts-prerequisites.ps1 @@ -7,6 +7,14 @@ $modules = @("PSFramework", "PSScriptAnalyzer", "Az.Storage", "AzureAd", "PSNoti Write-Host "Installing Pester, maximum version 4.99.99" -ForegroundColor Cyan Install-Module "Pester" -MaximumVersion 4.99.99 -Force -Confirm:$false -Scope CurrentUser -AllowClobber -SkipPublisherCheck +# TODO: When issue #645 with PSFramework/PSModuleDevelopment is resolved, this can be removed again. +# https://github.com/PowershellFrameworkCollective/psframework/issues/645 +Write-Host "Installing PSFramework, maximum version 1.11.343" -ForegroundColor Cyan +Install-Module "PSFramework" -MaximumVersion 1.11.343 -Force -Confirm:$false -Scope CurrentUser -AllowClobber -SkipPublisherCheck +Write-Host "Installing PSModuleDevelopment, maximum version 2.2.11.168" -ForegroundColor Cyan +Install-Module "PSModuleDevelopment" -MaximumVersion 2.2.11.168 -Force -Confirm:$false -Scope CurrentUser -AllowClobber -SkipPublisherCheck + + foreach ($item in $modules) { $module = Get-InstalledModule -Name $item -ErrorAction SilentlyContinue