{"id":34040,"date":"2017-11-02T12:28:47","date_gmt":"2017-11-02T19:28:47","guid":{"rendered":"https:\/\/blog.xamarin.com\/?p=34040"},"modified":"2019-04-04T07:48:01","modified_gmt":"2019-04-04T14:48:01","slug":"publish-azure-visual-studio-mac","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/xamarin\/publish-azure-visual-studio-mac\/","title":{"rendered":"Publish an ASP.NET Core Project to Azure from Visual Studio for Mac"},"content":{"rendered":"<p>\t\t\t\tAs a cloud first, mobile first IDE, Visual Studio for Mac is designed to work side by side with Azure. In this post,\u00a0you&#8217;ll create an ASP.NET Core project, edit the site to be unique, and then deploy the project to Azure. To complete this task, make sure your setup meets the following requirements:<\/p>\n<ul>\n<li>Visual Studio for Mac 7.2.x or greater<\/li>\n<li>.NET Core 2 (If you do not have .NET Core 2, you can download the latest version from <a href=\"https:\/\/www.microsoft.com\/net\/core#macos\">the .NET Core site<\/a>)<\/li>\n<li>An Azure account (Don&#8217;t have an Azure account? <a href=\"https:\/\/azure.microsoft.com\/en-us\/free\/\">Sign up\u00a0for free<\/a> today!)<\/li>\n<\/ul>\n<h2>Getting Starting with ASP.NET Core<\/h2>\n<p>With those prerequisites in place,\u00a0you can get started on\u00a0an ASP.NET Core app. Remember,\u00a0you can do this all from Visual Studio for Mac, so close Terminal and forget about FTP. To get started, open Visual Studio for Mac and click &#8220;New Project&#8221;. On the New Project screen, select <strong>.NET Core &gt; App &gt; ASP.NET Core Web App<\/strong> and follow the prompts to name your project.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-34041 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/44\/2019\/03\/NewProject.png\" alt=\"\" width=\"668\" height=\"485\" \/><\/p>\n<h3>Edit Your HTML<\/h3>\n<p>After the project is created, you&#8217;ll edit the HTML to truly make it\u00a0your own unique\u00a0project. Within Visual Studio for Mac, expand <strong>Views &gt; Home and open About.cshtml<\/strong>. Feel free to edit this page in any small way you see fit. For this example, changing the &#8220;About&#8221; text to, &#8220;This was created by a tutorial on the Xamarin Blog!&#8221;<\/p>\n<p><img decoding=\"async\" class=\"wp-image-34042 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/44\/2019\/03\/CodeEdit.png\" alt=\"\" width=\"815\" height=\"308\" \/><\/p>\n<h2>Deploy to Azure<\/h2>\n<p>At this point, save the project and deploy it to Azure. Now is a great time to <a href=\"https:\/\/azure.microsoft.com\/en-us\/free\/\">create a free Azure account<\/a>. Only then you will be able to right-click or ctrl-click on your project and select <strong>Publish &gt; Publish to Azure.<\/strong><\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-34045 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/44\/2019\/03\/PublishMenu.png\" alt=\"\" width=\"454\" height=\"177\" \/><\/p>\n<h3>Log Into Visual Studio for Mac<\/h3>\n<p>Log into Visual Studio for Mac via the publishing tool to be greeted by the following window:<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-34046 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/44\/2019\/03\/PublishScreen1.png\" alt=\"\" width=\"700\" height=\"472\" \/><\/p>\n<h3>Create New App Service<\/h3>\n<p><em>Already active Azure users<\/em> will see a list of existing app services.\u00a0Make a new app service for this exercise by clicking &#8220;New&#8221; on the bottom left side. This will take\u00a0you to the &#8220;New App Service&#8221; screen where\u00a0you fill in the pertinent information for your project. Once you are ready, the &#8220;Create&#8221; button will be activated:<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-34047 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/44\/2019\/03\/PublishScreen2.png\" alt=\"\" width=\"754\" height=\"555\" \/><\/p>\n<p>The &#8220;Create&#8221;\u00a0button may not be active so be sure to check that all fields are populated and that the name you select is available. If the name you selected is not available, you may see an exclamation point near the name field. Now you should be able to\u00a0click the &#8220;Create&#8221; button; go ahead and\u00a0see what happens!<\/p>\n<p>A warning should appear letting you know that this may take some time, which you can dismiss. Then, you&#8217;ll see the following info bar messages:<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-34048 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/44\/2019\/03\/ServiceCreateInfo.png\" alt=\"\" width=\"596\" height=\"38\" \/>\n<img decoding=\"async\" class=\"size-full wp-image-34044 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/44\/2019\/03\/PublishInfo.png\" alt=\"\" width=\"600\" height=\"38\" \/><\/p>\n<p>As soon as it is published, your newly deployed ASP.NET Core Web App will open in your default browser!<\/p>\n<h2>Wrapping Up<\/h2>\n<p>In this post, you learned how to produce and publish an ASP.NET Core Web App to Azure using nothing but Visual Studio for Mac. We&#8217;re excited to be adding Azure integration directly into the IDE, and we hope you enjoy using it.<\/p>\n<p>Discuss this blog post on our <a href=\"https:\/\/forums.xamarin.com\/106041\/publish-to-azure-from-visual-studio-for-mac\">forum<\/a>!\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As a cloud first, mobile first IDE, Visual Studio for Mac is designed to work side by side with Azure. In this post,\u00a0you&#8217;ll create an ASP.NET Core project, edit the site to be unique, and then deploy the project to Azure. To complete this task, make sure your setup meets the following requirements: Visual Studio [&hellip;]<\/p>\n","protected":false},"author":561,"featured_media":34045,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2],"tags":[4],"class_list":["post-34040","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-developers","tag-xamarin-platform"],"acf":[],"blog_post_summary":"<p>As a cloud first, mobile first IDE, Visual Studio for Mac is designed to work side by side with Azure. In this post,\u00a0you&#8217;ll create an ASP.NET Core project, edit the site to be unique, and then deploy the project to Azure. To complete this task, make sure your setup meets the following requirements: Visual Studio [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/34040","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/users\/561"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/comments?post=34040"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/34040\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media?parent=34040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/categories?post=34040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/tags?post=34040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}