{"id":227141,"date":"2019-10-30T13:09:38","date_gmt":"2019-10-30T20:09:38","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=227141"},"modified":"2019-10-30T13:14:48","modified_gmt":"2019-10-30T20:14:48","slug":"get-started-with-visual-studio-for-mac","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/get-started-with-visual-studio-for-mac\/","title":{"rendered":"Get Started with Visual Studio for Mac"},"content":{"rendered":"<p>The first step is often the hardest. Do you find yourself with great ideas for the next awesome app, website, or game but you never get around to making that first leap into the unknown? Today, I\u2019ll help you with that! In this blog post, I\u2019m going to walk through how to get started with Visual Studio for Mac.<\/p>\n<p>Visual Studio for Mac is a macOS-native .NET IDE that focuses on .NET Core, Xamarin, and Unity. It provides many of the same features as Visual Studio for Windows, such as a shared C#, XAML, and web editor. For more information on Visual Studio for Mac, see our <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/mac?view=vsmac-2019\">documentation<\/a>.<\/p>\n<h2>Installation<\/h2>\n<p>Before writing any code, you\u2019ll first need to download Visual Studio for Mac from <a href=\"https:\/\/visualstudio.microsoft.com\/vs\/mac\/\">https:\/\/visualstudio.microsoft.com\/vs\/mac\/<\/a>. Once downloaded, click on the .dmg to launch it. Double-click the installer icon to mount it and start your install experience. Click <strong>Open i<\/strong>f you\u2019re prompted with security messages.<\/p>\n<p>Once the installer launches, agree to the licensing terms by pressing <strong>Continue<\/strong>.<\/p>\n<p>On the component selection screen, illustrated below, you can select the components you want to install. The component you need to install depends on the type of app that you want to create:<\/p>\n<ul>\n<li><strong>.NET Core<\/strong>: Allows you to create <em>.NET Core apps and libraries, ASP.NET Core Web apps<\/em>, and <em>Azure Functions.<\/em><\/li>\n<li><strong>Android<\/strong>: Allows you to build native Xamarin or Xamarin.Forms apps targeting the Android platform. Selecting this will also install OpenJDK and the latest Android SDK, both of which are required for Android development.<\/li>\n<li><strong>iOS<\/strong>: Allows you to build native Xamarin or Xamarin.Forms apps targeting iOS.<\/li>\n<li><strong>macOS<\/strong>: Allows you to build native Xamarin.Mac apps.<\/li>\n<\/ul>\n<p>Note that you\u2019ll need to separately install Xcode if you want to develop for iOS or Mac. I recommend that you do this once Visual Studio for Mac has finished installing.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-227144 size-full aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen-Shot-2019-10-30-at-13.21.51.png\" alt=\"\" width=\"912\" height=\"667\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen-Shot-2019-10-30-at-13.21.51.png 912w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen-Shot-2019-10-30-at-13.21.51-300x219.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen-Shot-2019-10-30-at-13.21.51-768x562.png 768w\" sizes=\"(max-width: 912px) 100vw, 912px\" \/><\/p>\n<p>In this post, I want to create an <a href=\"https:\/\/docs.microsoft.com\/azure\/azure-functions\/functions-overview\">Azure Function<\/a>, so I want to select the <strong>.NET Core<\/strong> option. Once you click <strong>Install<\/strong>, the installation will take approximately 10 minutes depending on how many components you selected and your internet speed.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-227150 size-full aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen-Shot-2019-10-25-at-15.00.19.png\" alt=\"\" width=\"868\" height=\"623\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen-Shot-2019-10-25-at-15.00.19.png 868w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen-Shot-2019-10-25-at-15.00.19-300x215.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen-Shot-2019-10-25-at-15.00.19-768x551.png 768w\" sizes=\"(max-width: 868px) 100vw, 868px\" \/><\/p>\n<p>You\u2019ll be prompted to log in with your Microsoft account if this is your first time launching Visual Studio for Mac. I\u2019m going to log in now to activate my Enterprise license and make it easier to publish my Function to Azure.<\/p>\n<p>if you don\u2019t have an Azure or Microsoft account, you can get one totally <a href=\"https:\/\/azure.microsoft.com\/en-us\/free\/\">free\u202f<\/a>!\u202fThis also comes with over $200 free Azure credits to spend as you see fit.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-227149 size-full aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen-Shot-2019-10-25-at-15.02.27.png\" alt=\"\" width=\"832\" height=\"553\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen-Shot-2019-10-25-at-15.02.27.png 832w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen-Shot-2019-10-25-at-15.02.27-300x199.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen-Shot-2019-10-25-at-15.02.27-768x510.png 768w\" sizes=\"(max-width: 832px) 100vw, 832px\" \/><\/p>\n<p>Next, you can configure the IDE to work in a way that works for you through keyboard shortcuts. I\u2019m going to stick with Visual Studio for Mac shortcuts, but the bindings can be changed later <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/mac\/customizing-the-ide?view=vsmac-2019#key-bindings\">through the <strong>Preferences<\/strong> menu item<\/a>.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-227143 size-full\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/ide-tour-2019-keyboard-shortcut-1.png\" alt=\"\" width=\"1664\" height=\"1106\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/ide-tour-2019-keyboard-shortcut-1.png 1664w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/ide-tour-2019-keyboard-shortcut-1-300x199.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/ide-tour-2019-keyboard-shortcut-1-768x510.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/ide-tour-2019-keyboard-shortcut-1-1024x681.png 1024w\" sizes=\"(max-width: 1664px) 100vw, 1664px\" \/><\/p>\n<p>Visual Studio for Mac will then greet you with the Start Window. From here you can open an existing project from your machine, create a new project, or browse through a list of recent projects. However, before you go any further, you might want to make some changes so the IDE really works for you. This can all be done through the <strong>Preferences<\/strong> menu item (<strong>Visual Studio &gt; Preferences<\/strong>), similar to <strong>Tools &gt; Options<\/strong> in Visual Studio. Personally, I like to change to the dark theme and change my font to something bigger. I also like to show invisible characters on selection.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-227147 size-full\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen-Shot-2019-10-25-at-15.40.55.png\" alt=\"\" width=\"1072\" height=\"814\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen-Shot-2019-10-25-at-15.40.55.png 1072w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen-Shot-2019-10-25-at-15.40.55-300x228.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen-Shot-2019-10-25-at-15.40.55-768x583.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen-Shot-2019-10-25-at-15.40.55-1024x778.png 1024w\" sizes=\"(max-width: 1072px) 100vw, 1072px\" \/><\/p>\n<h2>Create a new project<\/h2>\n<p>Now that you have the IDE configured in a way that works for you, you\u2019re ready to start writing code! In the Start Window select <strong>New<\/strong> and then select <strong>Cloud &gt; General &gt; Azure Functions<\/strong>. In this example, I\u2019m just using the HTTP Trigger, but you can use any template. For more information on other templates, see the <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/mac\/azure-functions?view=vsmac-2019#available-function-templates\">Azure Functions documentation on docs.microsoft.com<\/a>.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-227145 size-full\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen-Shot-2019-10-25-at-15.49.10.png\" alt=\"\" width=\"1026\" height=\"770\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen-Shot-2019-10-25-at-15.49.10.png 1026w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen-Shot-2019-10-25-at-15.49.10-300x225.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen-Shot-2019-10-25-at-15.49.10-768x576.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen-Shot-2019-10-25-at-15.49.10-1024x768.png 1024w\" sizes=\"(max-width: 1026px) 100vw, 1026px\" \/><\/p>\n<p>Name your project, press <strong>Next<\/strong>, set the <strong>Authorization level<\/strong> to <strong>Anonymous<\/strong> and click <strong>Next<\/strong>. If you want to use Git for version control, you can set that <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/mac\/set-up-git-repository?view=vsmac-2019#publishing-a-new-project\">while creating the project<\/a>. Click <strong>Create<\/strong> to open your project in Visual Studio for Mac:<\/p>\n<p><img decoding=\"async\" class=\"wp-image-227142 size-full aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen_Shot_2019-10-25_at_16_00_37-3.png\" alt=\"\" width=\"1401\" height=\"801\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen_Shot_2019-10-25_at_16_00_37-3.png 1401w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen_Shot_2019-10-25_at_16_00_37-3-300x172.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen_Shot_2019-10-25_at_16_00_37-3-768x439.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/10\/Screen_Shot_2019-10-25_at_16_00_37-3-1024x585.png 1024w\" sizes=\"(max-width: 1401px) 100vw, 1401px\" \/><\/p>\n<p>Your solution and project will be loaded and should look like the image above. The most important parts of the IDE are described below:<\/p>\n<ol>\n<li><strong>Solution Pad<\/strong> \u00ad\u2013 The solution pad organizes all the projects, files, and folders in a solution. You can right-click on any item here to see its context actions allowing you to do things such as add references and publish to azure.<\/li>\n<li><strong>Code Editor<\/strong> \u2013 This is where you will likely spend most of your time. This editor shares the same code components with Visual Studio, but with a native macOS UI. For more information in the editor, see the <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/mac\/source-editor?view=vsmac-2019\">Source Editor<\/a> docs.<\/li>\n<li><strong>Debug\/Run Controls \u00ad<\/strong>\u2013 You can use the dropdown menus to set your run configuration, including the device or platform that you want to deploy to. When you\u2019re ready to go, press the triangular \u201cStart\u201d button.<\/li>\n<li><strong>Search Box \u2013 <\/strong>Search within your project, commands, or for a NuGet package from here.<\/li>\n<li><strong>Workspace \u2013 <\/strong>The workspace consists of a main document area (an editor, designer surface, or options file) surrounded by pads containing useful information for the task at hand.<\/li>\n<li><strong>Additional Pads <\/strong>\u2013 Visual Studio for Mac Pads are analogous to Panes in Visual Studio \u2013 they\u2019re used to show additional information, tools, and navigation aids. Depending on the type of task, different pads will be displayed automatically. For more information on using pads in your workspace, refer to the <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/mac\/customizing-the-ide?view=vsmac-2019#viewing-and-arranging-pads\">Customizing the IDE<\/a> documentation.<\/li>\n<\/ol>\n<p>You\u2019re now ready to start writing some code and creating something great!<\/p>\n<h2>Going further<\/h2>\n<ul>\n<li><a href=\"https:\/\/docs.microsoft.com\/visualstudio\/mac\/set-up-git-repository?view=vsmac-2019\">Setting up a git repository<\/a>.<\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/new-learning-resources-for-building-asp-net-core-apps-using-visual-studio-for-mac\/\">Resources on building ASP.NET Core apps using Visual Studio for Mac<\/a>.<\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/xamarin\/get-started\/quickstarts\/single-page?pivots=macos\">Creating a Xamarin.Forms app<\/a>.<\/li>\n<li>If you\u2019re more familiar with Visual Studio, see <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/mac\/vsmac-for-windows-users?view=vsmac-2019\">our guide on some of the main differences<\/a>.<\/li>\n<li>Make sure to keep up-to-date by <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/mac\/update?view=vsmac-2019\">updating<\/a>.<\/li>\n<\/ul>\n<p>Happy Developing! If you have any feedback or suggestions, please leave them in the comments below. You can also reach out to us on Twitter at\u00a0<a href=\"https:\/\/twitter.com\/visualstudiomac\">@VisualStudioMac<\/a>. For any issues that you run into when using Visual Studio for Mac, please\u00a0<a href=\"https:\/\/docs.microsoft.com\/visualstudio\/mac\/report-a-problem?view=vsmac-2019\">Report a Problem<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The first step is often the hardest. Do you find yourself with great ideas for the next awesome app, website, or game but you never get around to making that first leap into the unknown? Today, I\u2019ll help you with that! In this blog post, I\u2019m going to walk through how to get started with [&hellip;]<\/p>\n","protected":false},"author":574,"featured_media":227163,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[880,452],"class_list":["post-227141","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-get-started","tag-visual-studio-for-mac"],"acf":[],"blog_post_summary":"<p>The first step is often the hardest. Do you find yourself with great ideas for the next awesome app, website, or game but you never get around to making that first leap into the unknown? Today, I\u2019ll help you with that! In this blog post, I\u2019m going to walk through how to get started with [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/227141","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/574"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=227141"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/227141\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/227163"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=227141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=227141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=227141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}