visual-studio Visual Studio 安装项目自定义对话框

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11439/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 16:22:01  来源:igfitidea点击:

Visual Studio Setup Project Custom Dialog

.netvisual-studiowindows-installerinstallationprojects

提问by kjv

I have created a custom dialog for Visual Studio Setup Project using the steps described here

我使用此处描述的步骤为 Visual Studio 安装项目创建了一个自定义对话框

Now I have a combobox in one of my dialogs. I want to populate the combobox with a list of all SQL Server instances running on the local network. It's trivial to get the server list ... but I'm completely lost on how to make them display in the combobox. I would appreciate your help and some code might also be nice as I'm beginner :).

现在我的一个对话框中有一个组合框。我想用本地网络上运行的所有 SQL Server 实例的列表填充组合框。获取服务器列表很简单……但我完全不知道如何让它们显示在组合框中。我很感激你的帮助,因为我是初学者,一些代码也可能很好:)。

回答by DavidWhitney

I've always found the custom dialogs in visual studio setup projects to be woefully limited and barely functional.

我一直发现 Visual Studio 设置项目中的自定义对话框非常有限且几乎没有功能。

By contrast, I normally create custom actions that display winforms gui's for any remotely difficult tasks during setup. Works really well and you can do just about anything you want by creating a custom action and passing a few parameters across.

相比之下,我通常会创建自定义操作,在安装过程中为任何远程困难的任务显示 winforms gui。效果非常好,您可以通过创建自定义操作并传递一些参数来做任何您想做的事情。

In the dayjob we built a collection of common custom actions for tasks like application config and database creation / script execution to get around custom dialog limitations.

在日常工作中,我们为应用程序配置和数据库创建/脚本执行等任务构建了一组常见的自定义操作,以绕过自定义对话框的限制。

回答by Jon Limjap

I guess you'll have to go beyond the out-of-the-box setup and deployment package and try a third party app.

我想您将不得不超越开箱即用的设置和部署包并尝试第三方应用程序。

You may want to look at:

你可能想看看:

Both are free; they might give you the customization that you need.

两者都是免费的;他们可能会为您提供所需的定制。