还是老外的文章给力

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的图标的更多相关文章

  1. vs2010 setup 打包 安装 BAT批处理实现自动安装软件功能

    CLS@echo offECHO.ECHO 安装 Diskeeper 7.0.428ECHO 请稍等...start /wait %systemdrive%\install\Applications\ ...

  2. 安装VS时,双击setup.exe后界面一闪而过的问题

    问题:安装VS时,双击setup.exe界面一闪而过的问题 解决: 百度后说需要到"控制面板/添加和管理程序"关闭系统自带的netframework3.x及以上版本. 1.查看所有 ...

  3. windows2008R2下安装sqlserver2008R2时,点setup.exe应用程序无法打开错误代码0xc0150004

    windows2008R2下安装sqlserver2008R2时,点setup.exe应用程序无法打开错误代码0xc0150004 问题截图: 网上查的答案都是需要安装.net framework 3 ...

  4. VS2012打包Winform教程 [转]

    VS2012打包部署Winform程序 打包前的准备工作: 里边会提到第一次使用的时候打开网页填数据什么的..最终要下载一个EXE文件..其实大可不必.. 直接百度InstallShield2012S ...

  5. VS2012打包部署教程

    前言 通常我们只是写一些系统,然后想要运行功能的时候就打开代码点击启动,这样只适用于开发人员或者局部开发人员这样做,软件开发的大多数意义上就是拿出开发的软件让用户放心的去点.用户无需知道代码,无需知道 ...

  6. VS2012 打包部署程序

      一. 下载 InstallShield 2015(支持VS2012) VS2012没有自带打包工具,所以要先下载并安装一个打包工具.我采用微软提供的打包工具:  InstallShield2015 ...

  7. 打包python脚本为exe可执行文件-pyinstaller和cx_freeze示例

    本文介绍使用cx_freeze和pyinstaller打包python脚本为exe文件 cx_freeze的使用实例 需要使用到的文件wxapp.py, read_file.py, setup.py ...

  8. 在InstallShield中发布单一的Setup.exe文件

    原文:在InstallShield中发布单一的Setup.exe文件 InstallShield默认的Release模式下,生成了一个setup.exe文件,一个msi文件,以及一些其它的杂项文件. ...

  9. WEB项目(B/S系统)打包安装(总结篇)

    原文:WEB项目(B/S系统)打包安装(总结篇) 打包安装程序的制作选择性还很多的,有installshield,wise installer,inno setup这几个做打包安装项目都是很强大的,要 ...

随机推荐

  1. 【LeetCode OJ】Pascal's Triangle

    Prolbem Link: http://oj.leetcode.com/problems/pascals-triangle/ Just a nest-for-loop... class Soluti ...

  2. IO 流 定义

    一.什么是流? 流就是字节序列的抽象概念,能被连续读取数据的数据源和能被连续写入数据的接收端就是流,流机制是Java及C++中的一个重要机制,通过流我们可以自由地控制文件.内存.IO设备等数据的流向. ...

  3. Anniversary party_树形DP

    Description There is going to be a party to celebrate the 80-th Anniversary of the Ural State Univer ...

  4. Android Priority Job Queue (Job Manager)(一)

     Android Priority Job Queue (Job Manager)(一) 一.为什么要引入Android Priority Job Queue (Job Manager)?如今的A ...

  5. Find Minimum in Rotated Sorted Array II

    Follow up for "Find Minimum in Rotated Sorted Array":What if duplicates are allowed? Would ...

  6. 世纪互联运营的Microsoft Azure正式支持FreeBSD虚拟机镜像

    自2012年开始,微软云计算与企业事业部和Citrix思杰,NetApp达成合作,共同开发出第一版针对Hyper-V虚拟设备驱动以及相关的用户态程序,并将此称之为集成服务(Integration Se ...

  7. 如何写 github wiki

    在你库里面的文件夹下 点击wiki进入编辑页面 如何编辑: header以#开始, #代表一级header, ##代表二级header... 段落直接以空行分隔. 每行后面加两个以上的空格 分条列举的 ...

  8. EasyUI DateBox 按钮自定义添加功能

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  9. C# Form 非法字符

    头部加上 EnableEventValidation="false" ValidateRequest="false"

  10. FHS目录配置下,常见的几个问题及解答

    请说明/bin与/usr/bin目录所放置的执行文件有何不同之处? /bin主要放置在开机时,以及进入单人维护模式后还能够被使用的指令,至于/usr/bin则是大部分软件提供的指令放置处. 请说明/b ...