1
votes

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 have 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! :)

2
Have you tried installing it on a different machine or on a VM?wheaties
Have you checked that all of the sizes inside the .ico file are the same image? An .ico file contains multiple sizes, but each are independent, meaning the 16x16 can look completely different from the 32x32.Joel Lucsy
@wheaties: Thanks for the idea. I just tried it on a pretty new laptop and the icon shows up correctly. I guess I'll try to restart my computer, as stupid as that sounds. @JoeL: how do I check that? I created the .ico in Photoshop with a plugin. I dont see any other images either with VS or with PS.Blub

2 Answers

6
votes

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

0
votes

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.