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

还是老外的文章给力

 

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:

enter image description here

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值