I have an open source WPF application hosted on GitHub: https://github.com/tomhunter-gh/SourceLog
What I was hoping to do was add ClickOnce deployment and host the ClickOnce install on AppHarbor so that users are automatically upgraded when I push new commits to GitHub. What I’m looking for is an auto update feature similar to the GitHub Windows client, and I’m also hoping to find somewhere to host the ClickOnce install bits for free.
I have a number of questions:
- How does AppHarbor actually work? As far as I can tell it expects a Visual Studio solution containing a single web application project, which it then builds and “deploys”. What specifically does it look for to run, what assumptions is it making? What happens when you have non web projects, or your solution isn’t in the root directory for example?
- Is there any way to customise the build and deployment process, for example with custom MSBuild scripts?
- How would I ensure the WPF project is “published” so that the ClickOnce bits are generated?
- Is there any way to get a build number from the AppHarbor build process? E.g. a four part assembly version 1.2.3.4 and write that to the generated binaries/config?
- Is there any way for AppHarbor to push the ClickOnce bits back to GitHub after a successful build, so that I could instead host the ClickOnce install on GitHub?
Should I be taking a completely different approach?
It turns out this is entirely possible and the steps are as follows:
AppHarbor
Solution
WPF Project
Set the following additional properties:
Further details are available in my SourceLog blog post, and a full example is demonstrated by the the SourceLog project on GitHub.