For Mac Visual Studio
Hands On Microsoft this week opened the gates on Visual Studio for Mac 2019 8.3, a flexible development environment for .NET, and The Reg can give you the lowdown on some of the new features.
But first, let's see how the Microsofties got here. Redmond has three coding tools under the Visual Studio brand, all of which have different ancestries.
Visual Studio on Windows supports development not only in .NET languages but also C++, Python, JavaScript and Node.js, and cross-platform mobile development using Xamarin, Apache Cordova or C++. Depending on which edition you have, you also get SQL Server database tools, test and coverage frameworks, Microsoft Office and SharePoint development, R for data science work, built-in Docker tools and more.
I am having the EXACT same problem! Zebra printer driver for mac no dithering. I'm using a Mac and the same Zebra printer.
Xamarin is a cross-platform .NET framework designed mainly for iOS and Android, but also with support for macOS applications. A confusing thing is that Xamarin does not use .NET Core, though it does support the .NET Standard 2.1 specification in its latest version. See here for guidance.
Xamarin evolved from the open-source Mono framework, an implementation of .NET for Windows and Linux. Mono had its own IDE, called MonoDevelop, which unlike Visual Studio was originally written entirely in C#. Xamarin adapted MonoDevelop to become Xamarin Studio. When Microsoft acquired Xamarin in 2016, Xamarin Studio became a Mac-only IDE and was renamed Visual Studio for Mac. You can still get MonoDevelop for Mac, Windows and Linux, though the Mac download is now Visual Studio for Mac, and on Windows you have to build it from source.
Visual Studio Code (VS Code) is a cross-platform editor built with the Electron framework, using Node.js and the Chromium browser engine Blink. VS Code was first previewed in 2015 and has been a remarkable success, now ranking as the top development environment on the popular coding Q&A site StackOverflow by a huge margin. Although lightweight in comparison to Visual Studio, VS Code straddles the boundary between an editor and an IDE, with debugging support and a rich range of extensions.
Visual Studio 2019 for Mac Preview was launched as a separate preview, allowing you to continue to work with your Visual Studio 2017 for Mac install side-by-side. Now that Visual Studio 2019 for Mac has been released, you can now safely remove the Visual Studio 2019 for Mac Preview application.
Following the acquisition, Microsoft has been working on sharing some of its Visual Studio for Windows technology with the Mac version. This goes alongside the development of the cross-platform .NET Core, which has allowed code sharing between Mono and .NET Core, though Mono has not been completely replaced. It is still the case that Visual Studio for the Mac is a very different thing from Visual Studio for Windows.
What can Visual Studio for Mac do?
VS Mac is primarily for Xamarin development. The majority of Xamarin developers code applications for iOS and Android, and there are two different approaches to this.
Xamarin.iOS and Xamarin.Android let you write non-visual code in C# while using native tools to build the UI, Xcode for iOS or a built-in Android designer for Android.
Xamarin Forms is a cross-platform GUI framework. You design the user interface with XAML and build for your chosen target platforms.
You can also go beyond iOS and Android. Xamarin.Mac is for Cocoa applications and uses a similar model to Xamarin.iOS. Xamarin Forms can also target Windows UWP (Universal Windows Platform) and, in preview, macOS.
There is also steadily improving support for games development with Unity.
A glance at the Xamarin forums gives a crude guide to usage. Xamarin Forms has more than double the activity of any other section (over 51,000 threads). Xamarin.Android 34,000, Xamarin.iOS 21,000, and relatively low activity elsewhere – 343 threads for Xamarin.Mac, for example.
Xamarin Forms Mac support seems to be moribund; it was announced in 2017 but the platform status here was last updated in May 2018 and remains incomplete.
Visual Studio for the Mac also supports ASP.NET Core development using Razor, Angular or React.js, and serverless with Azure Functions.
Under the Vulture's Claw
A cross-platform Xamarin Forms app running on iOS and Android
We installed VS Mac on a 2018 Mac Mini. The installer pulls down the Android SDK for you, but you have to install Xcode separately. All straightforward, but there is a puzzle about .NET Core. Version 3.0 is installed automatically, and you can create ASP.NET Core apps, but when you go to create a mobile app, the option to create an ASP.NET Core API back end is disabled because it 'requires an ASP.NET Core installation'.
The look and feel of the IDE is different from Visual Studio on Windows, as you would expect from the product history. It feels more basic and less refined, and has only a fraction of the features of its similarly named cousin.
There is no visual designer for Xamarin Forms, but there is a visual preview. Unfortunately, this did not work for iOS on our very simple demo app, showing instead a MonoTouch exception message. But the app itself worked fine on both Android and iOS. The IDE did crash once or twice but with no loss of work.
Another experiment was to create a Xamarin.Mac application and edit the generated storyboard, which defines the user interface using Xcode. This worked perfectly.
What's new?
VS Mac 8.3 supports .NET Core 3 and C# 8.0, and Xamarin now supports Android 10, Xcode 11 and iOS 13.
One of the big new features, though in preview, is XAML hot reload in Xamarin Forms. This lets you amend the XAML file defining your UI, save it, and see the changes instantly in the app running on an emulator or device.
The Visual Studio Mac native editor shares code with Visual Studio on Windows
The C# editor in VS Mac was rewritten by the Visual Studio team after the Microsoft acquisition. It now has what Microsoft calls a 'fully native UI', raising the interesting question of how much of the old MonoDevelop code, which used cross-platform Gtk#, remains in VS Mac. The new native editor was fully released in July, but VS Mac 8.3 now supports web editing (JavaScript, TypeScript, HTML, CSS and more). This lets Microsoft share more features between Visual Studio on Windows and VS Mac, including improved IntelliSense. You also get proper bidirectional text support and a natty feature called multi-caret editing that lets you overtype multiple regions of selected text simultaneously.
There is a new dialog for the NuGet package manager, but care is needed because not all NuGet packages will work on the Mac.
These are highlights; the full list of what's new is here.
Observations
Microsoft has two successful Visual Studio development tools, and then there is VS Mac, which is important only for Mac-based Xamarin developers. Xamarin.Mac and Xamarin Forms targeting macOS are both interesting for .NET developers wondering how to get their Windows apps onto a Mac, but both are neglected relative to iOS and Android. If you want to develop for ASP.NET Core you would be better off with Visual Studio on Windows, and probably better off with VS Code with its much larger community and rich extension support. Strategically, it might make sense for Microsoft to invest in making VS Code more useful for Xamarin developers. All that said, VS Mac is substantially improved and the price is right: even the free Community edition is a capable tool. ®
Sponsored: M3 - The ML, AL and Analytics Conference from The Register
-->Visual Studio for Mac is a .NET integrated development environment on the Mac that can be used to edit, debug, and build code and then publish an app. In addition to expected features, such as a standard editor and debugger, Visual Studio for Mac includes compilers, code completion tools, graphical designers, and source control to ease the software development process.
Visual Studio for Mac supports many of the same file types as its Windows counterpart, such as .csproj
, .fsproj
, or .sln
files, and supports features such as EditorConfig, meaning that you can use the IDE that works best for you.Creating, opening, and developing an app will be a familiar experience for anyone who has previously used Visual Studio on Windows. In addition, Visual Studio for Mac employs many of the powerful tools that make its Windows counterpart such a powerful IDE. The Roslyn Compiler Platform is used for refactoring and IntelliSense. Its project system and build engine use MSBuild, and its source editor uses the same foundation as Visual Studio on Windows. It uses the same debugger engines for Xamarin and .NET Core apps, and the same designers for Xamarin.iOS and Xamarin.Android.
What can I do in Visual Studio for Mac
Visual Studio for Mac supports the following types of development:
- ASP.NET Core web applications with C#, F#, and support for Razor pages, JavaScript, and TypeScript
- .NET Core console applications with C# or F#
- Cross-platform Unity games and applications with C#
- Android, iOS, tvOS, and watchOS applications in Xamarin with C# or F# and XAML
- Cocoa desktop apps in C# or F#
This article explores various sections of Visual Studio for Mac, providing a look at some of the features that make it a powerful tool for creating these applications.
IDE tour
Visual Studio for Mac is organized into several sections for managing application files and settings, creating application code, and debugging.
Getting started
When you start Visual Studio 2019 for Mac, new users will see a sign-in window. Sign-in with your Microsoft account to activate a paid license (if you have one) or link to Azure subscriptions. You can press I'll do this later and sign in later via the Visual Studio > Sign in menu item:
You'll then be given the option to customize the IDE by selecting your preferred keyboard shortcuts: Visual Studio for Mac, Visual Studio, Visual Studio Code, or Xcode:
Signed-in users will see the new start window, which shows a list of recent projects, and buttons to open an existing project or create a new one:
Solutions and projects
The following image shows Visual Studio for Mac with an application loaded:
The following sections provide an overview of the major areas in Visual Studio for Mac.
Solution pad
The Solution Pad organizes the project(s) in a solution:
This is where files for the source code, resources, user interface, and dependencies are organized into platform-specific Projects.
For more information on using Projects and Solutions in Visual Studio for Mac, see the Projects and Solutions article.
Assembly references
Assembly references for each project are available under the References folder:
Additional references are added using the Edit References dialog, which is displayed by double-clicking on the References folder, or by selecting Edit References on its context menu actions:
For more information on using References in Visual Studio for Mac, see the Managing References in a Project article.
Dependencies / packages
All external dependencies used in your app are stored in the Dependencies or Packages folder, depending on whether you are in a .Net Core or Xamarin.iOS/Xamarin.Android project. These are usually provided in the form of a NuGet.
NuGet is the most popular package manager for .NET development. With Visual Studio's NuGet support, you can easily search for and add packages to your project to application.
To add a dependency to your application, right-click on the Dependencies / Packages folder, and select Add Packages:
Information on using a NuGet package in an application can be found in the Including a NuGet project in your project article.
Source Editor
Regardless of if you're writing in C#, XAML, or Javascript, the code editor the shares the same core components with Visual Studio Windows, with an entirely native user interface.
This brings some of the following features:
- Native macOS (Cocoa-based) user interface (tooltips, editor surface, margin adornments, text rendering, IntelliSense)
- IntelliSense type filtering and 'show import items'
- Support for native text inputs
- RTL/BiDi language support
- Roslyn 3
- Multi-caret support
- Word wrap
- Updated IntelliSense UI
- Improved find/replace
- Snippet support
- Format selection
- Inline lightbulbs
For more information on using the Source Editor in Visual Studio for Mac, see the Source Editor documentation.
To keep tabs visible at all times, you can take advantage of pinning them. This ensures that every time you launch a project, the tab you need will always appear. To pin a tab, hover over the tab and click the pin icon:
Refactoring
Visual Studio for Mac provides two useful ways to refactor your code: Context Actions, and Source Analysis. You can read more about them in the Refactoring article.
Debugging
Visual Studio for Mac has debuggers that support .NET Core, .NET Framework, Unity, and Xamarin projects. Visual Studio for Mac uses the .NET Core debugger and the Mono Soft Debugger, allowing the IDE to debug managed code across all platforms. For additional information on debugging, visit the Debugging article.
Hp deskjet 850c driver for mac. The debugger contains rich visualizers for special types such as strings, colors, URLs, as well as sizes, coordinates, and bézier curves.
For more information on the debugger's data visualizations, visit the Data Visualizations article.
Version control
Visual Studio for Mac integrates with Git and Subversion source control systems. Projects under source control are denoted with the branch listed next to the Solution name:
Files with uncommitted changes have an annotation on their icons in the Solution Pane, as illustrated in the following image:
For more information on using version control in Visual Studio, see the Version Control article.