Azure Resource Group (2.9) error: PowerShell deployment script is missing
Asked Answered
N

6

5

I followed this link (https://azure.microsoft.com/en-us/documentation/articles/vs-azure-tools-resource-groups-deployment-projects-create-deploy/) to create azure resource group. However, I got the error when deploying the Project "PowerShell deployment script is missing"

Does anyone knows what cause this error? I am using VS2013 and Azure sdk 2.9

Nervous answered 22/8, 2016 at 14:44 Comment(0)
E
10

I burned a lot of time debugging the same problem!

Make sure in the file properties for the ps1 file are set to Build Action = "Content"

This will ensure that it's copied to the bin folder during building.

Escallop answered 12/10, 2016 at 13:14 Comment(0)
H
6

According to this

http://blog.thingsgeeky.co.uk/visual-studio-azure-sdk-json-outline-blank/

Your ps1 file must be called Deploy-AzureResourceGroup.ps1

I had renamed mine. I renamed it back and the error went away

Hatpin answered 11/6, 2018 at 6:40 Comment(2)
Silly me! I imported a powershell file from the Hard Drive (after deleting the Deploy-AzureResourceGroup.ps1 which was automatically created during project creation). I kept the name as it is and was facing issues. Renaming it to Deploy-AzureResourceGroup.ps1 solved it. Small thing but then again difficult to catch. I wonder why this answer had 0 upvotesListerism
I exported the automation script from Azure and put the files in this project. The default name from Azure is "deploy.ps1". When I renamed it to "Deploy-AzureResourceGroup.ps1" all worked. Thanks!!Infeudation
M
2

In my case rebooting didn't help and the Build Action was already set to 'Content'. What did work for me is to clear the recent list of the Deploy context menu and then click 'New' to create a new deployment config.

clean recent list

Midget answered 27/2, 2018 at 14:56 Comment(0)
N
1

I found a very stupid solution. I just need to restart my machine and the issue is gone. It needs a reboot after installation from WebPI

Nervous answered 22/8, 2016 at 15:49 Comment(2)
Tried this and all of the above, didn't help. I'm stuck with this annoying popup which appeared at some random time for seemingly no reason at all.Britisher
#GoFigure. Reboot fixed me too.Liquidator
N
1

Just had the same error. You have to build your resource group project in Visual Studio before you can actually deploy from it.

I created a resource group project and immediately tried to deploy but that doesn't work because the project hadn't built yet.

Nev answered 25/8, 2016 at 12:47 Comment(0)
T
0

I know this is an old thread but still relevant. I had to right click-->Properties on the "Deploy-AzureResourceGroup.ps1" file and select one of the copy options "Copy always" or "Copy if newer"

Screenshot

Threedecker answered 5/8, 2019 at 1:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.