简体   繁体   English

使用 MSI 安装程序部署 VSIX

[英]Deploying VSIX using MSI installer

Can anyony help me in "How to install VSIX using MSI installer".任何人都可以帮助我“如何使用 MSI 安装程序安装 VSIX”。

For msi installer I'm using visual studio Installer setup project.对于 msi 安装程序,我正在使用 Visual Studio 安装程序安装项目。

When I use VSIX with extension manager it works fine.当我将 VSIX 与扩展管理器一起使用时,它工作正常。

I want to have it as a installer(using msi) instead of using enstension manager.我想将它作为安装程序(使用 msi)而不是使用 enstension 管理器。

or any best wa yto install and unstall VSIX files或任何安装和卸载 VSIX 文件的最佳方式

This isn't a suggested scenario.这不是建议的方案。

From MSDN, "You cannot use a Windows Installer package (MSI) to deploy a VSIX package. However, you can extract the contents of a VSIX package for MSI deployment. This document shows how to prepare a project whose default output is a VSIX package for inclusion in a Setup project." From MSDN, "You cannot use a Windows Installer package (MSI) to deploy a VSIX package. However, you can extract the contents of a VSIX package for MSI deployment. This document shows how to prepare a project whose default output is a VSIX package以包含在安装项目中。”

Here are some pages with more information:以下是一些包含更多信息的页面:

MSDN page MSDN 页面

VS Blog VS 博客

MSDN Forum MSDN 论坛


Adding more information about how you could accomplish this:添加有关如何完成此操作的更多信息:

You can't use the vsix itself, but you can unzip it (just rename the vsix to zip) and add all of the files to your MSI manually.您不能使用 vsix 本身,但您可以解压缩它(只需将 vsix 重命名为 zip)并手动将所有文件添加到您的 MSI。 As it says on the VS Blog , you need to make sure that you include the vsixmanifest file (it should be in the vsix) and make sure that you set the "InstalledByMsi" property to true.正如VS 博客上所说,您需要确保包含 vsixmanifest 文件(它应该在 vsix 中)并确保将“InstalledByMsi”属性设置为 true。 If you have a pkgdef file, make sure you include that as well.如果您有一个 pkgdef 文件,请确保您也包含该文件。

Again, as it says on the VS Blog , all of these files should be installed to同样,正如VS Blog上所说,所有这些文件都应该安装到

"%VSInstallDir%\Common7\Ide\Extensions\Your Company\Your Product\Version"

(And you'll need to replace %VSInstallDir% based on the actual location.) (并且您需要根据实际位置替换 %VSInstallDir% 。)

You asked:您问:

How to put some files in non special folders using visual studio installer.如何使用 Visual Studio 安装程序将一些文件放在非特殊文件夹中。

Vsix packages installed by the standard vsix installer will always put all of the files under the same folder in "%VSInstallDir%\Common7\Ide\Extensions...", but because you're using an MSI, you should be able to put other files in other places if you want.由标准 vsix 安装程序安装的 vsix 软件包将始终将所有文件放在“%VSInstallDir%\Common7\Ide\Extensions...”中的同一文件夹下,但是因为您使用的是 MSI,所以您应该能够将如果需要,其他地方的其他文件。

I haven't tried this myself, but I've worked with vsix quite a bit.我自己没有尝试过,但我已经使用 vsix 工作了很多次。

I hope this helps!我希望这有帮助!

in my case i needed to run devenv /setup in admin mode in order to work, then it work perfect !在我的情况下,我需要在管理员模式下运行 devenv /setup 才能工作,然后它就完美了!

C:\Windows\system32>"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" /setup C:\Windows\system32>"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" /setup

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

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