Installing the VS.NET Extension from the Command Line

Is there a way to install the VS.NET extension from the command line? I am working on setting up development virtual machines using a firewall and powershell to provide, and would also like to be able to automate the installation of some of my favorite extensions.

+7
powershell visual-studio
source share
3 answers

You can use VSIXInstaller to automate the installation of extensions:

enter image description here

+4
source share

Sergey's answer is correct, but here powershell script I used it for automation (stolen from the chocolate package I found):

function Get-Batchfile ($file) { $cmd = "`"$file`" & set" cmd /c $cmd | Foreach-Object { $p, $v = $_.split('=') Set-Item -path env:$p -value $v } } function VsVars32() { $BatchFile = join-path $env:VS120COMNTOOLS "vsvars32.bat" Get-Batchfile `"$BatchFile`" } function curlex($url, $filename) { $path = [io.path]::gettemppath() + "\" + $filename if( test-path $path ) { rm -force $path } (new-object net.webclient).DownloadFile($url, $path) return new-object io.fileinfo $path } function installsilently($url, $name) { echo "Installing $name" $extension = (curlex $url $name).FullName $result = Start-Process -FilePath "VSIXInstaller.exe" -ArgumentList "/q $extension" -Wait -PassThru; } # INSTALL VS Extenaions installsilently http://visualstudiogallery.msdn.microsoft.com/59ca71b3-a4a3-46ca-8fe1-0e90e3f79329/file/6390/49/VsVim.vsix VsVim.vsix 
+1
source share

I used this batch-install-vsix chocolate package to configure and install extensions.

0
source share

All Articles