32

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?

p.campbell
  • 98,673
  • 67
  • 256
  • 322
Zi Ming
  • 389
  • 4
  • 9
  • 15
  • Ah, @Kirk Broadhurst, I agree it was necessary but your edit took the fun out of this question. – nnnnnn Aug 31 '11 at 03:52

3 Answers3

33

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

Zaheer Ahmed
  • 28,160
  • 11
  • 74
  • 110
  • If you are using Forms, you have to set the icon in the form designer instead (for example: frmMain.cs). You can also set the size here too. The Project Properties value was being ignored for me. This isn't the OP's question but rather for Visual Studio 2019. Left this here in case you get suck like I did. – Brainware Aug 20 '20 at 21:58
  • 2
    What is this "Project Designer", because when clicking on Properties, there is no "Application"-tab listed. Or does this solution only apply for VS10 (and not for VS15 or VS19)? – PatrickSteiner Jul 04 '21 at 14:54
3

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.

Community
  • 1
  • 1
si618
  • 16,580
  • 12
  • 67
  • 84
0

Check the project properties. It's configurable there if you are using another .net windows application for example

cnd
  • 32,616
  • 62
  • 183
  • 313