简体   繁体   English

无法使用.vsix文件安装Visual Studio Community 2015的扩展

[英]Unable to install extension for Visual Studio Community 2015 using .vsix file

I've been trying to install an extension for visual Studio Community 2015 using a .vsix file. 我一直在尝试使用.vsix文件为visual Studio Community 2015安装扩展程序。 When I double-click it, nothing happens. 当我双击它时,没有任何反应。 I've also tried opening it with "Visual Studio Version Selector" using "Open With..", but even then nothing happens. 我也尝试使用“Open With ..”打开“Visual Studio版本选择器”,但即使这样也没有任何反应。

After some searching, I found that the .vsix file can also be installed using Developer Command Prompt for VS2015 , but even that didn't help. 经过一些搜索,我发现.vsix文件也可以使用VS2015的开发人员命令提示符安装,但即使这样也无济于事。

Initially I thought that maybe the extension is faulty, but the same thing happens if try to install any other .vsix extension. 最初我认为扩展可能有问题,但如果尝试安装任何其他.vsix扩展, .vsix发生同样的事情。

Note: The extensions that I have tried to installing are UnrealVS.vsix and Roslyn_SDK.vsix 注意:我尝试安装的扩展是UnrealVS.vsixRoslyn_SDK.vsix

This seems to be a common issue, as the standard double click operation over a VSIX file in the File Explorer will fail to install ANY Visual Studio 2015 .vsix extension. 这似乎是一个常见问题,因为文件资源管理器中VSIX文件的标准双击操作将无法安装任何Visual Studio 2015 .vsix扩展。 It appears that this operation requires administrative permissions. 看来此操作需要管理权限。 The issue here is that it is not possible to indicate to "install as administrator". 这里的问题是无法指示“以管理员身份安装”。

The only way to install the extension was executing the VSIXInstaller.exe using a CMD Window as Administrator and passing the VSIX file as parameters. 安装扩展的唯一方法是使用CMD窗口作为管理员执行VSIXInstaller.exe并将VSIX文件作为参数传递。 The procedure I used was: 我使用的程序是:

  1. Open a CMD Window as Administrator 以管理员身份打开CMD窗口
  2. Go to Common7\\IDE folder of your VS 2015 installation: 转到VS 2015安装的Common7 \\ IDE文件夹:

     CD C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE 
  3. Execute the installer passing your VSIX file name as parameter: 执行安装程序将VSIX文件名作为参数传递:

     VSIXInstaller.exe c:\\YourVSIXFile. 
  4. The installer should now start the installation process for your VSIX extension. 安装程序现在应该开始VSIX扩展的安装过程。 Hope this helps 希望这可以帮助

Normally, .vsix is associated with VSIXInstaller. 通常,.vsix与VSIXInstaller相关联。 By default it is located at C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\VSIXInstaller.exe 默认情况下,它位于C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\VSIXInstaller.exe

Try to unzip the .vsix file and have a look of the vsixmanifest see the InstallationTarget supports 14.0 or not. 尝试解压缩.vsix文件并查看vsixmanifest,看看InstallationTarget是否支持14.0。

If no add InstallationTarget Version="14.0" Id="Microsoft.VisualStudio.Community" 如果没有添加InstallationTarget版本=“14.0”Id =“Microsoft.VisualStudio.Community”

I had this issue before and the only way I was able to install extensions is by using the following steps: 我之前遇到过这个问题,我能够安装扩展的唯一方法是使用以下步骤:

  1. Tools -> Extensions and Updates -> Online 工具 - >扩展和更新 - >在线
  2. Search the extension name 搜索扩展名称
  3. Click Download 单击下载

This will download and install the extension cleanly for you. 这将为您干净地下载并安装扩展。 some of the extensions will take you to page where you download the .vsix which you have to install it as the other comments describe. 一些扩展将带你到你下载.vsix的页面,你必须像其他评论所描述的那样安装它。

I don't know why it happened at the first place. 我不知道为什么它发生在第一位。 But the problem was fixed after I reinstalled visual studio 2015 community. 但是在我重新安装visual studio 2015社区后问题得到解决。
Thank you all for your suggestions. 谢谢大家的建议。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM