0
votes

I created a VSTS Release Definition with that contains a Azure Powershell script

enter image description here

When I create a release from the following definition everything works until I get to the Azure Powershell script, I get the following log:

2016-08-02T19:06:33.1625377Z ##[command]Import-Module -Name C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\AzureRM.Profile\AzureRM.Profile.psd1 -Global 2016-08-02T19:06:37.8986980Z ##[command]Add-AzureRMAccount -ServicePrincipal -Tenant ******** -Credential System.Management.Automation.PSCredential 2016-08-02T19:06:39.0397286Z

[command]Select-AzureRMSubscription -SubscriptionId ******* -TenantId ******** 2016-08-02T19:06:39.1837302Z ##[command]& 'C:\a\e214cea58\ContinuousBuild\drop\Deployment\PrepareIoTSample.ps1'

-environmentName test -configuration debug -webPackageLocation "C:\a\e214cea58\ContinuousBuild\drop\Web\Web.zip" -webJobPackageLocation "C:\a\e214cea58\ContinuousBuild\drop\WebJob\WebJobHost.zip" 2016-08-02T19:06:40.3037302Z ##[error]Cannot find path 'C:\a\e214cea58\ContinuousBuild\VERSION.txt' because it does not exist. 2016-08-02T19:06:43.3880731Z ##[error]Version 1.3.2; update to 1.4.0 and run again.

I tried to google the errors but didn't find anything usefull, and I don't see an option to enter a version number. Can someone point me in the right direction?

1
After some more searching, I found the Azure powershell version running on VSTS is 1.3.2, so that explains the error, the question is now how to run my script, can I force my script to run on a lower version?pieter_dv

1 Answers

0
votes

You can't run a lower version of AzurePS because there can be only one version of Azure PS installed at a time on a single machine.
The online build machines being maintained by Microsoft they all have the same version of Azure PS. (I'm assuming you're using the hosted agent) I'd suggest you upgrade your script so it runs properly with the new version of Azure PS