简体   繁体   中英

Application taskbar icon set wrong when in a specific path - where is this set?

I'm working on an application (C#/WPF) and when it is installed in the Program Files folder and run the icon on the taskbar shows up wrongly as this;

在此处输入图片说明

But if I rename or copy into another folder the correct icon appears when run. It seems like an icon is set for this file in this path. I've had a look through the registry but with no luck and also cleared the icon cache.

Any ideas?

That is a symptom of the icon being cached and the cache not being refreshed. Normally a restart fixes the problem.

I had the same problem, and fixed it through the setup project.

In Visual Studio:

  1. right click the setup project.

  2. Select View -> File System.

  3. Display properties for the shortcut for your application (typically under Users Program Menu).

  4. The Shortcut will have a property call Icon. Set that to the EXE of your application, or set it to an icon in your setup package.

  5. Build the setup project, and then re-install.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM