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
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With