Hello friends. Hope you have read the last article on Visual Studio Online 2019. In this post we will look at 7 reasons to check out Visual Studio 2019 for Mac. Also at the end of the post we will see how to install the same.
The Visual Studio for Mac team released Visual Studio 2019 for Mac version 8.4 on Jan 2020. Majority of the features they implemented were among the most popular requests from the community. Below are the 7 important features.
7 important features of Visual Studio 2019 for Mac
- Editor enhancements
- ASP.NET Core Blazor Server applications development and publish support
- ASP.NET Core Scaffolding enabled
- NuGet Pack support for distributing .Net Core library projects
- IDE support for assistive technologies
- Support for .NET Core 3.1
The Visual Studio for Mac editor has support for completion, IntelliSense and colorization schemes for .razor files. The colorization schemes are created resemble more with the Windows Visual Studio 2019 experience. Also preview boxes are there for any code changes that you do for code analysis fixes or bug fixes.
ASP.NET Core Blazor Server applications development and publish support
Based on the feedback, support is also added for development of ASP.NET Core Blazor Server applications. The Blazor framework is for creating client-facing web UI design using .NET and includes the following features
- App logic sharing across client server
- Development using a set of common and easy-to-use feature-rich languages, tools and frameworks
- Use of existing .NET libraries
Since it uses open web standards, Blazor requires no extra plug-ins hence whatever applications you develop they should work in all major current web browsers, desktop or devices.
You can create new Blazor Server as New Project > Blazor Server App project template
There is support for razor files with auto-complete and different color schemes in the editor. Also Blazor applications can be directly published to Azure App Service using Visual Studio for Mac provided you have a free Azure account.
ASP.NET Core Scaffolding enabled
One of the suggestions received by the Mac team was to add ASP.NET Core Scaffolding to Visual Studio for Mac. Hence now scaffolding for ASP.NET Core projects is also added in the mix. For those who are not aware, scaffolding helps in simplifying and speeding up ASP.NET Core application development by spawning a boilerplate code which is required for common tasks such as generating quick CRUD operation templates.
To access this feature follow
Project context menu > Add > New Scaffolding. The item on which you right-clicked will be the folder where the files will be generated and added.
Below is an example taken from the Microsoft website to show a wizard with steps for adding new scaffolding. This helps in generating CRUD code into our project. The example is ASP.NET Core samples project i.e. a movie database application which demonstrates how to enable scaffolding.
On clicking Finish, the required NuGet packages will be added to our project and files will be generated based on the scaffolding template that we chose.
NuGet Pack support for distributing .Net Core library projects
If you are a library/component developer, you can easily create a NuGet package from a .NET Core library project by right-clicking a project then selecting Pack in Visual Studio for Mac.
After selecting the Pack option, a NuGet package (.nupkg) file will be generated. You can view the same in the output folder.
IDE support for assistive technologies
The following improvements are implemented in Visual Studio for Mac 8.4. Note that this list is not complete but an overview of major items
- Text and icons higher color contrast ratios
- Increased accuracy of Voice Over navigation and dictation
- Rewritten IDE components from scratch to increase accessibility
Support for .NET Core 3.1
Visual Studio for Mac now supports .NET Core 3.1. We would be able to create, build, debug and publish .NET Core 3.1 applications.
With Visual Studio for
Mac you can develop in below languages
Installing Visual Studio 2019 for Mac
The following products support the minimum system requirements
- Visual Studio Enterprise 2019 for Mac.
- Visual Studio Professional 2019 for Mac.
- Visual Studio Community 2019 for Mac.
- MacOS High Sierra 10.12 or above.
- Xcode 10.0 or above. (To build Xamarin apps for iOS or macOS)
- Apple ID since it is required for installing and signing into Xcode.(To build Xamarin apps for iOS or macOS)
.NET Core SDK 2.2 is
required to use .NET Core projects and features.
Xamarin.Android requires the 64-bit Java Development Kit (JDK)
Xamarin.iOS requires Apple’s Xcode IDE and iOS SDK
Xamarin.Forms can target both Android and iOS platforms
Download the installer from https://visualstudio.microsoft.com/vs/mac/
After downloading above click VisualStudioforMacInstaller.dmg and double-click the arrow logo
After above step the installer with do a systems check.
Click ‘Continue’ in the next step to agree with the license terms.
In the next screen, select the components you wish to install.
After selecting the components of your choice, press ‘Install’. The installer will prompt for elevated privileges for installation and will show the installation progress.
Once installation is complete, you will be prompted for personalized settings and choosing the key bindings by signing in.
Currently, offline installation is not available for Visual Studio for Mac.
Visual Studio 2019 for Mac known issues
- On pressing the backspace key, it does not delete a watch from the Watches tab.
- When adding a new file using the Razor Component template, the project does not build. The issue is caused by unneeded elements in the .csproj file. Hence remove elements referencing the new file from the project file, and the project should build successfully.
- If you are working on ASP.NET Core projects and if .NET Core SDK 3.1 Preview is installed, then https connections may be refused. In the browser certificate errors are shown or the browser itself may not launch when using docker. A workaround for this is to run the following commands in the terminal
dotnet dev-certs https -clean
dotnet dev-certs https -trust
When an exception occurs, an exception pop up appears. You can select the View Details to view more details
The Show Details dialog provides detailed information for the exception
Viewing logs in Visual Studio for Mac
Browse to Help > Open Log Directory
In this post, we learnt about 7 reasons to check out Visual Studio 2019 for Mac version 8.4 and why you should check it out. If you want to have a look at these new features and enhancements in-depth visit https://visualstudio.microsoft.com/vs/mac/