Visual Studio 2015 にて ASP.NET MVC プロジェクトを作成し、Azure Web Apps へのデプロイを行おうとしたときに、以下のようなエラーが発生してデプロイが行えないトラブルに最近遭遇した。
Following errors occured during the deployment: Error during deployment for resource 'myproject' in resource group 'mygroup': MissingRegistrationForLocation: The subscription is not registered for the resource type 'components' in the location 'Central US'. Please re-register for this provider in order to have access to this location..
スクリーンショット
こういうエラー。
再現条件と対策
Azure SDK のバージョンが 2.9.6 より古いと、Visual Studio Webプロジェクトの Azure Web Apps への新規デプロイ時に前述のようなエラーが発生する。
インターネット上の報告を流し見した限りでは2016年の11月あたりから同様の報告が見られるので、その時期付近で Azure サービス側と古い Azure SDK との互換性(の一部)が無くなったんだと思う。
Tools - Extensions and Updates を開き、
Updates - Product Updates から Microsoft Azure SDK の最新版を入れる (Updateする) とこの問題は直る。はず。