使用Visual Studio 2017发布至Azure网站时卡顿求助
Troubleshooting Visual Studio 2017 Azure Deployment Freeze
Hey there, sorry to hear you're stuck with this deployment freeze issue—let's walk through some practical troubleshooting steps to get to the bottom of it:
1. Enable Detailed Logs to Pinpoint Where It's Hanging
First, let's get clear visibility into exactly which step is causing the freeze:
- Open Visual Studio, navigate to Tools > Options > Projects and Solutions > Build and Run
- Set MSBuild project build output verbosity to Detailed or Diagnostic
- Try publishing again, then check the Output window. The last logged action will tell you if it's stuck during package creation, file upload, or Azure-side processing.
2. Clean Up Project and Reset Publish Settings
Cached files or misconfigured profiles often cause unexpected hangs:
- Run Build > Clean Solution to wipe old build artifacts
- Right-click your project, select Publish, and double-check you're targeting the correct Azure App Service (verify subscription, resource group, and app name)
- If you’ve tweaked publish settings recently, delete the existing profile and create a new one using the "Get Publish Profile" option from the Azure Portal.
3. Rule Out Network Connectivity Issues
VS needs a stable connection to Azure to finish deployment:
- Test if you can access the Azure Portal normally and manage your App Service (e.g., restart it, view logs)
- Disable any VPNs, proxies, or firewall rules that might block traffic between VS and Azure's deployment endpoints
- If on a corporate network, check with your IT team to ensure outbound connections to Azure services are allowed.
4. Repair or Update Visual Studio 2017
Outdated or corrupted VS components are a common culprit:
- Install the latest updates for VS 2017 via Help > Check for Updates—Microsoft regularly patches deployment-related bugs
- If updates don’t help, run a repair: Open Control Panel > Programs and Features, find Visual Studio 2017, click Change, then select Repair to fix damaged files or extensions.
5. Try Manual Deployment to Isolate the Problem
Bypass VS to see if the issue is with the deployment package or VS's tooling:
- Right-click your project, choose Publish > Web Deploy Package to generate a
.zipdeployment package - Log into the Azure Portal, go to your App Service's Deployment Center > FTP/FTPS > Upload and upload the zip file
- If manual deployment works, reset VS settings via Tools > Import and Export Settings > Reset all settings to fix tooling-related glitches.
6. Check Azure App Service Health
Sometimes the freeze originates on Azure's side:
- In the Azure Portal, check your App Service's Overview tab for high CPU/memory usage—overloaded resources can slow deployments
- View the Log Stream under Monitoring to spot any errors logged during deployment attempts
- Restart the App Service via Overview > Restart before trying another publish.
内容的提问来源于stack exchange,提问作者Oleg Sh
相关产品推荐
相关产品推荐

