Generate Setup.exe for ClickOnce application using msbuild

620 views Asked by At

Publishing the ClickOnce application via msbuild using command

msbuild /t:publish /p:BootstrapperEnabled=true;PublishDir=C:\publish\;PublishUrl=C:\publish 

Throws the error:

error MSB3484: Signing target 'bin\Debug\app.publish\setup.exe' could not be found.

No setup.exe is generated, whereas publishing via Visual Studio IDE generates the setup.exe to the specified folder.

Have looked over the net and found the below solutions

  1. To enable BootstrapperEnable = true,
  2. To specify \ at the end of PublishDir/PublishUrl

And the above solutions don't work for me. Any suggestions would be highly appreciated.

1

There are 1 answers

0
user7386331 On

Below command worked:

msbuild /t:publish /p:PublishDir=C:\publish\ /p:ApplicationVersion=1.0.1.1

Din't have to specify the InstallationFolder, since ClickOnce takes up the folder path from where the user installed the setup.exe as the InstallFolder and looks there for updates.