News

Visual Studio 2019 for Mac v8.9 Ships with .NET 6 Preview 1 Support

During its Ignite 2021 online event for IT pros and developers this week, Microsoft shipped Visual Studio 2019 for Mac v8.9, arriving with out-of-the-box support for .NET 6 Preview 1, which the company also released recently.

This support is key because .NET 6 is a hugely important milestone release for Microsoft, coming in November to finally finish off a huge, complicated unification effort designed to bring disparate components into one open source, cross-platform framework.

So .NET 6 will foster the creation of apps for desktop, web, cloud, mobile, gaming, IoT, AI and more running on Windows, Linux, Android, iOS, Mac/Mac Catalyst, Windows Arm64, iOS/tvOS and other targets. It does that by bringing formerly independent components like Xamarin under the umbrella (which provides the iOS/Android/macOS functionality).

Speaking of Xamarin, it will benefit from improvements in the new Mac IDE also, as Microsoft touted new XAML Hot Reload functionality, using the same exact verbiage it used in the Visual Studio 2019 v16.9 release that also shipped this week: "The new 'changes only' XAML Hot Reload mechanism makes it possible to update your running app's UI in real-time and see those changes reflected immediately without requiring the full page to be reloaded, and without having to save the file. 'Changes only' Hot Reload also supports the Live Visual Tree, so you can see the runtime UI hierarchy for your app and easily navigate to your XAML source code." XAML is typically used heavily in Xamarin.Forms, providing the ability to define UI interfaces in markup rather than code.

Besides VS for Mac developers being able to play around with the early .NET 6 bits, they also enjoy new functionality around Unity, a popular development platform primarily known for creating 2D and 3D multiplatform games.

Working with Unity Tests
[Click on image for larger view.] Working with Unity Tests(source: Microsoft).

The dev team said that in response to developer feedback, VS for Mac 2019 v8.9 can now discover, run and debug Unity tests. That is, if Unity 2020 or newer editions are used and developers update the Visual Studio Editor package to v2.0.7 or later with a Unity menu command.

Another Unity enhancement improves debugging.

"The Tools for Unity in Visual Studio for Mac includes a debugger optimized for Unity projects and it just got better, " said Jon Galloway, senior program manager, .NET Community Team, in a March 3 blog post. "We've looked at the common information developers care about when debugging Unity projects and made that simpler to find in the Locals tool window. Now, when inspecting code on a breakpoint you'll find all the objects in the current scene under the Active Scene node."

Quick Actions and Refactorings Menu
[Click on image for larger view.] Quick Actions and Refactorings Menu (source: Microsoft).

Quick Actions and Refactorings were also improved with a preview of a new menu that appears when developers apply suggested code fixes or code refactoring. "This change stems from work we've been doing to improve the accessibility of the IDE and we're experimenting to see how well this works for improving the overall experience for developers," Galloway said.

Along with that menu is new Quick Actions/Refactoring functionality:

  • Quick Info now displays compiler warning IDs or numbers for suppressions
  • There is now IntelliSense completion for preprocessor symbols
  • New QuicK Actions and Refactorings include:
    • Remove redundant equality
    • Convert regular and verbatim string to interpolated string
    • Remove unnecessary discard

Another new feature in the release is the XML Editor, part of the dev team's effort to swap out UI elements to macOS-native alternatives. Along with other updated windows -- including the Immediate Window and the Git Blame view -- the XML editor now provides multi-carat and ligature support, along with improved comment/uncomment support.

The new XML editor springs from an IDE revamp Microsoft undertook in 2018 in response to numerous developer complaints about stability and reliability in the Mac version. "Improving the typing performance and reliability is our single biggest focus area for Visual Studio 2019 for Mac," Microsoft said at the time. "We plan to replace most of the internals of the Visual Studio for Mac editor with those from Visual Studio."

Code Sharing
[Click on image for larger view.] Code Sharing (source: Microsoft).

Fixing that mess resulted in what Galloway this week called the modern editor experience in Visual Studio for Mac. In other words, the Mac/Windows IDEs share code for common features such as IntelliSense, text logic and language services.

In the 2019 post linked by Galloway above, Microsoft's Cody Beyer said: "Over the past year, the Visual Studio for Mac team updated the editors within the IDE to be faster, more fluent and more productive. We did this by building a macOS-native editor interface on top of the same editor backend as Visual Studio on Windows."

Solution Filtering
[Click on image for larger view.] Solution Filtering (source: Microsoft).

While developer feedback was used to improve Unity testing, another popular request was the ability to load specified projects when a Visual Studio solution is opened up, which is called solution filtering. "Loading a subset of projects in a solution decreases solution load, build, and test run time, and enables more focused review. We use solution filtering extensively in the .NET source code, and we think this will be really useful to you, too," Galloway said.

Release Highlights
[Click on image for larger view.] Release Highlights (source: Microsoft).

Much more information on all of the above and many other new features, fixes and enhancements can be found in the release notes, where highlights are presented as shown in the nifty little graphic above.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube