Can I Download Visual Studio On Mac

  



FAQ

  • Connect to Turing
  • Enhance Windows Performance
  • If you face any issues in installing or using Visual Studio on Mac, you can post your query in Visual Studio Community, where we have support professionals and participating developers who are well equipped with the knowledge in Visual Studio for Mac.
  • Install Visual Studio for Mac behind a firewall or proxy server. To install Visual Studio for Mac behind a firewall, certain endpoints must be made accessible in order to allow downloads of the required tools and updates for your software. Configure your network to allow access to the following locations: Visual Studio endpoints; Next steps.

Don't think we can install VS IDE on Ubuntu but you can have Visual Sudio Code which is a pretty good editor. You can open almost any language, debug and install. The C# Editor in Visual Studio for Mac is Completely New. Roslyn, the.NET compiler platform, is.

System Requirements

  • To install Visual Studio on your Mac you need, minimumally:
    • an Intel Mac
    • 1 GB of Memory
    • 25 GB of free hard drive space
  • You can check the first two by clicking on the Apple icon on the top left and opening up 'About this Mac'.

Downloads

  • Download VirtualBox for yor Mac here
  • This downloads the file VirtualBox-3.2.8-64453-OSX.dmg.
  • Open this file and follow the installation instructions.

Create a Virtual Machine

  • Start VirtualBox
  • Create a new virtual machine by pressing the blue star labeled New
Windows



  • Press continue on the dialog box.
    • Name your machine: Win7-CS150
    • Operating System: Microsoft Windows
    • Version: Windows 7
  • Press continue on the dialog box.
  • In the Memory dialog, give your machine 1024 MB of RAM. You can type in the box on the right.
  • Press continue on the dialog box.
  • In the Virtual Hard Disk screen accept the defaults (Boot Hard Disk, Create new hard disk) and press continue.
  • In the Welcome to the Create New Virtual Disk Wizard press continue.
  • Select a Fixed-Size storage in the Hard Disk Storage Type and press continue.
  • Specify a 25 GB hard drive in the Virtual Disk Location andSize dialog. You can type in the box on the right. Press continue.
  • In the Summary dialog, press Done. Wait while it processes.This may take up to 30 minutes, depending on the speed of your machine.
  • Once this finishes, press Done.

Install Windows

  • You should now see Win7-CS150 listed on the left side on the
    VirtualBox Window. Select that virtual machine.
  • Put the Windows 7 Disk in the CD/DVD Drive

  • Click Storage on the right panel.
  • Select the Empty CD/DVD
  • In the right panel, choose Host Drive in the CD/DVD Device drop down box. and press OK.
  • With Win7-CS150 highlighed, press the green Start arrow at the top of
    the window.
  • This should start the Windows 7 Installer. TheInstaller will ask you various questions and take up to 2 hours toinstall Windows.
  • Once Windows completes the installation eject the Windows install disk.
  • While Windows is not running, Click Storage, the CD/DVD Icon, and set the CD/DVD Device to Empty.
  • The DVD may show up on the Mac desktop. If it does, drag it to the Trash to eject the DVD.

Install Visual Studio

  • Put in the Visual Studio Disk
  • While Windows is not running, Click Storage, the CD/DVD Icon, and set the CD/DVD Device to Host Drive.
  • Start Windows again.
  • The Visual Studio DVD should show up in Windows. If not,inside of Windows open My Computer, and click on the CD/DVDDrive. This should start the Visual Studio installer.
  • The install may take up to an hour. Once the installfinishes, eject the DVD as described above and Visual Studio shouldwork.
  • Bring both disks back to the instructor and you'll be given a Windows Key to activate Windows.

Activate Windows

  • Start Windows.
  • Open My Computer
    • Start Menu | Computer
  • Choose System Properties from the menu bar.
  • Click on the Active Windows Now link towards the bottom of the dialog box.
  • Provide the license key given to you by the CS Department. You need to be connected to the network for this to work.

Connect to Turing

  • Open My Computer
    • Start Menu | Computer
  • Choose Map network drive from the menu bar.
  • Choose a drive letter (any letter)
  • Folder: turing.cs.pacificu.eduStudents
  • Check Connect using different credentials
  • Press Finish
  • Supply your PUNetID for your user name and your Turing password.
  • The Turing drive should show up on the bottom of the computer dialog under Network Locations.

Update Windows

  • Open My Computer
    • Start Menu | Computer
  • Choose System Properties from the menu bar.
  • Select Windows Update in the lower left corner
  • Select any important or optional updates to install
  • Install Updates

