Category Archives: dotNET

After three years, I discover how to choose a ClickOnce Icon in MageUI

This is completely insane. Someone from Romania emailed me about selecting an icon file for a ClickOnce deployment so that the application icon is used for the installation and for the shortcut.

He had tried my hack that I have blogged about, written about in CoDe Magazine and shown in conference presentations. The hack requires manual editing of the manifest file and I learned it in the forums.

I had never been able to discover any other way to do it.

There is a new version of the MAGEUI tool, the UI for building ClickOnce manifests, so I went in to see if there was anything different with respect to that.

On the file page, things looked the same as always:

So I was staring at it and looking at the file type column and wishing I could use it. But it’s always appeared to be disabled. While I was staring and thinking, I was clicking on that and on the second click, a drop down list appeared.

And when I clicked the arrow, there it was!

Understand, that in a normal UI property sheet like this, the arrow would be visible when you first click the cell.

So I went back to the previous version of MAGEUI and after two clicks, no dropdown. But guess what, one more click and there it was!

All this time? All of the blog posts I wrote, the article in CoDe Magazine. Nobody every emailed me to tell me “oh, here’s how”. You’d think…  Clearly it’s not THAT obvious! Oh well.

I haven’t ever seen this documented (though I sure wish there was a copy of Brian Noyes ClickOnce book nearby to see if he knew).

Well, there you have it.

My Dumb WCF Lesson for the day

I was moving some code around and had a nice WCF Service Interface and Service Class created. So I copied them into a new project where I was re-creating my work.

When I tried to debug (self-host) the service, just to test it out with the embedded WCF Test Client.

But I kept getting this error:

“The client was unable to retrieve service metadata. Make sure the service is running and exposing metadata.”

This made no sense. My config file was fine. I even created a new WCF service in the solution, confirmed that it worked properly, then compared the config files line by line.

No problems.

After going around in circles for a while (including getting zero google results for that error message), a thought occurred to me. I copied and pasted the entire contents of the Interface and the service class. I hadn’t changed the namespace!

That was the problem. I fixed the namespace and the service ran in the Test Client just fine.