Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change the icon of the exe file generated from Visual Studio 2010

I am currently creating an application in Visual Studio 2010. After building the project to generate the output of my application, I find that the .exe is built with the default icon.

Is there any way to change or use my own picture as the icon for the .exe file generated by Visual Studio 2010?

like image 712
Zi Ming Avatar asked Aug 31 '11 03:08

Zi Ming


People also ask

How do I change the icon for an EXE file?

In the Resource Hacker window, select the “Icon” folder in the left pane. Click the “Action” menu and then select “Replace Icon.” In the Replace Icon window, click the “Open file with new icon” button and browse to the location of the icon you want to use. The source can be an EXE, DLL, RES, or ICO file.


2 Answers

To specify an application icon

  1. In Solution Explorer, choose a project node (not the Solution node).
  2. On the menu bar, choose Project, Properties.
  3. When the Project Designer appears, choose the Application tab.
  4. In the Icon list, choose an icon (.ico) file.

To specify an application icon and add it to your project

  1. In Solution Explorer, choose a project node (not the Solution node).
  2. On the menu bar, choose Project, Properties.
  3. When the Project Designer appears, choose the Application tab.
  4. Near the Icon list, choose the button, and then browse to the location of the icon file that you want.

The icon file is added to your project as a content file.

reference : for details see here

like image 52
Zaheer Ahmed Avatar answered Sep 20 '22 18:09

Zaheer Ahmed


I found it easier to edit the project file directly e.g. YourApp.csproj.

You can do this by modifying ApplicationIcon property element:

<ApplicationIcon>..\Path\To\Application.ico</ApplicationIcon> 

Also, if you create an MSI installer for your application e.g. using WiX, you can use the same icon again for display in Add/Remove Programs. See tip 5 here.

like image 23
si618 Avatar answered Sep 19 '22 18:09

si618