views:

29

answers:

1

I have a clickonce application that I would like to have the ApplicationName.application file have an icon for the application. Currently the ApplicaitonName.applicaiton file has the default window with blue top and green arrow standard icon.

I have an application icon under the application setup, resources, icon and manifest. That application icon is set to content (i have also tried with it set to embedded resource). That application icon shows up as the window icon and toolbar icon for the application when it is running.

Under publish I publish to a UNC Path and have the "The applicaiton is available online only" radio button clicked. Under Application Files the Resources\ApplicationIcon.ico is Publish Status: Include (Auto), Download Group: (Required), Hash: Include (if the icon is embedded resource it is not in the Application Files).

I generally open the UNC Path and create a shortcut to the .application file to run the application then. I just want that .application file to have the same icon as the windows and toolbar, but not sure what else i need to do to accomplish that. Any help is much appreciated.

A: 

The .application file is the deployment manifest. I don't think you can add an icon in that file. Why should it matter to have the default window icon as it is not seen by the client if hosted in IIS.
On the other hand you can definitely add an icon to the appplication manifest (the .manifest file) and this icon is what shown on the start menu and in the application. The .manifest file should look like

<asmv1:assembly .. />
  <description asmv2:iconFile="custom.ico" xmlns="urn:schemas-microsoft-com:asm.v1" />
 ...  

In my msbuild script I use the GenerateApplicationManifest task to set the IconFile

Pratik
the application is deployed via a UNC path, so no IIS, and no start menu either. the current setup does have the icon for the application, but not for the .application file on the UNC path (or shortcuts made to that file) which are what people actually click on to start the file up ... would your suggestion work for that?
ChrisHDog
I don't think so. If you are able to create a website in IIS to host your application then this will work, but with UNC patch I don't know. You can always try.
Pratik
with the settings i have that line is already in the .manifest file, and doesn't make the .application file icon ... shame, there must be a way to do this though.
ChrisHDog