我已经从 Visual Studio Installer
创建了一个 Setup Project
。
我安装了 MSI
并且能够安装该应用程序。我想为我在桌面上创建的快捷方式添加一个图标。为此,我尝试了以下步骤:
- 1) Selected the desktop shortcut from the
FileSystem
view.- 2) Press
F4
for properties.- 3) For the Icon Field selected Browse option.
- 4) Clicked on Browse button.
- 5) Set
File of type
to Executable(.exe)- 6) Press
OK
andOK
again.- 7) Then build my C# application and then the Setup Project.
- 8) Then ran the
MSI
from the debug location.- 9) Then a shortcut created and as well as .exe file got installed on the desktop.
- 10) ICON size is
16*16
.
The
.exe
file shows the ICON , where as the desktop shortcut for the same executable is not showing ICON and it showing as below.
我不明白为什么它不显示图标。
有人可以帮我解决这个问题吗?
最佳答案
终于解决了。解决方案是将图标大小从 16*16 更改为 48*48
像素。我已将我的应用程序图标大小设置为 48*48 像素
,并且在设置项目中为桌面快捷方式设置图标时选择了相同的大小。
即使是大小为 24*24
的 ICON 也能正常工作。希望这有助于寻找类似问题的人。
关于c# - 如何为使用 visual studio Installer 创建的安装项目的桌面快捷方式设置图标?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48079144/