MSDeploy to Azure Failing

Hi,

I am using the Web Deploy Template and trying to deploy to azure.

During deployment the script is failing with the below error.

If I run the script in powershell locally it works but fails when Octopus is running it.

I have tried running Octopus has Administrator and setting the powershell execution policy to unrestricted. They didn’t help either :frowning:

Any ideas?

Finding path to package step: Kitchen NuGet
Package was installed to: C:\Octopus\Applications\IRGWebUnitTest\KitchenCompare\1.0.183_2
Info 10:28:31
new-object : Cannot find type
Info 10:28:31
[Microsoft.Web.Deployment.DeploymentBaseOptions]: verify that the assembly
Info 10:28:31
containing this type is loaded.
Info 10:28:31
At C:\Windows\system32\config\systemprofile\AppData\Local\Tentacle\Temp\7955078
Info 10:28:31
f-68b1-4d8c-9356-d4041acf18ca.ps1:64 char:20
Info 10:28:31

  • $destBaseOptions = new-object Microsoft.Web.Deployment.DeploymentBaseOptions
    Info 10:28:31
  •                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    

Info 10:28:31
+ CategoryInfo : InvalidType: (:slight_smile: [New-Object], PSArgumentExcepti
Info 10:28:31
on
Info 10:28:31
+ FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewOb
Info 10:28:31
jectCommand
Info 10:28:31
Publishing Website
Info 10:28:31

PowerShell exit code: 1

Hi Daniel,

Thanks for getting in touch! Could you please enable the debugging variables, then create a new release and send us the raw log?

http://docs.octopusdeploy.com/display/OD/Debug+problems+with+Octopus+variables

http://docs.octopusdeploy.com/display/OD/Get+the+raw+output+from+a+task

When you deploy the new release, please try to run as fewer steps as possible to avoid logging noise. Only the Web Deploy step would be the best.

Thanks,

Dalmiro

Solved,

I set up a tentacle on a internal server. Once the Nuget package had installed there, MS Deploy was able to run on the internal server and sync to Azure.

Hi Daniel - Glad to hear that!

Dalmiro

If anyone else stumbles across this. The solution is to ensure that Microsoft Web Deploy is installed in the machine where the Tentacle is running. The Tentacle that is to deploy to Azure Web App.