Is it possible to build a web deploy package containing a clickonce application that can be deployed to a web server using the standard webdeploy tool?
Here would be the ideal process:
- MSBuild "YourFullyQualifiedProjectName.csproj/vbproj" /T:Package
- obj\Debug\Package\YourFullyQualifiedProjectName.deploy.cmd /Y
The reasoning behind this would be so we can build the whole solution including web packages, run all tests, then deploy only after tests pass.
I've currently looked at doing a file-based deploy to a temp folder, copy that into a web project, then package the web project. Is there a neater solution?
I have created a blog for this at http://sedodream.com/2012/02/18/HowToCreateAWebDeployPackageWhenPublishingAClickOnceProject.aspx which has more details, but the relevant pieces are below
If you have a client project which you want to create a ClickOnce package out of then you can try the following.
Edit the project file for your client project and add the following at the bottom (right above the
</Project>
tag).In the PropertyGroup I am:
After that the CreateWebDeployPackage is defined which will get executed after the PublishOnly target (because of AfterTargets="PublishOnly"). That target will make a call to msdeploy.exe to create the package in the output directory. You should be able to take that package and publish it as you would any other package.
Can you try it and let me know if it works for you?