ClickOnce publish with IDE works normal.
When trying to publish via MSBuild command line
%MSBUILD% /target:publish /p:Configuration=Release;PublishDir="REMOTE_FOLDER"
only Project.exe
and Setup.exe
copies.
When try to %MSBUILD% /target:publish
command then all necessary files copies to the build\app.publish
folder
How do I publish via command line same ClickOnce settings which IDE uses
PS this question similar but not the same
Some features are done by Visual-Studio and not by the MSBuild command line. So the click-once-deployment behaves differently when it's executed from the command-line.
If you want to publish via command line same ClickOnce settings which IDE uses, you can use a custom target to achieve it. Edit your
project(csproj)
file (right click project node -> unload project -> edit xxx.csproj) and add the following code in it:Then you can build the project with the MSBuild command line:
After execute the build command, all the expected files are publish via command line same ClickOnce settings which IDE uses.
Note: You should change the value of
ProjLocation
to the path of your project.