ClickOnce: Revisited

Recently we’ve received a couple comments on my blog post ClickOnce Publish and Deploy from Team Foundation Server 2010 so I thought we should do a follow-up post to share what we’ve learned.

One of our readers, Anye, was having some trouble getting the build to copy the published ClickOnce application over into the ClickOnce drop location.

After working with Anye by email to verify some settings and review the build logs, Anye wrote back saying that it looked like the problem was caused by a space in the name of his team project collection. That was making the xcopy from the sources folder to the ClickOnce drop folder fail. I suggested that the xcopy arguments property could be modified in the build template to handle the space instead having to change the name of the project. But Anye came up with another workaround.

Instead of using the xcopy activity (Copy Published Folder), Anye got it working by using a CopyDirectory activity instead. For some reason, the build wasn’t picking up the platformConfiguration.Configuration and it was compiling to the “obj” directory instead of the “bin” directory. By using CopyDirectory, Anye’s workflow ended up looking like this:

clickonce_revisited_1

Instead of using xcopy like this:

clickonce_revisited_2

I thought this was a cool workaround and thought it worth sharing.

Although we can’t always promise a response to comments or issues you may be having with our tips and tricks, especially in a complicated area like automated build scripts, it is great hearing from you and hopefully you’re benefiting from what we’ve learned along the way.

Happy coding!

author avatar
Brian Gansemer

Related posts