Since the Web Platform Installer (WebPI) was retired on December 31, 2022, Microsoft recommends downloading Web Deploy directly from their official download center. Here's the current procedure:
1. Download the latest Web Deploy from Microsoft: https://www.microsoft.com/en-us/download/details.aspx?id=43717 2. Choose between: - WebDeploy_amd64_en-US.msi (for 64-bit systems) - WebDeploy_x86_en-US.msi (for 32-bit systems) 3. Run the installer with elevated privileges
If you encounter the "newer version already installed" error, follow these steps to clean up existing installations:
# PowerShell command to list installed Web Deploy components Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -like "*Web Deploy*" } | Select-Object Name, Version # Manual cleanup steps: 1. Go to Control Panel > Programs and Features 2. Sort by Name and look for "Microsoft Web Deploy" 3. Uninstall all versions 4. Delete remaining files in C:\Program Files\IIS\Microsoft Web Deploy* 5. Reboot before fresh installation
After successful installation, configure Web Management Service (WMSVC) for remote deployments:
# Enable required Windows features (Admin CMD): dism /online /enable-feature /featurename:IIS-WebServerRole dism /online /enable-feature /featurename:IIS-WebServerManagementTools dism /online /enable-feature /featurename:IIS-ManagementService # Configure WMSVC (registry): reg add HKLM\SOFTWARE\Microsoft\WebManagement\Server /v EnableRemoteManagement /t REG_DWORD /d 1 /f # Start and configure the service: net start wmsvc sc config wmsvc start= auto
For automated deployments or CI/CD pipelines, consider these approaches:
# Chocolatey package (community maintained): choco install webdeploy # Silent installation parameters: msiexec /i WebDeploy_x64_en-US.msi /quiet ADDLOCAL=ALL # Using Winget (Windows Package Manager): winget install Microsoft.WebDeploy
Validate your Web Deploy installation with these commands:
# Check installed version: msdeploy.exe -version # Test basic functionality: msdeploy.exe -verb:dump -source:appHostConfig="Default Web Site" -xml # Sample publish profile for Visual Studio (.pubxml): <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <WebPublishMethod>MSDeploy</WebPublishMethod> <PublishProvider>AzureVM</PublishProvider> <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> <LastUsedPlatform>Any CPU</LastUsedPlatform> <SiteUrlToLaunchAfterPublish>http://yourserver</SiteUrlToLaunchAfterPublish> <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish> <ExcludeApp_Data>False</ExcludeApp_Data> <MSDeployServiceURL>yourserver</MSDeployServiceURL> <DeployIisAppPath>Default Web Site/YourApp</DeployIisAppPath> <RemoteSitePhysicalPath /> <SkipExtraFilesOnServer>False</SkipExtraFilesOnServer> <MSDeployPublishMethod>WMSVC</MSDeployPublishMethod> <EnableMSDeployBackup>True</EnableMSDeployBackup> <UserName>yourusername</UserName> <_SavePWD>True</_SavePWD> </PropertyGroup> </Project>
With Microsoft retiring the Web Platform Installer (December 31, 2022), many developers face challenges installing Web Deploy (Web Deployment Tool) on modern Windows Server environments. The traditional msdeploy.exe
installation path is now obsolete, and the standalone MSI installer presents version conflict issues as you've experienced.
Here are the current supported approaches for Web Deploy installation:
# PowerShell command to list available Web Deploy versions
Find-Package -Name "WebDeploy" -ProviderName "NuGet" -AllVersions |
Sort-Object Version -Descending |
Format-Table -AutoSize
Download the latest Web Deploy package directly:
- Visit: https://www.microsoft.com/en-us/download/details.aspx?id=43717
- Download WebDeploy_amd64_en-US.msi (version 4.0 as of 2023)
- Run with administrative privileges
For automated installations:
choco install webdeploy -y --version=4.0.2022.621
If you encounter the "newer version already installed" error:
# PowerShell command to completely remove existing Web Deploy
Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -like "*Web Deploy*"} |
ForEach-Object { $_.Uninstall() }
Confirm successful installation:
msdeploy -verb:getDependencies -source:webServer
Check IIS Manager for the "Management Service Delegation" icon to appear.
If Web Deploy service fails to start:
# Check service status
Get-Service WMSVC
# Repair registry permissions if needed
icacls "HKLM\SOFTWARE\Microsoft\IIS Extensions\MSDeploy" /grant "NT SERVICE\WMSVC":(F)
In %WinDir%\Microsoft.NET\Framework64\v4.0.30319\Config\web.config
:
<system.webServer>
<management>
<authorization>
<allow users="*" />
</authorization>
</management>
</system.webServer>