{"id":5785,"date":"2017-04-05T12:00:01","date_gmt":"2017-04-05T16:00:01","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/azuregov\/?p=5785"},"modified":"2019-03-28T23:01:24","modified_gmt":"2019-03-29T06:01:24","slug":"introducing-the-azure-environment-selector-visual-studio-extension","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/azuregov\/introducing-the-azure-environment-selector-visual-studio-extension\/","title":{"rendered":"Introducing the Azure Environment Selector Visual Studio extension"},"content":{"rendered":"<p>Visual Studio has many tools that enable developers to easily interact with Azure. These are tools like the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=MicrosoftCloudExplorer.CloudExplorerforVS15Preview\">Cloud Explorer for Visual Studio 2017<\/a>, Visual Studio Server Explorer, the main Visual Studio login, and even being able to right-click in the Visual Studio Solution Explorer to deploy a web project to Azure.\u00a0 However, by default, these tools connect directly to the Azure commercial cloud. What about Azure Government developers?<\/p>\n<p>In the <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/azure-government\/documentation-government-get-started-connect-with-vs\">Azure Government documentation<\/a>, we show how you can place an Azure Active Directory configuration file in a directory that enables Visual Studio to point to Azure Government instead of Azure commercial. However, this process is somewhat manual and, if you\u2019re a developer that often needs to switch between working with Azure Government and Azure commercial, this process can be cumbersome.<\/p>\n<p>To solve this, we are pleased to introduce the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=SteveMichelotti.AzureEnvironmentSelector\">Azure Environment Selector<\/a> Visual Studio extension! This extension enables you to quickly and easily switch between Azure environments. You install this like any other extension in Visual Studio: Tools \u2013 Extension and Updates\u2026<\/p>\n<p>Then click the \u201cOnline\u201d tab on the left to search for extensions online and search for \u201cazure environment selector\u201d. Then click to Download or Install:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/azuregov\/\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-5795\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/43\/2019\/03\/14.png\" alt=\"1\" width=\"941\" height=\"653\" \/><\/a><\/p>\n<p>Once you restart Visual Studio, the extension will be installed. When you click the \u201cTools\u201d menu item, you will find an \u201cAzure Environment Selector\u201d item in the menu:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-5805\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/43\/2019\/03\/21.png\" alt=\"2\" width=\"348\" height=\"92\" \/><\/p>\n<p>Click the menu item and you will see the Azure Environment Selector dialog:<\/p>\n<p><a href=\"https:\/\/blogs.msdn.microsoft.com\/azuregov\/?attachment_id=5815\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-5815\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/43\/2019\/03\/31.png\" alt=\"3\" width=\"501\" height=\"192\" \/><\/a><\/p>\n<p>Use the dropdown to select a different environment such as Azure Government:<\/p>\n<p><a href=\"https:\/\/blogs.msdn.microsoft.com\/azuregov\/?attachment_id=5825\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-5825\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/43\/2019\/03\/41.png\" alt=\"4\" width=\"501\" height=\"192\" \/><\/a><\/p>\n<p>From here you can restart Visual Studio and the change will take effect. Once Visual Studio restarts, you will now be able to connect to other environments with VS tools such as the Cloud Explorer (shown below connected to Azure Government), Server Explorer, the main Visual Studio login, and the Visual Studio Solution Explorer.<\/p>\n<p><a href=\"https:\/\/blogs.msdn.microsoft.com\/azuregov\/?attachment_id=5826\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-5826\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/43\/2019\/03\/51.png\" alt=\"5\" width=\"328\" height=\"382\" \/><\/a><\/p>\n<p>The code is open source <a href=\"https:\/\/github.com\/smichelotti\/AzureEnvironmentSelector\">on GitHub<\/a>. We welcome any <a href=\"https:\/\/github.com\/smichelotti\/AzureEnvironmentSelector\/issues\">feedback or issues<\/a>.<\/p>\n<p><a href=\"https:\/\/channel9.msdn.com\/blogs\/Azure-Government\/Azure-Environment-Selector-Visual-Studio-Extension\">This short video<\/a> shows the extension in action \u2013 walking you through installation and showing how easy it is to connect to Azure Government:<\/p>\n<p><iframe width=\"650\" height=\"375\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" src=\"https:\/\/channel9.msdn.com\/blogs\/Azure-Government\/Azure-Environment-Selector-Visual-Studio-Extension\/player\"><span class=\"mce_SELRES_start\" style=\"width: 0px; line-height: 0; overflow: hidden; display: inline-block;\" data-mce-type=\"bookmark\">\ufeff<\/span><span class=\"mce_SELRES_start\" style=\"width: 0px; line-height: 0; overflow: hidden; display: inline-block;\" data-mce-type=\"bookmark\">\ufeff<\/span><\/iframe><\/p>\n<p>We welcome your comments and suggestions to help us continually improve your Azure Government experience. To stay up to date on all things Azure Government, be sure to subscribe to our <a href=\"https:\/\/blogs.msdn.microsoft.com\/azuregov\/feed\/\">RSS feed<\/a> and to receive emails, click \u201cSubscribe by Email!\u201d on the <a href=\"https:\/\/blogs.msdn.microsoft.com\/azuregov\/\">Azure Government Blog<\/a>. To experience the power of Azure Government for your organization, sign up for an <a href=\"https:\/\/azuregov.microsoft.com\/trial\/azuregovtrial\">Azure Government Trial<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visual Studio has many tools that enable developers to easily interact with Azure. These are tools like the Cloud Explorer for Visual Studio 2017, Visual Studio Server Explorer, the main Visual Studio login, and even being able to right-click in the Visual Studio Solution Explorer to deploy a web project to Azure.\u00a0 However, by default, [&hellip;]<\/p>\n","protected":false},"author":1789,"featured_media":5845,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2,1,6,15,25],"tags":[84,95,583],"class_list":["post-5785","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-announcements","category-azuregov","category-connectivity","category-management","category-portalpreview","tag-azure-environment-selector","tag-azure-government","tag-visual-studio"],"acf":[],"blog_post_summary":"<p>Visual Studio has many tools that enable developers to easily interact with Azure. These are tools like the Cloud Explorer for Visual Studio 2017, Visual Studio Server Explorer, the main Visual Studio login, and even being able to right-click in the Visual Studio Solution Explorer to deploy a web project to Azure.\u00a0 However, by default, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/azuregov\/wp-json\/wp\/v2\/posts\/5785","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/azuregov\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/azuregov\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azuregov\/wp-json\/wp\/v2\/users\/1789"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azuregov\/wp-json\/wp\/v2\/comments?post=5785"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/azuregov\/wp-json\/wp\/v2\/posts\/5785\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azuregov\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/azuregov\/wp-json\/wp\/v2\/media?parent=5785"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azuregov\/wp-json\/wp\/v2\/categories?post=5785"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azuregov\/wp-json\/wp\/v2\/tags?post=5785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}