Now we have two Visual Studio versions (Visual Studio for Mac, Visual Studio Code) that can directly install on the Mac (macOS), refer to your description, it looks like you installed the Visual Studio for Mac, it is a developer environment optimized for building mobile and cloud apps with Xamarin and.NET. So this Visual Studio for Mac is Xamarin studio repackaged as Visual Studio with tools and compiler/transpilers for.NET Core and the rest so you can do your usual stuff (in any other language) + apps on iOS/Mac/Android with C# with the Xamarin magic.
Installation
- Download Visual Studio Code for macOS.
- Double-click on the downloaded archive to expand the contents.
- Drag
Visual Studio Code.app
to theApplications
folder, making it available in theLaunchpad
. - Add VS Code to your Dock by right-clicking on the icon to bring up the context menu and choosing Options, Keep in Dock.
Launching from the command line
You can also run VS Code from the terminal by typing 'code' after adding it to the path:
- Launch VS Code.
- Open the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)) and type 'shell command' to find the Shell Command: Install 'code' command in PATH command.
- Restart the terminal for the new
$PATH
value to take effect. You'll be able to type 'code .' in any folder to start editing files in that folder.
Note: If you still have the old code
alias in your .bash_profile
(or equivalent) from an early VS Code version, remove it and replace it by executing the Shell Command: Install 'code' command in PATH command.
To manually add VS Code to your path, you can run the following commands:
Start a new terminal to pick up your .bash_profile
changes.
Note: The leading slash is required to prevent
$PATH
from expanding during the concatenation. Remove the leading slash if you want to run the export command directly in a terminal.
Touch Bar support
Out of the box VS Code adds actions to navigate in editor history as well as the full Debug tool bar to control the debugger on your Touch Bar:
Mojave privacy protections
After upgrading to macOS Mojave version, you may see dialogs saying 'Visual Studio Code would like to access your {calendar/contacts/photos}.' This is due to the new privacy protections in Mojave and is not specific to VS Code. The same dialogs may be displayed when running other applications as well. The dialog is shown once for each type of personal data and it is fine to choose Don't Allow since VS Code does not need access to those folders. You can read a more detailed explanation in this blog post.
Updates
VS Code ships monthly releases and supports auto-update when a new release is available. If you're prompted by VS Code, accept the newest update and it will get installed (you won't need to do anything else to get the latest bits).
Note: You can disable auto-update if you prefer to update VS Code on your own schedule.
Preferences menu
You can configure VS Code through settings, color themes, and custom keybindings and you will often see mention of the File > Preferences menu group. On a macOS, the Preferences menu group is under Code, not File.
Next steps
Once you have installed VS Code, these topics will help you learn more about VS Code:
- Additional Components - Learn how to install Git, Node.js, TypeScript, and tools like Yeoman.
- User Interface - A quick orientation around VS Code.
- User/Workspace Settings - Learn how to configure VS Code to your preferences settings.
Common questions
Why do I see 'Visual Studio Code would like access to your calendar.'
If you are running macOS Mojave version, you may see dialogs saying 'Visual Studio Code would like to access your {calendar/contacts/photos}.' This is due to the new privacy protections in Mojave discussed above. It is fine to choose Don't Allow since VS Code does not need access to those folders.
Back in November, Microsoft announced Visual Studio for Mac, releasing its first preview, and promising to add more features in the months ahead. Today, alongside the general release of Visual Studio 2017, Microsoft also rolled out Visual Studio for Mac Preview 4.
'Visual Studio for Mac Preview 4 brings lots of new features, including updates to the Xamarin and .NET Core workloads,' Xamarin's Miguel de Icaza explained today. 'Preview 4 brings expanded project templates for .NET Core, as well as support for the beautiful new MSBuild .NET Core project format. The Xamarin workload has been updated to include a new iOS Audio Unit wizard, Android binding project operations, and other mobile tooling improvements. This preview also includes NuGet 4.0 support and tons of other bug fixes and performance improvements.'
As in Visual Studio 2017, Visual Studio for Mac Preview 4 also brings enhancements to the Xamarin.Forms Previewer, along with new and updated development templates. 'We have overhauled all of our iOS, watchOS, and tvOS templates with a flurry of new extensions to make development a breeze,' Miguel said.
There are new Connected Services with simplified access to cloud capabilities, and you'll also find the latest SDKs for all major platforms, including Android 7.1 Nougat, iOS 10.2 and watchOS 3.
Here's an overview of some of the other key changes in Visual Studio for Mac Preview 4:
General
- This release includes all the new features and fixes included in Xamarin Studio 6.3 (release notes).
- MSBuild is now the default build engine instead of xbuild.
- Portable and embedded compiler options can now be specified in project options.
- Various optimizations, memory usage and performance improvements across the IDE.
.NET Core Support
- Integrated unit testing support for running and debugging tests with the Visual Studio Test Platform that is included with the .NET Core SDK.
- Integrated the .NET Core templating engine and project templates.
- F# .NET Core projects are now supported.
- Support for migrating projects project.json/xproj to csproj.
- References and Packages folders have been removed from the Solution window. This information is shown in the Dependencies folder under the Assemblies, Projects, Packages and SDK folders.
- Allow multiple NuGet packages to be select and removed in one step for .NET Core projects.
- A message dialog is now displayed if .NET Core SDK is missing or unsupported with a download link.
- Added ASP.NET Core run configuration settings in project options. App url, launch url and enabling/disabling launching the browser can now be configured.
Bug Fixes
- Fixed license acceptance dialog not shown for .NET Core projects
- Fixed crash at startup if the ~/Library/Preferences/Xamarin directory is owned by another user
- Base class constructor tooltip does not contain all constructor definitions
- Fixed Find References of All Overloads not returning all items
- Fixed language selection for recent templates not showing correct lanuage used
- Fixed quick task drawing glitch
- Fixed incorrect working directory used when running .NET Core projects
- Fixed Lamba argument renaming shows code completion items
- Fixed disabled breakpoints being hit when debugging .NET Core project
- Fixed restore errors after renaming project file
- Fixed unevaluated MSBuild expression being shown in the project options as the compiler's Define Symbol for .NET Core projects.
- Fixed potential race condition on saving an MSBuild project
- Fixed Description not saved in .NET Core project file if modified
- Fixed RootNamespace to be updated from project options for .NET Core projects
- Refresh NuGet packages after target framework changed in project options
- Fixed target framework changes made in project options not saved
- MSBuild project option is no longer shown for .NET Core projects
- Show correct target frameworks in project options for .NET Core projects
- Remove extra metadata saved with ProjectReferences
- Fixed app freezing whilst attempting to debug on iOS Simulator
- Fixed intellisense fails when referencing an iOS binding project
- Fixed scrolling to type when using Go To Definition with Assembly Browser
- Fixed crash on adding breakpoint to any line of Main.axml file
- Hide diagnostics when severity is hidden.
- Fixed formatting on pasting large blocks of unformatted code
- Fixed crash when using the Assembly Browser
- Fixed library reference alias change not reflected in the type system
- Tabs to Spaces defaults to true for F# projects
- Fixed code completion on standalone files
- Fixed open statements greyed out that contain operators
- Fixed floating versions not handled in package references
- Fixed document is not part of the workspace exception
- Item groups now merged in F# projects for Visual Studio compatibility
- Increase length of strings shown in Watch window
- Fixed copying the contents of a debugger expression does not copy just the value
- Fixed crash on opening .cs file in Hex Editor
- Fixed build error after referencing another .NET Core project
- Restore after modifying project references
- Fixed Clean failures not reported on Rebuild
- Fixed broken code completion after referencing a project
- Fixed main toolbar switches back from Release to Debug on adding/removing a file
- Fixed not being able to reference .NETStandard projects from .NET Core projects
- Fixed hovering over constructor not showing resolved constructor overload
- Fixed xmlns being added to .NET Core SDK projects
- Fixed PackageReference elements added with a Version element instead of using an attribute
You can also view the full release notes on the Xamarin site.
Visual Studio For Mac Review
Visual Studio For Mac Review 2018
Visual Studio for Mac Preview 4 is available to download now.