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:
right click the setup project.
Select View -> File System.
Display properties for the shortcut for your application (typically under Users Program Menu).
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.
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.