Install Visual Studio for Mac preview (the easy way)

If you are interested in evaluating the new Visual Studio for Mac (Preview) from Microsoft, the easiest way to install Visual Studio on your Mac is to simply open up a terminal window and execute the following command:

$ curl -s | sh

This will download the disk image, execute the installer and remove the disk image when the installation has finished.

If you want to preview the script before executing it (which I strongly encourage) navigate to the url or choose to Read more below.

The full script content (with comments):


# Create and open a temporary folder
mkdir -p ~/.gmmr/temp
cd ~/.gmmr/temp

# Download Visual Studio for Mac preview from Microsoft
curl -L -o ~/.gmmr/temp/VisualStudioforMacPreviewInstaller.dmg ""

# Mount the downloaded disk image
hdiutil mount -nobrowse ~/.gmmr/temp/VisualStudioforMacPreviewInstaller.dmg

# Execute the VS for Mac installer (and wait for it to finish)
open --wait-apps "/Volumes/Visual Studio for Mac Preview Installer/Install Visual Studio for Mac"

# Unmount the VS for Mac disk image
hdiutil unmount "/Volumes/Visual Studio for Mac Preview Installer"

# Remove the temporary disk image
rm ~/.gmmr/temp/VisualStudioforMacPreviewInstaller.dmg

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s