Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSBuild is not generating publish web page (ClickOnce)

I am facing a problem that when I publish my ClickOnce application through MSBuild (4.0), the publish.htm (or default.htm) isn't created in the app.publish folder.

When publishing through Visual Studio, it gets crated...

In my .csproj file I have the following properties set, and it still not working...

<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>default.htm</WebPage>

Any ideas?

Thanks

like image 940
Andrey Avatar asked Sep 25 '13 17:09

Andrey


People also ask

How do I publish my ClickOnce website?

To specify a custom Web page for a ClickOnce applicationClick Deployment. In the Publish Options dialog box, make sure that the Open deployment web page after publish check box is selected (it should be selected by default). In the Deployment web page box, enter the name for your Web page, and then click OK.

How do I publish my website with MSBuild?

Command to build a solution using MsBuild.exe In the above command we build the whole solution now to publish specific web project we have to use "PublishProfile" parameter, to use publish profile parameter you have to create publish profile first then pass the profile name in this parameter.

How do I publish a ClickOnce application using the Publish Wizard?

In Solution Explorer, right-click the application project and click Properties. The Project Designer appears. Click the Publish tab to open the Publish page in the Project Designer, and click the Publish Wizard button.

What is publish profile in MSBuild?

A publish profile is just an MSBuild file. When you pass in PublishProfile and DeployOnBuild=true, then the publish profile is Imported into the build/publish process. It will supply the publish properties needed to perform the publish.


1 Answers

I'm using Visual Studio 2015, but otherwise had what sounds like the same or similar issue. The solution was to open the Properties of the Project file in Visual Studio > Go to the "Publish" settings, and in the right pane, click Options.... This will open up the "Publish Options" dialog. Select "Deployment" and if you see the "Deployment web page" is empty (mine was) then enter "publish.htm". You should then be able to check "Automatically generate deployment web page after every publish" (you need to check this). Click OK to close the dialog and then republish. Your "publish.htm" file should now appear.

like image 51
Brian Cryer Avatar answered Sep 22 '22 23:09

Brian Cryer