I was trying to configure the TFS build for continuous deployment on Azure Cloud Services by following the steps mentioned in the documentation http://www.windowsazure.com/en-us/develop/net/common-tasks/continuous-delivery/
After configuring everything, when I queued my build - I got this error message - The specified module Azure was not loaded because no valid module file was found in any module directory
As soon as I looked this error I knew that this was coming from the PowerShell file named as - PublishCloudService.ps1 which you can get from the link mentioned above.
After quick search - I got a link which actually resolved the issue.
What was the issue?
The build was trying to launch the process on build server - PowerShell.exe but somehow system was not able to find the AzurePowerShell module path.
Solution:
Open your PowerShell Script file and find the command Import-Module Azure and add the following line just above it
$env:PSModulePath=$env:PSModulePath+";"+"C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell"
After this modification , save the file and try to queue the build again.
I hope this helps someone.
After configuring everything, when I queued my build - I got this error message - The specified module Azure was not loaded because no valid module file was found in any module directory
As soon as I looked this error I knew that this was coming from the PowerShell file named as - PublishCloudService.ps1 which you can get from the link mentioned above.
After quick search - I got a link which actually resolved the issue.
What was the issue?
The build was trying to launch the process on build server - PowerShell.exe but somehow system was not able to find the AzurePowerShell module path.
Solution:
Open your PowerShell Script file and find the command Import-Module Azure and add the following line just above it
$env:PSModulePath=$env:PSModulePath+";"+"C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell"
After this modification , save the file and try to queue the build again.
I hope this helps someone.
Thanks for posting this, I had the exact same issue and this fixed it for me!
ReplyDeleteJohn
Use "C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\ServiceManagement" now.
ReplyDelete