This commit is contained in:
Cameron Taggart 2017-04-17 12:06:59 -05:00 коммит произвёл Kevin Ransom (msft)
Родитель 2effc41b57
Коммит 3e61e1c9d4
2 изменённых файлов: 60 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,43 @@
# installs a nightly VisualFSharp build
# the latest version is installed if not specified
# https://blogs.msdn.microsoft.com/dotnet/2017/03/14/announcing-nightly-releases-for-the-visual-f-tools/
# https://dotnet.myget.org/feed/fsharp/package/vsix/VisualFSharp
# requies Visual Studio Setup PowerShell Module
# https://github.com/Microsoft/vssetup.powershell
# Install-Module VSSetup -Scope CurrentUser
[CmdletBinding()]
param (
[Parameter()] [string] $InstanceId,
[Parameter()] [string] $Version,
[switch] $Quiet
)
$feed = 'https://dotnet.myget.org/F/fsharp/vsix'
$wc = New-Object Net.Webclient
if(-not $Version){
$Version = ($wc.DownloadString($feed) -as [xml]).feed.entry.Vsix.Version
}
$file = 'VisualFSharp-' + $Version + '.vsix'
$tempfile = [IO.Path]::Combine([IO.Path]::GetTempPath(), $file)
$logFile = [IO.Path]::ChangeExtension($tempfile, '.txt')
$wc.DownloadFile($feed + '/' + $file, $tempfile)
$vs = Get-VSSetupInstance
[array]$argumentList = "/logFile:`"$logFile`""
$argumentList += "/appidinstallpath:`"$($vs.InstallationPath)\Common7\IDE\devenv.exe`""
$skuName = $vs.Product.Id.Replace("Microsoft.VisualStudio.Product.","")
$argumentList += "/skuName:$skuName"
$argumentList += "/skuVersion:`"$($vs.Product.Version)`""
$argumentList += "/appidname:`"Microsoft $($vs.DisplayName)`""
if(-not $InstanceId){
$InstanceId = $vs.InstanceId
}
$argumentList += "/instanceIds:$InstanceId"
if($Quiet.IsPresent){
$argumentList += "/quiet"
}
$argumentList += $tempfile
Start-Process (Join-Path $vs.InstallationPath 'Common7\IDE\VSIXInstaller.exe') -Wait -ArgumentList $argumentList
Remove-Item $tempfile

Просмотреть файл

@ -0,0 +1,17 @@
[CmdletBinding()]
param (
[Parameter()] [string] $InstanceId,
[Parameter()] [string] $Version,
[switch] $Quiet
)
$vs = Get-VSSetupInstance
[array]$argumentList = '/u:VisualFSharp'
if(-not $InstanceId){
$InstanceId = $vs.InstanceId
}
$argumentList += "/instanceIds:$InstanceId"
if($Quiet.IsPresent){
$argumentList += "/quiet"
}
Start-Process (Join-Path $vs.InstallationPath 'Common7\IDE\VSIXInstaller.exe') -ArgumentList $argumentList -Wait