简体   繁体   English

创建Visual Studio扩展包安装程序

[英]Creating Visual Studio extension package installer

I have created a Visual Studio extension that is compatible with Visual Studio versions 2005 - 2013. For VS2010 and later I've just uploaded the extension in vsix format to the gallery and to be honest I want to keep the comfortable vsix format for these newer versions of VS. 我创建了一个与Visual Studio版本2005 - 2013兼容的Visual Studio扩展。对于VS2010及更高版本,我刚刚将vsix格式的扩展名上传到库中,说实话我想为这些新版本保留舒适的vsix格式版本的VS. My problem is that I want to publish the extension for legacy VS versions (2005 and 2008) as well and I haven't found a clean solution to my problem despite spending several days with research. 我的问题是我想发布旧版VS版本(2005和2008)的扩展程序,尽管花了几天研究,我还没有找到一个干净的解决方案来解决我的问题。

What I've done so far: 到目前为止我做了什么:

  • I've found out that pre-VS2010 VS versions made use of msi installers to get the job done and many people created msi installers that work for both pre- and post VS2010 VS versions. 我发现VS2010之前的VS版本使用了msi安装程序来完成工作,许多人创建了适用于VS2010 VS版本之前和之后的msi安装程序。 (Note: I don't want msi isntaller for VS2010 and later, there vsix is OK for me). (注意:我不希望msi isntaller用于VS2010及更高版本,vsix对我来说还可以)。
  • Checked out wix and read some docs/examples, it can create msi installers from vsix but the details are still not clear for me... 查看了wix并阅读了一些文档/示例,它可以从vsix创建msi安装程序,但细节仍然不清楚...
  • I've never created complex msi installer that detect installation paths etc... I've spent at least 2 days by testing out the features of a test msi installer project in VS2005 and VS2008. 我从未创建过检测安装路径等的复杂msi安装程序......我通过测试VS2005和VS2008中测试msi安装程序项目的功能至少花了2天时间。 To me this msi creation process seems to be quite error prone and I don't know the pitfalls of creating msi for extensions. 对我来说,这个msi创建过程似乎非常容易出错,我不知道为扩展创建msi的缺陷。
  • I've examined the manual installation steps that have to be performed to deploy an extension for VS2005 and VS2008 (registry modifications, post-executing devenv, ...) 我已经检查了为VS2005和VS2008部署扩展而必须执行的手动安装步骤(注册表修改,后执行devenv,...)

Questions: 问题:

  • I want to keep the vsix format for VS2010 and later - can I distribute an msi on the Visual Studio Gallery page for VS2005 and VS2008 using the same extension guid I used for VS2010 and later? 我想保留VS2010及更高版本的vsix格式 - 我可以使用VS2010及更高版本使用的相同扩展名guid在VS2005和VS2008的Visual Studio Gallery页面上发布msi吗? Is this possible or a single guid is allowed only in case of distributing a single msi for all versions? 这是可能的还是只有在为所有版本分发单个msi的情况下才允许使用单个guid?
  • How does the Visual Studio gallery page extract the extension id/guid from the msi? Visual Studio库页面如何从msi中提取扩展ID / guid? (The gallery page does this without problems in case of a vsix package). (对于vsix软件包,gallery库页面没有问题)。
  • If I use wix to create an msi from vsix can it deal with both VS2005 and VS2008 using a single msi? 如果我使用wix从vsix创建一个msi,它可以使用一个msi处理VS2005和VS2008吗? (This is important, especially when someone has both versions on his machine...) (这很重要,特别是有人在他的机器上有两个版本......)
  • If I decide to create my own msi (for example by creating an installer project in VS) then what are the most important restrictions/requirements to meet in order to get a valid extension installer msi? 如果我决定创建自己的msi(例如通过在VS中创建安装程序项目),那么为了获得有效的扩展安装程序msi,要满足哪些最重要的限制/要求? (extra requirements for the msi installer of a VS extension compared to the installer of any other regular software). (与任何其他常规软件的安装程序相比,VS扩展的msi安装程序的额外要求)。
  • I've tried to find a simple msi extension installer project example among opensource software sources using google but I wasn't successful, can you point at an example to "copy-paste"? 我试图在使用谷歌的开源软件资源中找到一个简单的msi扩展安装程序项目示例,但我没有成功,你能指出一个例子来“复制粘贴”吗?
  • I was thinking about creating a simple custom installer in C# that performs the manual installation steps. 我正在考虑在C#中创建一个简单的自定义安装程序,执行手动安装步骤。 Could I upload this into the Visual Studio gallery? 我可以将其上传到Visual Studio库吗? (I guess not...) (我猜不会...)

Any comments/suggestions are welcome especially if you have already faced a similar situation. 如果您已经遇到类似情况,欢迎提出任何意见/建议。

Speaking from my own experience, I developed several packages with VS 2005-2013 support. 根据我自己的经验,我开发了几个支持VS 2005-2013的软件包。 I use Wix generating .msi that copies files and writes to HKLM\\Software\\Microsoft\\VisualStudio\\x.0. 我使用Wix生成.msi复制文件并写入HKLM \\ Software \\ Microsoft \\ VisualStudio \\ x.0。 Supporting only VS 2005/2008 from an .msi should be even more simple. 仅支持.msi的VS 2005/2008应该更加简单。

Visual Studio gallery doesn't extract anything from msi (you can even just post a link to your site). Visual Studio库不会从msi中提取任何内容(您甚至可以发布指向您网站的链接)。 I don't have links to good samples, but basically you need to add info about your package to HKLM\\Software\\Microsoft\\VisualStudio\\9.0\\Packages plus Menus and ToolWindows . 我没有良好样本的链接,但基本上您需要将有关您的包的信息添加到HKLM \\ Software \\ Microsoft \\ VisualStudio \\ 9.0 \\ Packages以及菜单和ToolWindows

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

相关问题 Visual Studio安装程序包未生成 - Visual Studio Installer Package not Building Visual Studio 高级安装程序扩展 - 如何在控制台应用程序中使用 package app.config 文件 - Visual Studio Advanced Installer Extension - how to package app.config files in console app 脱机安装 Visual Studio 安装程序项目扩展 - Installing Visual Studio Installer Projects extension offline Visual Studio 2019 安装程序总是无法下载离线安装程序的包? - Visual Studio 2019 Installer keep failing to download package for offline installer? Visual Studio安装程序未创建.msi文件 - Visual Studio Installer not creating .msi file 在 Visual Studio 2022 上为 windows 服务创建安装程序 - Creating an installer for a windows service on Visual Studio 2022 在Visual Studio Installer安装项目中创建文件夹 - Creating folders in a Visual Studio Installer Setup project Visual Studio 2013安装程序项目扩展复制到根文件夹 - Visual Studio 2013 Installer Projects Extension copying to root folder Visual Studio扩展:从装饰品获取包 - Visual Studio Extension: Get Package from adornment 如何在Visual Studio安装程序项目中包括NuGet程序包 - How to include a NuGet package in Visual Studio Installer Project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM