使用msbuild为ClickOnce应用程序生成Setup.exe

使用msbuild为ClickOnce应用程序生成Setup.exe,msbuild,clickonce,publish,setup.exe,Msbuild,Clickonce,Publish,Setup.exe,使用命令通过msbuild发布ClickOnce应用程序 msbuild /t:publish /p:BootstrapperEnabled=true;PublishDir=C:\publish\;PublishUrl=C:\publish 抛出错误: 错误MSB3484:找不到签名目标“bin\Debug\app.publish\setup.exe” 不会生成setup.exe,而通过Visual Studio IDE发布会将setup.exe生成到指定文件夹 通过网络查找并找到以下解决方

使用命令通过
msbuild
发布ClickOnce应用程序

msbuild /t:publish /p:BootstrapperEnabled=true;PublishDir=C:\publish\;PublishUrl=C:\publish 
抛出错误:

错误MSB3484:找不到签名目标“bin\Debug\app.publish\setup.exe”

不会生成setup.exe,而通过Visual Studio IDE发布会将setup.exe生成到指定文件夹

通过网络查找并找到以下解决方案

  • 要启用
    bootstrapperanable=true
  • PublishDir
    /
    PublishUrl
  • 而上述解决方案对我来说并不适用。如有任何建议,将不胜感激。

    以下命令有效:

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

    不必指定InstallationFolder,因为ClickOnce会占用用户将setup.exe安装为InstallFolder的文件夹路径,并在那里查找更新