Search code examples
msbuildclickoncepublishing

Publish ClickOnce app with MSBuild


I need a way to use MSBuild to publish a ClickOnce App to multiple PublishDir(s). I have four environment (dev, qa, model, prod) and need to generate seperate ClickOnce PublishDir(s) for each because the config files are different. One of the main issues is that MSBuild doesn't create a publish.htm file. Any help would be appreciated.


Solution

  • How about, as a one-time thing, manually creating the publish.htm files in the four locations?

    At my company, we don't use the publish.htm file at all. But we do have different environments, so we let the build-script change app name, update location, server uri etc pre-build and the build it with target Publish. The output files are thereafter copied to the location of the environment in question.

    We are a bit old and are doing this mostly in a cmd file, but I'm sure you could have 4 different msbuild targets that does the same job.