I want to deploy resources to my Azure subscription with Visual Studio. I created a new "Azure Resource Group" project and see WebSite.json, WebSite.parameters.json and Deploy-AzureResourceGroup.ps1. When I right-click on the project and choose "New Deployment" I can login to my subscription in the pop up window. But when I click the "Deploy" button I see in the output window my correct Account, TenantId, SbuscriptionId and Name but then only errors:
15:47:58 - [ERROR] New-AzureRmResourceGroup : Run Login-AzureRmAccount to login.
15:47:58 - [ERROR] At C:\Users\Frederic\Documents\Visual Studio 2015\Projects\AzureResourceGroup1\
15:47:58 - [ERROR] AzureResourceGroup1\bin\Debug\staging\AzureResourceGroup1\Scripts\Deploy-AzureR
15:47:58 - [ERROR] esourceGroup.ps1:96 char:1
15:47:58 - [ERROR] + New-AzureRmResourceGroup -Name $ResourceGroupName -Location $Resource ...
When I open a PowerShell command window and run Login-AzureRmAccount first it works but what am I missing (or how to do it) with VS?