diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureDeployment.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureDeployment.cs index 9dce70e2c3ac..18ccb01da7e9 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureDeployment.cs +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureDeployment.cs @@ -123,6 +123,11 @@ public virtual void NewPaaSDeploymentProcess() } else { + if (string.IsNullOrEmpty(storageName)) + { + throw new ArgumentException(Resources.CurrentStorageAccountIsNotSet); + } + var progress = new ProgressRecord(0, Resources.WaitForUploadingPackage, Resources.UploadingPackage); WriteProgress(progress); removePackage = true; @@ -265,11 +270,6 @@ protected virtual void ValidateParameters() { this.Label = this.Name; } - - if (string.IsNullOrEmpty(this.CurrentContext.Subscription.GetProperty(AzureSubscription.Property.StorageAccount))) - { - throw new ArgumentException(Resources.CurrentStorageAccountIsNotSet); - } } } }