I have Windows application in csproj in my solution, and I want generate Publish using command line (bat, cmd).
My script is (I put \\r\\n for better re
Take a look at this Stack Overflow question. Basically the PublishUrl property is ignored when running ClickOnce from the command line. But you can easily add the behaviour with an additional MSBuild-task.
I've created an additional MSBuild-File, for example a build.csproj. This contains a publish-task. This task first invokes the regular MS-Build of the target-project. Afterwards it copies the result to the publish-directory. Now I invoke the 'build.csproj' instead of the reguar project-file from the command-line:
MyExampleProject
Configuration=Release
.\bin\Release\app.publish
\\TargetServer\deployments