Oct 16, 2009

Click Once Deployment Issues

I solved a couple of Click Once deployment issues today and I thought I would write them up (if for no other reason than allowing me to find the answer a month from now when I forget how I solved the problems).

Problem 1 Solved

I have a password system in the latest application and it requires some hash files I created for verification. Those files were not deploying with the application. This was actually more than a Click Once issue as these files weren’t going to the Debug or Release folders either. The solution is to select the file in the Solution Explorer, go over to the properties window and change the Build Action setting to Content as shown below. Once that is done the file will also show up in the Application Files window when you publish.
image

Problem 2 Solved

My final application when published would just quit and offer to send a report to Microsoft. I guess it wanted to tattle on me. In the past when I’ve had this problem it was because some .dll that was in my GAC wasn’t on the target machine. In this case since I could copy my Release folder over to a target machine and it would work. This lead me to believe it must have been a local file that wasn’t copying. I just needed to compare the contents of my release folder to the folder being deployed by Click Once. One problem, where the heck was Click Once putting those files. The shortcut it creates on the target machine seems to use magic because most shortcuts have an “Open File Location” or “Find Target”  button but not this one. Eventually I found the files in the very intuitive location:
C:\Documents and Settings\<username>\Local Settings\Apps\2.0\8J8H<this changes every time>ZKRB.D1N\DOELO5ZW.0YE\knc3..tion_001497967ca389b3_0001.0000_692aad86ab1f1169
All the gobbledygook after 2.0 is irrelevant because it will change all the time but you should be able to find your files starting below the \2.0 directory. By the way this is a .NET 3.5 application so I’m not sure what the 2.0 signifies, probably just to assure your customer that this isn’t a buggy 1.0 release.

Problem 3 Solved

In this case it turned out it was a .dll I wrote that had somehow gotten its publish status set to Exclude. At first I was perplexed that the file wasn’t in my Application Files list, then I remembered the “Show All Files” checkbox. It turns out that somehow my .dll had been set to Exclude in the publish status columns, someone must have been feeding the gremlins after midnight again.
image

About Me

My photo
Tod Gentille (@todgentille) is now a Curriculum Director for Pluralsight. He's been programming professionally since well before you were born and was a software consultant for most of his career. He's also a father, husband, drummer, and windsurfer. He wants to be a guitar player but he just hasn't got the chops for it.