- Using Web Platform Install, install the following (https://www.microsoft.com/web/downloads/platform.aspx)
- Install Visual Studio Community 2015
- Make sure that the "Microsoft SQL Server Data Tools" is installed, if not, then you can add it later in Add/Remove Programs
- Install Azure Tools
- Install Azure PowerShell 1.0
- Run Visual Studio Community 2015 with Administrator rights - make sure it's admin rights or else your deployment (which runs Azure PowerShell in the background) will fail with very odd error messages! (See error below)
- Create new project
- File > New > Project > Installed > Templates > Visual Basic > Cloud > Azure Resource Group
- Pick a Azure Template, I recommend "Blank Template" from Microsoft to start with
- Under Solution Explorer (on right), expand Templates > azuredeploy.json
- Click "JSON Outline" on bottom left and start creating resources by clicking "Add Resource"
- When template is complete, right click on "AzureResourceGroup" under Solution Explorer and select Deploy.
If you forgot to run Visual Studio Community 2015 without admin rights, you will get the following cryptic messages:
14:04:09 - Build started.
14:04:09 - Project "AzureResourceGroup2.deployproj" (StageArtifacts target(s)):
14:04:09 - Project "AzureResourceGroup2.deployproj" (ContentFilesProjectOutputGroup target(s)):
14:04:09 - Done building project "AzureResourceGroup2.deployproj".
14:04:09 - Done building project "AzureResourceGroup2.deployproj".
14:04:09 - Build succeeded.
14:04:09 - The following parameter values will be used for this deployment:
14:04:09 - Launching deployment PowerShell script with the following command:
14:04:09 - 'c:\users\username\documents\visual studio 2015\projects\azureresourcegroup2\azureresourcegroup2\Scripts\Deploy-AzureResourceGroup.ps1' -StorageAccountName '' -ResourceGroupName 'RG_Test1' -ResourceGroupLocation 'southeastasia' -TemplateFile 'c:\users\username\documents\visual studio 2015\projects\azureresourcegroup2\azureresourcegroup2\templates\azuredeploy.json' -TemplateParametersFile 'c:\users\username\documents\visual studio 2015\projects\azureresourcegroup2\azureresourcegroup2\templates\azuredeploy.parameters.json' -ArtifactStagingDirectory '..\bin\Debug\staging'
14:04:09 - Get-AzureEnvironment : The term 'Get-AzureEnvironment' is not recognized as the name of a cmdlet, function, script
14:04:09 - file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
14:04:09 - and try again.
14:04:09 - At line:1 char:174
14:04:09 - + ... zure_PS_Data_Collection = 'true' }; if ((Get-AzureEnvironment -Name ' ...
14:04:09 - + ~~~~~~~~~~~~~~~~~~~~
14:04:09 - + CategoryInfo : ObjectNotFound: (Get-AzureEnvironment:String) [], CommandNotFoundException
14:04:09 - + FullyQualifiedErrorId : CommandNotFoundException
14:04:09 -
14:04:10 - Get-AzureEnvironment : The term 'Get-AzureEnvironment' is not recognized as the name of a cmdlet, function, script
14:04:10 - file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
14:04:10 - and try again.
14:04:10 - At line:1 char:2183
14:04:10 - + ... user@company.com' -Environment (Get-AzureEnvironment -Name ' ...
14:04:10 - + ~~~~~~~~~~~~~~~~~~~~
14:04:10 - + CategoryInfo : ObjectNotFound: (Get-AzureEnvironment:String) [], CommandNotFoundException
14:04:10 - + FullyQualifiedErrorId : CommandNotFoundException
14:04:10 -
14:04:10 - & : The script 'Deploy-AzureResourceGroup.ps1' cannot be run because the following modules that are specified by the
14:04:10 - "#requires" statements of the script are missing: AzureRM.Resources.
14:04:10 - At line:1 char:2227
14:04:10 - + ... eCloud')));&'c:\users\username\documents\visual studio 2015\projects\ ...
14:04:10 - + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14:04:10 - + CategoryInfo : ResourceUnavailable: (Deploy-AzureResourceGroup.ps1:String) [], ScriptRequiresException
14:04:10 - + FullyQualifiedErrorId : ScriptRequiresMissingModules
14:04:10 -
14:04:10 - Deploying template using PowerShell script failed.
14:04:10 - Tell us about your experience at http://go.microsoft.com/fwlink/?LinkId=691202
3 comments:
I ran in Administrator and still got that error message...
Any other things to look at?
Thanks Nod. I kept getting that error message until I ran VS as admin. Kudos to you.
Glad that it helped someone!
Post a Comment