Okay, so here is the deal, i initially set my icon when i first created my project. However i have since changed it the application properties, and in the form properties as always, however when i build the application and move the exe from the bin folder to my desktop, it changes to the previous icon. If i leave it in the bin folder and create a shortcut, the shortcut reverts to the old icon as well. Im wondering what exactly might be causing this. I have also removed the old icon from the references to no avail. If anybody knows what this issue might be i would really appreciate a some advise.
-
Does it change to default icon or the icon that you set before? – Ali Sepehri.Kh Sep 28 '14 at 05:42
-
It changes to the first icon i had set previously, not the new one that i set afterwards. – user3691826 Sep 28 '14 at 05:46
-
I'm not sure, but *.ico file can contain different icons in different sizes. You can open your *.ico file with IcoFX to be sure there is same icons in all sizes. – Ali Sepehri.Kh Sep 28 '14 at 05:52
-
Did you try another icon? – Ali Sepehri.Kh Sep 28 '14 at 05:57
-
I did, and ive even previously opened it with resource hacker before you mentioned anything and the exe doesnt contain the icon that it keeps switching too so i have no idea. – user3691826 Sep 28 '14 at 06:40
3 Answers
So here's the trick:
- Go to C:\Users\AppData\Local\
- Delete IconCache.db
- Kill explorer.exe from task manager
- Again start explorer.exe
It will work, you will see your new icon when you copy/move next time.

- 11
- 1
I'm not sure, but if you had copied the exe file with previous icon to your desktop before, maybe windows has cached your icon. To test this copy your exe file to another loacation or reset your system.

- 2,468
- 2
- 18
- 27
Hi friend I have the same problem but finally I solved it.
What you have to do is return the icon that windows puts you by default and delete the .ico reference of your project. Once you did that, you rebuild the solution both in the project and in the solution, and save it.
Then you open the .exe and copy it to the desktop, and you make sure that the icon that was by default has returned.
Then you return to the project and put the new icon and rebuild the solution and the project, and save it.

- 1