Reputation: 2041
Please note that I am asking about the DESKTOP icon, not the window icon. The icon shows up on the app window. This is fine. But when I run setup to install the application, the desktop shortcut has only a default icon. How do I associate the desktop icon with the same application icon? When the application runs, the icon on the taskbar is the correct icon. I've also set the ico file as Resource and as Embedded Resources. Neither works. Thanks.
I've done this:
<Window x:Class="..."
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
**Icon="YourIcon.ico"**>
and this:
In my visual studio 2010 : Project -> 'ApplicationName' Properties -> Tab Application -> Icon and Manifest. There you specify your icon
and this:
verify that you have an entry like this in your project file (the .csproj or .vbproj):
<PropertyGroup>
<ApplicationIcon>Resources\MyAppIcon.ico</ApplicationIcon> ...
</PropertyGroup> ... <ItemGroup> <Resource
Include="Resources\MyAppIcon.ico" /> ... </ItemGroup>
Upvotes: 3
Views: 12439
Reputation: 17272
I assume you are using the Visual Studio Setup Project to create your installer.
Go to View->Editor->File System->User's Desktop->[the shortcut]->Properties->Icon
There you can configure the icon. I also always make sure the icon file is copied into the installation folder as a stand-alone file (though I don't think that is strictly necessary).
Upvotes: 9