14

I configured releases same way for a couple of our servers but I have issue with one of them (others work perfectly):

[error]Failed to deploy web package to IIS website.

[error]Error: C:\vstsagent\A2_work_tasks\IISWebAppDeploymentOnMachineGroup_1b467810-6725-4b6d-accd-886174c09bba\0.0.20\MSDeploy3.6\msdeploy.exe failed with return code: 2148734720

Unfortunately I can't find anything helpful related to this error Code.

My release configuration:

  1. IIS Web App Deploy (Preview)

  2. Deployment group with one specific staging server (I'm using on-premise agent)

  3. Website name: correct name of my website in IIS

  4. Virtual Application: empty field

  5. Package of Folder: zip chosen from build drop artifacts

  6. Selected "XML variable substitution"

  7. Selected "Remove Additional Files at Destination"

What I've already tried with no luck:

  • manually turn of application

  • delete all files in application folder

  • changing user account to use for the service

Again - same configuration for other servers works fine.

Servers configuration: Windows Server 2012R2 Standard x64

kopieczek.dev
  • 632
  • 5
  • 24
  • Set system.debug variable to true, then queue build and post the detail log here. – starian chen-MSFT Aug 10 '17 at 08:59
  • Thx, starain! Here is detailed log: https://pastebin.com/VZBVHZQh – kopieczek.dev Aug 10 '17 at 09:37
  • 1
    Base on the log, there is the error log file C:\vstsagent\A2\_work\r1\a\error.txt, post it here. If the file will be deleted after building, you can add Copy Files task to copy it to other folder. – starian chen-MSFT Aug 11 '17 at 01:45
  • I can't find that file. Please notice this is release definition (build is going well). Is there any way to copy this error.txt before it is deleted? [error]Failed to deploy web package to IIS website. [debug]Processed: ##vso[task.issue type=error;]Failed to deploy web package to IIS website. [debug]{} [debug]System.DefaultWorkingDirectory=C:\vstsagent\A2\_work\r1\a [debug]rm -rf C:\vstsagent\A2\_work\r1\a\error.txt [debug]removing file [debug]task result: Failed – kopieczek.dev Aug 11 '17 at 09:43
  • Logon agent machine and try to open it manually before be deleted. – starian chen-MSFT Aug 11 '17 at 09:54

1 Answers1

23

Looks like I figured it out. .NET Framework 3.5 was missing on my server...

I was investigating logs and I found out that below line is causing failure.

"C:\vstsagent\A2\_work\_tasks\IISWebAppDeploymentOnMachineGroup_1b467810-6725-4b6d-accd-886174c09bba\0.0.20\MSDeploy3.6\msdeploy.exe" -verb:sync -source:package='C:\vstsagent\A2\_work\r2\a\temp_web_package_8269135298977384.zip' -dest:auto -setParam:name='IIS Web Application Name',value='httproot'

So I copied it to CMD and got proper Windows message when I tried to execute it.

kopieczek.dev
  • 632
  • 5
  • 24
  • Is .net 3.5 a specific requirement? I am facing same error on deploy to a Windows 10 machine which already has .net 4.6.2 installed – brady321 Sep 15 '17 at 02:24
  • In my case it deployed successfully but VSTS reports the above error which sucks because getting IT to install .NET on a Production Server isn't easy. As It requires a restart – Ody Oct 11 '17 at 11:42
  • 7
    Is this really THE answer here? .Net 3.5 came out 10 years ago 2007. Its support ended in 2011, why in the world would this be a dependency for the IIS Web App Deploy task in 2017? There has to be a better solution here... – raterus Dec 14 '17 at 22:16
  • @raterus Indeed it seems like that. Fixed the problem for me! – juarola Feb 01 '18 at 09:07
  • Had the same issue. Installing .NET 3.5 fixed it :( – brechtvhb Feb 10 '18 at 20:49
  • Same here. Thx for the tip! – maxisam Apr 17 '18 at 16:25