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
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: ( [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
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.
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.