views:

1313

answers:

3

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.

+2  A: 

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.

andyhammar
This was the route I was going to take if there wasn't an easy way to gen the thing.
Jeremy E
+2  A: 

I just blogged an answer to the publish.html problem, in the next couple of days I'll blog about the multiple environment issue.

http://wallism.wordpress.com/2009/12/08/clickonce-creating-publish-page-from-msbuild/

Mark
+2  A: 

and this solves the multiple environment issue (well, it is one way of solving the problem)

http://wallism.wordpress.com/2009/12/21/msbuild-and-multiple-environments/

wallismark