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

Kim Hoang
  • 1,338
  • 9
  • 24

6 Answers6

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.

Alex KeySmith
  • 16,657
  • 11
  • 74
  • 152
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

Nick.Mc
  • 18,304
  • 6
  • 61
  • 91
  • 1
    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 upvotes – Saurabh Rai Sep 19 '18 at 15:56
  • 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!! – Mike Bovenlander Dec 05 '18 at 09:44
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

Sander Schutten
  • 1,862
  • 1
  • 10
  • 10
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

Kim Hoang
  • 1,338
  • 9
  • 24
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.

Ronald Wildenberg
  • 31,634
  • 14
  • 90
  • 133
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

Bevan
  • 1,305
  • 1
  • 11
  • 17