I’m trying to get my .net website to deploy to azure as part of the TFS Build process. I’m writting a powershell script to do this but I’m getting stuck on the set-AzureDeployment -Upgrade command. I’m not sure if there is an easier way but I’m trying to implement the upload based on the code from the windows azure site:
http://www.windowsazure.com/en-us/develop/net/common-tasks/continuous-delivery/#step4
When I run the following:
Set-AzureDeployment -Upgrade -SERVICENAME "MYSVC" -Mode Auto -Package D:\MYSVC\Drops\Azure.cspkg -configuration D:\MYSVC\Drops\ServiceConfiguration.Cloud.cscfg -Slot Staging -Force
I get this error:
Set-AzureDeployment : The path variable 'SERVICENAME' in the
UriTemplate must be bound to a non-empty string value.
Parameter name:
parameters At line:1 char:20
+ Set-AzureDeployment <<<< -Upgrade -SERVICENAME "MYSVC" -Mode Auto -Package D:\MYSVC\Drops\Azure.cspkg -Configuration D:\MYSVC\Drops\ServiceConfiguration.Cloud.cscfg -Slot Staging -Force
+ CategoryInfo : CloseError: (:) [Set-AzureDeployment], ArgumentException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.ServiceManagement.HostedServices.SetAzureDeploymentCommand
I’ve checked all the parementers and they are all correct as far as I can tell (the servicename I’m using works when I call Get-AzureDeployment -ServiceName MYSVC). What am I doing wrong?
I was able to see the exact same problem and after some discussion I found that there is some code issue with this command so when the correct error isn’t reported.
Actual the problem is that when you call Set-AzureDeployment, it can not use a Windows Azure Storage Account to temporary upload your package and fail with some weird error.
To solve this problem please set a valid Windows Azure Storage Account by calling Set-AzureSubscription first and then use same Set-AzureDeployment command.