visual-studio 如何在 Visual Studio 中向安装项目添加自定义图标?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3977685/
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-10-22 12:38:06  来源:igfitidea点击:

How to add a custom icon to Setup Project in Visual Studio?

visual-studioinstallericons

提问by Vitalij

I am trying to add a custom icon to setup project. So instead of standard installer logo I have my custom logo.

我正在尝试向设置项目添加自定义图标。因此,我有我的自定义徽标,而不是标准的安装程序徽标。

To make it clear, here is the icon, which I want to change:

为了清楚起见,这是我想要更改的图标:

installer icon

安装程序图标

回答by dhirschl

Right-click the Setup Project in Solution Explorer and select View > User Interface.

在解决方案资源管理器中右键单击安装项目并选择View > User Interface

This will display all the screens of the installer.

这将显示安装程序的所有屏幕。

The picture that you want to change is the property BannerBitmap.

您要更改的图片是属性BannerBitmap

You can customize this for any screen of the installer.

您可以为安装程序的任何屏幕自定义此设置。

回答by hawbsl

Just to add to dhirschl's answer ... you also have the option to change the default BannerBitmap so that all your setups have your own logo automatically and you don't have to worry about fixing it every time you create a new setup.

只是为了添加到dhirschl的答案......您还可以选择更改默认 BannerBitmap 以便您的所有设置自动拥有您自己的徽标,并且每次创建新设置时您都不必担心修复它。

Clear instructions on how to do this are provided by René van Bemmelenand can be found hereon the Microsoft forums.

René van Bemmelen提供了有关如何执行此操作的明确说明,可在 Microsoft 论坛的此处找到。