I created a web application with Asp.NET MVC 4 and I’d like to deploy it to Windows azure using Octopus Deploy.
I have imported the “Web Deploy - Publish Website (Ms Deploy)” template and I added it as step in my process deploy.
Below is the error that I have been having when I try deploy it.
GAC Version Location
True v2.0.50727 C:\Windows\assembly\GAC_MSIL\Microsoft.Web.Deployment…
Finding path to package step: DeployNuget
Package was installed to: C:\Octopus\Applications\QA\AhTask.Web\1.0.0.25_3
Info 13:18:13
You cannot call a method on a null-valued expression.
Info 13:18:13
At C:\Windows\system32\config\systemprofile\AppData\Local\Tentacle\Temp\a22354a
Info 13:18:13
6-1603-470b-bf35-e33db1ef1909.ps1:100 char:1
Info 13:18:13
$skipPaths = $OctopusParameters[‘SkipSyncPaths’].Split(";",
Info 13:18:13
[System.StringSplitO …
Info 13:18:13
Info 13:18:13
Info 13:18:13
+ CategoryInfo : InvalidOperation: (:) [], ParentContainsErrorRec
Info 13:18:13
ordException
Info 13:18:13
+ FullyQualifiedErrorId : InvokeMethodOnNull
Info 13:18:13
Skipping delete actions on App_Data
Info 13:18:13
==============================================
PowerShell exit code: 1
I appreciate any helps.
Thanks!
Last night we released Octopus 3.0.1, where we added support to this kind of Azure deployments right out of the box (and not through a library step template). If your rely a lot in Azure deployments, I’d definitely recommend you to give Octopus 3 a try: http://octopusdeploy.com/blog/octopus-3.0-released
About your current issue: The error seems to be exactly what you sent on the first reply. I needed to be sure that there wasn’t something else around, that’s why I asked for the logs.
Finding path to package step: DeployNuget
Package was installed to: C:\Octopus\Applications\QA\AhTask.Web\1.0.0.25_3
You cannot call a method on a null-valued expression.
I’m gonna need a bit more info about your deployment process
A screenshot of the step “Web Deploy - Publish Website (MSDeploy)” where I can see the values of all the fields. There might be something funny going on in one of these fields that might be caussing that null-valued method call.
I will definitely check out the new release. However, I would like to understand what I am doing wrong with current version. I am sending you the new Log and Screen of my Web Deploy step.
Apparently this is caused because the Powershell script of the step is not checking for a Null or empty value for $OctopusParameters[‘SkipSyncPaths’]. I’ve added a check for that on this gist: https://gist.github.com/Dalmirog/f98f3ed17ffa0489bb54
Please try to use that version of the step and let me know how it goes.
May I ask why are you using that MSDeploy step instead of using the built in IIS deploy support in Octopus?
One of the reasons we built MS deploy was to get away from old and faulty deployment methods like MSDeploy and “Publish” (in fact, the phrase “Friends don’t let friends Right click -> Publish” is quite popular in our office). We do provide great support to deploy to machines running IIS: http://docs.octopusdeploy.com/display/OD/IIS+Websites+and+Application+Pools
That step template you are currently using, while it is in our library, was submitted by a member of the community. There’s a strong reason why we don’t provide built-in support to MSDeploy, and its because it simply isn’t a deployment method we recommend.
Any chance I can convince you to start using the built in IIS steps in Octopus instead?