码迷,mamicode.com
首页 > 其他好文 > 详细

【转】vs2012 打包安装更改 setup.exe的图标

时间:2016-08-09 12:11:51      阅读:189      评论:0      收藏:0      [点我收藏+]

标签:

还是老外的文章给力

 

I‘m not aware of any way to change the icon BEFORE building the project so that once the ClickOnce is deployed it already has the icon, however you can edit the setup.exe icon AFTER deployment quite easily. If anyone else knows of a way to do it before then they can trump my answer.

In Visual Studio go to File > Open > File and browse to the setup.exe for your ClickOnce deployment. Open this file.

You should see a folder tree. Right click on the Icon node and choose Add Resource.

It should already have the Icon resource type chosen on the left so click Import on the right to add your icon.

Your icon will open up in Visual Studio, just close this tab. You should be back to your folder tree. Look under the Icon node and make sure your icon has the lowest ID number.

Save the file.

Your setup.exe will now have the new icon.

Disclaimer: For me Windows was weird and didn‘t refresh the icon right away. If I went to its properties or copied the file elsewhere I could see the icon immediately. I imagine it‘s a caching thing.

Edit: Screenshot:

技术分享

from:http://stackoverflow.com/questions/35019832/how-to-change-setup-exe-icon-when-publishing-through-clickonce

【转】vs2012 打包安装更改 setup.exe的图标

标签:

原文地址:http://www.cnblogs.com/xuan52rock/p/5752681.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!