Enhance Windows Performance

  • Open My Computer
    • Start Menu | Computer
  • Choose System Properties from the menu bar.
  • Select Performance Information and Tools in the lower left corner
  • Select Adjust visual effects on the left menu
  • Choose Adjust for best performance
  • Apply
  • Ok


Introduction

Microsoft’s Visual Studio product ever since the ’90s (was Visual C++ back then) has been my primary C++ IDE and I still love using it for the majority of my coding needs. Unfortunately it hasn’t been as convenient to use since after I switched to Macbook. I’m not a fan of boot camp, so I have been using virtualization software to run Visual Studio and the load on the system has depricated the experience.

A while ago Microsoft’s cross platform editor Visual Studio Code caught my eye so I gave it a go. Judging by my experience so far, VS Code will probably change my habit, at least for solo non-critical projects. It supports a variety of scripting languages out of the box, but how was the experience for native C++ development with Boost ? Try for yourselves.

Steps

Unlike Visual Studio, Visual Studio Code doesn’t support C++ language out of the box. Luckily, it has a great built-in marketplace. I will be using CMake as the building environment. This way, your code should compile and run on every platform without any need of modification whatosever. CMake is beautiful.

There is an official guide for C++ here which is not CMake oriented. I also had several problems in successfully running the code as described here.

Prerequisites

Download and install Visual Studio Code from official download site

Download and install CMake from official download site

You also need standard C++ libraries. Installing XCode on Mac or Visual Studio on Windows should take care of that. Otherwise you need to install them manually and define include directories in c_cpp_properties.json

C++ Extensions

  • Install C/C++ extension. This is an official Microsoft extension.
  • Install CMake extension.
  • Install CMake Tools extension. This enables usage of a set of CMake commands from inside VS Code.
  • I also installed Native Debugger.

Here is the official guide on extensions.

Creating Project

Visual Studio Code works with folders. Create a folder at your projects directory. Let’s say “HelloBoost”. Open the folder from VS Code’s File menu.

Download
  • Create new file (⌘N on Mac) and name it main.cpp.
  • Create another file and name it “CMakeLists.txt”

Json Files

Visual Studio Code configurations work with JSon files inside ./vscode subfolder of the project. In the end, we are going to have three JSon files in there.

  • First one is cmaketools.json Not going into details of CMake itself, but this is how it works on Visual Studio Code.

Open Command Palette, ⇧⌘P on Mac, or from View menu. Run >CMake: Build command. Select Debug.

This should create the following structure:

  • Second is c_cpp_properties.json, which determines the include directories. To create this file open Command Palette and run >C/Cpp: Edit Configurations. You may then edit this file to change include directories for each configuration for various operating systems. On Mac, we are assuming XCode is installed. This file looks like this;

Microsoft Visual Studio Free Download

  • launch.json is the final one which tells the debugger what to do. Open Command Pallete and run >Debug: Open launch.json. The dropdown will ask you to select environment. Select C++ (GDB/LLDB). This should create launch.json file which should look something like below;

All you need to do is change 'program' line to

'program': '${workspaceRoot}/build/HelloBoost',

I also change externalConsole to false since I prefer using VS Code’s built-in debugger console.

This is the final look on files.

C++ Debugging

Now everything you need to debug C++ code is set-up. From the Command Palette run >CMake: Build again. Once it is built, put a breakpoint (if you like) into your main function and hit F5. Debugger should hit your breakpoint, and you can move onto next line with F10 as you normally would on Visual Studio. VS Code’s built-in Debug Console should display “Hello World”.

Installing Boost

Download the appropriate Boost library from here.

You can use the prebuilt windows binaries or build it yourself for Mac. Here is how to do it on mac;

Download the .tar.gz, extract it, open a terminal (or use VS Code’s built-in terminal) and build it using Clang.

On terminal;

CMake with Boost

Edit CMakeLists.txt file and change it to;

Normally find_package should be able to find boost, but I included BOOST_ROOT directory in case it fails for you. Also set options to use static-multithread-release libraries. Most of the boost libraries are header only, but I added several non-header boost libraries just to show how it is done.You may also want to edit c_cpp_properties.json file and add boost include path ('/usr/local/boost-1.65.1/include', for me).

To make sure boost libraries are ready, change main.cpp file to;

Can't Download Visual Studio Code On Mac

Finally from the command palette, run >CMake: Clean, >CMake:Build and hit F5 to debug.

The End

If all is well and running, you can enjoy using Visual Studio Code as a decent IDE for some high performance development action with C++ & Boost. So far, I’m having a decent experience under Visual Studio Code and hope you feel the same.

Adios,

Ayhan