You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

能否在VSTS发布中仅通过Web Publish结合.publishsettings文件配置?

Yes, You Can Use Web Publish (Web Deploy) for VSTS/Azure DevOps Deployments Without Deployment Groups

Absolutely! Deployment groups are only necessary for agent-based deployments (where you install agents on target machines), but your scenario is a perfect fit for Web Deploy (MSDeploy)—it works entirely over HTTP/HTTPS, no agent or PowerShell access required on the shared host. Since you already have a .publishsettings file from Visual Studio, you can reuse those credentials directly in Azure DevOps to set up your release pipeline.

Here’s how to configure it step by step:

  • Create a new release pipeline
    Start with an empty job (or pick the "Web App" template if it matches your app type, but an empty job gives you more flexibility for shared hosting setups).

  • Add the Web Deploy task
    Search the Azure DevOps task marketplace for Web Deploy (sometimes labeled as MSDeploy) and add it to your release stage. Configure these key settings:

    • Package or folder: Point to your built web package (e.g., $(System.DefaultWorkingDirectory)/**/*.zip—this pulls the output from your existing build pipeline).
    • Publish method: Select Web Deploy.
    • Service connection: Click "New" and choose the Web Deploy service connection type. Extract the required details from your .publishsettings XML file:
      • Server URL (look for the publishUrl value)
      • Site name (find msdeploySite)
      • Username (userName)
      • Password (userPWD)
    • Optional extras: Enable Remove additional files at destination to fully sync your app state, or Take app offline to avoid user-facing errors during deployment.
  • Skip deployment group setup entirely
    You don’t need to touch any deployment group configurations here—Web Deploy communicates directly with your shared host’s Web Deploy service, so no agent installation or PowerShell access on the target machine is needed.

  • Test your pipeline
    Save the pipeline and trigger a manual release. Check the task logs for any errors; if you run into issues, double-check that your .publishsettings credentials have deployment permissions (most shared hosts provide dedicated deploy accounts) and that the host’s Web Deploy service is enabled.

A quick sanity check: Since you can publish manually from Visual Studio with the same .publishsettings, this Azure DevOps setup will mirror that exact workflow—so if your local publish works, the pipeline should too.

内容的提问来源于stack exchange,提问作者mqueirozcorreia

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 07:07:13