Thursday, April 2, 2009

NAnt/MSBuild ClickOnce publishing ‘publish.htm’

The secret to this is specifying in the properties passed to MSBuild either directly or via NAnt. There are two specific properties you need to get the publish.htm published:

CreateWebPageOnPublish true
WebPage publish.htm

You can specify these as command line parameters as follows:

/property:CreateWebPageOnPublish=true

/property:WebPage=publish.htm

Once you are passing these parameters to MSBUILD it will move your publish.htm up to your publish location. Note, that there are many more properties that you can specify in the same way. Take a look inside of your .csproj file Property/PropertyGroup for a list of the values. You can experiment with the GUI inside of Visual Studio and then see how the values change so you can tweak your MSBuild/NAnt script accordingly.

UPDATE: It turns out I'm wrong on this. The above solution does not auto-generate a publish.htm. More to follow.


Technorati Tags: ,,

1 comment:

  1. try this...

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

    ReplyDelete