开发者

Why does the desktop icon differ from the explorer icon?

开发者 https://www.devze.com 2023-01-23 13:30 出处:网络
For some reason, a very old version of my icon keeps showing up when my application is dropped on the desktop. In the windows explorer (in all zooming levels) the icons is correctly the assembly icon.

For some reason, a very old version of my icon keeps showing up when my application is dropped on the desktop. In the windows explorer (in all zooming levels) the icons is correctly the assembly icon. I specified the correct item in both XAML Window.Icon and in the project settings. I h开发者_StackOverflow社区ave deleted the old version of my icon from all folders I can think of, but it still shows up. Also while drag and dropping, the wrong icon is shown. (in the slightly transparent preview window)

I tried cleaning and rebuilding, I tried deleting the obj folder manually... The original, wrong icon was 16x16. I have built the new version as 32x32, because on the desktop 16x16 is too small. According to the msdn docs (http://msdn.microsoft.com/en-us/library/system.windows.window.icon.aspx), each .ico file is supposed to incorporate all smaller sizes anyway. I also checked that I changed the icon for both debug and release configuration.

Thanks for any ideas! :)


Could this be a problem with the IconCache? Try deleting %localappdata%\IconCache.db and restarting Explorer.exe.


Check the Visual Studio properties window for the EXE's project -- you can specify the icon that's written into the EXE at compile time. This is separate from the icon that's assigned to the XAML window at run time.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号