2015-06-01 14 views
9

TL; DR Czy istnieje sposób na uzyskanie dostępu do programu Visual Studio Gallery z wiersza poleceń, podobnie do chocolatey?Jak zainstalować rozszerzenia programu Visual Studio Gallery z wiersza polecenia

Próbuję skonfigurować środowisko programistyczne Visual Studio przy użyciu Vagrant. Teraz członkowie zespołu korzystają z różnych rozszerzeń dostępnych w Visual Studio Gallery i byłoby wspaniale, gdyby mogli skryptować swoją instalację podczas udostępniania urządzenia.

Jeśli nic nie istnieje, myślę, że możemy się zabrudzić i użyć wget, aby pobrać vsix i wyodrębnić go ręcznie do właściwego katalogu, ale nie wiem, czy linki do pobrania w VS Gallery są trwałe.

+0

Sprawdźcie tutaj: https: // społecznej. msdn.microsoft.com/Forums/vstudio/en-US/f420d6a1-f372-4bab-9970-b9c235a680cc/vsix-in-silent-mode –

Odpowiedz

15

Jeśli prowadzisz VsixInstaller.exe z wiersza poleceń deweloper zainstalowanego Visual Studio, bez parametrów, można dostać się okno komunikatu tekst pomocy z tym tekstem:

Usage: VSIXInstaller.exe [/quiet] [/admin] [/skuName:name /skuVersion:version] </uninstall:vsixID | vsix_path> 

    - OPTIONS - 

/quiet 
Suppresses the UI. Short form is '/q'. 

/admin 
The extension will be installed to the admin extensions location. Short form is '/a'. 

/skuName:<name> 
The name of the application to which to install or uninstall the extension. Must be used with /skuVersion. Valid values include: 
- Ultimate - (Visual Studio Ultimate Edition) 
- Premium - (Visual Studio Premium Edition) 
- Pro - (Visual Studio Professional Edition) 
- VSLS - (Visual Studio LightSwitch) 
- IntegratedShell - (Visual Studio Shell - Integrated Mode) 
- VBExpress - (Visual Basic Express) 
- VCSExpress - (Visual C# Express) 
- VCExpress - (Visual C++ Express) 
- VPDExpress - (Visual Studio Express for Windows Phone) 
- VSWinExpress - (Visual Studio Express for Windows) 
- VWDExpress - (Visual Studio Express for Web) 

Isolated Shell names may also be specified. Short form is '/s'. 

/skuVersion:<version> 
The version of the application to which to install or uninstall the extension, in the form major.minor[.build[.revision]]. Must be used with /skuName. Short form is '/v'. 

/uninstall:<vsixID> 
Uninstalls the extension with the specified identifier. If /skuName and /skuVersion are not specified, the extension will be uninstalled from all products that contain the extension with the corresponding identifier. Short form is '/u'. 

    - ARGUMENTS - 

<vsix_path> 
Path to a valid .vsix file. This argument is invalid when /uninstall is specified. 

Więc zgodnie z tym można zrobić:

VSIXInstaller.exe /quiet some_extension.vsix 

Jeśli chcesz uruchomić to poza wierszu polecenia dewelopera prawdopodobnie trzeba wykonać odpowiednie dla wersji programu Visual Studio, który chcesz zainstalować w.

Moja wersja jest tutaj:

C: \ Program Files (x86) \ Microsoft Visual Studio 11.0 \ Common7 \ IDE \ VSIXInstaller.exe