如何从命令行安装Visual Studio Gallery扩展 [英] How to install Visual Studio Gallery extensions from command line

查看:740
本文介绍了如何从命令行安装Visual Studio Gallery扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

TL; DR有什么方法可以从命令行访问Visual Studio Gallery,类似于chocolatey?

TL;DR Is there a way to access Visual Studio Gallery from command line, similar to chocolatey?

我试图配置一个Visual Studio dev环境使用< a href =https://www.vagrantup.com =nofollow> Vagrant 。现在,团队成员使用Visual Studio Gallery中提供的各种扩展,如果他们可以在配置计算机时对脚本进行脚本安装,这将是一件很棒的事。

I am trying to configure a Visual Studio dev environment using Vagrant. Now, team members use various extensions available from Visual Studio Gallery and it would be great if they could script their installation when provisioning the machine.

如果没有nuget存在,猜猜我们可以弄脏,使用wget获取vsix并手动提取到正确的目录,但我不知道VS Gallery中的下载链接是否持久。

If nothing nuget based exists, I guess we could get dirty and use wget to fetch vsix and extract it manually to the proper directory, but I don't know if the download links in VS Gallery are persistent.

推荐答案

如果从Visual Studio安装的开发人员命令提示符下运行 VsixInstaller.exe 与此文本:

If you run VsixInstaller.exe from the developer command prompt installed with Visual Studio, without parameters, you get a help text message box with this text:

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.

所以,根据这个,你可以这样做:

So, according to this you can do this:

VSIXInstaller.exe /quiet some_extension.vsix

如果你想在开发者命令提示符之外运行它,你可能需要为你想要安装的Visual Studio版本执行正确的。

If you want to run this outside the developer command prompt you probably need to execute the right one for the version of Visual Studio you want to install in.

我的版本在这里:


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

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

这篇关于如何从命令行安装Visual Studio Gallery扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