Scripts/install-reportgenerator.ps1

$version = "5.4.9"
$packageUrl = "https://globalcdn.nuget.org/packages/dotnet-reportgenerator-globaltool.$version.nupkg?packageVersion=$version"
$targetDir = "./Output/dependencies/dotnet-reportgenerator-globaltool"
$tempFile = "./Output/dependencies/package.nupkg"

if (-not (Test-Path $targetDir)) {
    New-Item -ItemType Directory -Path $targetDir -Force
}

Invoke-WebRequest -Uri $packageUrl -OutFile $tempFile

Expand-Archive -Path $tempFile -DestinationPath $targetDir -Force

Remove-Item $tempFile