If you have an automated build and deployment process using MSBuild, then you likely use the GenerateApplicationManifest and GenerateDeploymentManifest tasks to create the ClickOnce application and deployment manifest, respectively. If you are using these tasks, you may have wondered how you can set an icon (under the start menu) for your application. To have an icon set, you have to do several things:
1) Package the icon with the deployment. The easiest way to do this is to add an icon file to your main project--that ensure that it gets deployed with the application.
2) After you add the icon file, right click on the file in Visual Studio, and set the Build Action to Content.
3) At deployment time, set the IconFile attribute on GenerateApplicationManifest to the icon file name (e.g., myapp.ico), you added in step (1).
The above will add an iconFile attribute to the assembly description element, e.g., <description iconFile="myapp.ico" />, in the application manifest file (e.g., myapp.exe.manifest). When ClickOnce sees this attribute set, it will look in the ClickOnce deployment for the file and create a Start Menu Icon for your application.
An interesting thing to note is that the iconFile attribute is set in the application manifest and not in the deployment manifest. The reason for this is to allow you to change your application icons from one deployment to the next.
If you are deploying your ClickOnce application using Visual Studio and need to set the Start Mneu icon, do steps (1) and (2), and then go to the Project | Properties and choose the Application tab. Under the Resources group box, set the application icon to the icon you added in step (1). ClickOnce should take care of the rest. You can find out more on this at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=170920&SiteID=1 .