Creating a Start Menu icon for OOB application

General discussion

When you create an OOB application, you get the ClickOnce application reference shortcut on the Start Menu, which is just a plain "empty window" icon which looks pretty ugly and doesn't match the icon you get for your application on the taskbar when you
start it.

To set my own icon, I did the following:

Create a 16x16 .ico file and copy it to the root folder of your LightSwitch project (i.e. the same folder that has the Client/Common/Server folders in it)
In this same folder, open the *.lsproj file in a text editor
Add this tag somewhere within the XML:

All replies

Elyl, your blood's worth bottlin'! As an Aussie, you'll know what that means already, but for those who aren't familiar with the expression, it just means he's "fantastic".

I have been lamenting the inability to have an icon for LS applications that get pinned to the taskbar (also the start menu, but that's just a bonus for me), for a very long time now (I have 5 LS applications pinned to my taskbar, & I've had to right-click
each one to see which was the one that I wanted to run).

I was hoping that it would be "fixed" in LS V2, but I didn't think to look when I was playing with it - actually, maybe I couldn't because I had publishing problems), so I don't know if it has been, or not. Silverlight has always had the ability to do this
(at least v4+), but I couldn't understand why the team didn't implement it for LS.

I can't tell you how happy I am to be now looking at 5 individual icons on my taksbar, that actually represent each application in a meaningful way, instead of 5 blank-looking-all-the-same icons I've been dealing with up until now.

And I've verified that this wasn't fixed in V2, but your technique works there too. It would be SO easy for the team to implement your solution automatically, but for now I'm happy (no, make that ecstatic, lol) to be able to just do it manually..

Quite a while back, I found the Silverlight method of doing it, but LS kept overwriting the entries that had been added to whichever XML file it was (don't recall the name of it right now).

You method survives publishing, & it was cool to see the icons actually change in front of my eyes, in both the update window & in the task bar, as the application was updating itself. No restarts of anything required!

Did you try setting the Logo image and Application icon from the project's properties? That's all I did, and I got the icon in the start menu and on the taskbar. Can't remember which of the two did it, as I usually set them both to the same png file, but
it always works for me.

Yes, I've got both of those set on my projects, but only get the icon on the Taskbar, and the generic ClickOnce/vslshost "blank window" icon on the Start Menu. My method is the only way I've been able to get the icon on the Start Menu.

Yes, I experienced the same thing. I tried doing that AGES ago. The only thing those settings change is the icon for when the application is RUNNING. The start menu icon isn't changed, & neither is the icon that gets pinned to the task bar.

I don't know about web applications, but thise settings DO NOT work for OOB applications.

Well, don't know what I've done differently, but as you can see from the snap of my desktop below, I have two OOB applications pinned to my task bar. Neither was running when I snapped this.

All I did in both of these cases was set the application icon and the logo image to the same .ico file. Both use the icon in the taskbar and on the start menu.

So, I wouldn't go so far as to say categorically that they don't work for OOBs, there's obviously something more to the story than this. I would be interested to know what it is though. It's obviously not working for either of you two, but it works fine
for me.

I'm on Win7 Pro 64 bit if it makes any difference. I would be interested to know what OS you two are using.

Hmm, that's odd. I wonder why it works fine for me, and not for you two. I would be interested to hear from others if it works for them. I'm not sure if I'm the lucky minority, or you're the unlucky minority!

I'm running Windows 7 and currently Visual Studio 2012 and also have the generic Start Menu icon for OOB applications. Using ElyIV's approach of placing the application icon file in the projects root directory and adding the ApplicationIcon section
to the project file replaced the application's generic Start Menu icon with the icon file saved to the root directory. As an added note, I used a 32 x 32 .ico file and it worked with a deployed application; no reinstall required.