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.
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 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."
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."
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.
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.