Search code examples
c#winformsiconstaskmanager

How to specify icon for Win10+ Task Manager / Apps tab


I am unable to specify icon for Win10+ Task Manager / Apps tab / main item.
Created a new WinForms app (.net framework 4.x / VS2019).

Specified Form icon in GUI Designer --> this appears in the Task Manager / Apps / sub-item. Also in the Form title bar - Fine.

Specified App icon in VS/Project settings --> this appears in the Windows Explorer (.exe icon) list, also in file Properties window. - Fine.

So all fine, except Task Manager / Apps tab / main item --> still uses some default icon, which I don't know how to change?

Adding a picture for the sake of clarity:

enter image description here

I checked all relevant SO / other resources, no success (or does not work/apply to this)


Solution

  • So it looks like Explorer caches icons (in C:\Users\<USER>\AppData\Local\Microsoft\Windows\Explorer\*.db). If I kill explorer + taskmgr + all other which locks these files, then delete these files, then restart explorer, the proper icon will appear in taskmgr too.
    Maybe Windows restart could be enough, I have not tried that.
    The answer: Task Manager / Apps tab / main item -> the App Project settings / icon what appears there.