Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. Split-Path -parent $dte.Solution.FileName | cd
  2. New-Item -ItemType Directory -Force -Path ".\licenses"
  3. @( Get-Project -All | ? { $_.ProjectName } | % { Get-Package -ProjectName $_.ProjectName } ) | Sort -Unique Id | % { $pkg = $_ ; Try { (New-Object System.Net.WebClient).DownloadFile($pkg.LicenseUrl, (Join-Path (pwd) 'licenses\') + $pkg.Id + ".html") } Catch [system.exception] { Write-Host "Could not download license for $($pkg.Id)" } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement