56

I wish to open multiple instances of VS for Mac. I used to be able to do this with Xamarin studio using the Xamarin launcher.

How to do this with VS for Mac?

knocte
  • 16,941
  • 11
  • 79
  • 125
Gobi M
  • 3,243
  • 5
  • 32
  • 47
  • 3
    The guy who created the Xamarin Launcher has made his application compatible for Visual Studio for Mac, you can get it [here](https://github.com/Redth/MSSolutionLauncher). I've not tried it yet but I've been using his Xamarin Launcher and it works pretty well so this should be what you're looking for :-) – Matthew Blott Jan 31 '17 at 10:24
  • 1
    3 years later, Microsoft has done something about this: https://stackoverflow.com/a/55015832/544947 (no need for external hackery anymore) – knocte Mar 06 '19 at 09:17

12 Answers12

112

Open a terminal window, and then issue the following command:

open -n -a "Visual Studio"
knocte
  • 16,941
  • 11
  • 79
  • 125
moke
  • 2,611
  • 2
  • 18
  • 16
36

Alright, at last!, Microsoft has just implemented the simplest solution of all in Visual Studio 2019: just right click on its icon on the launch bottom bar, and choose "New instance":

feature screenshot

See the details of the feature in the release notes of VS2019 for Mac Preview.

knocte
  • 16,941
  • 11
  • 79
  • 125
16

There is also the option of opening multiple solutions in the same Visual Studio instance.

  1. From Recent list: Hold Ctrl while clicking the solution name
  2. From File -> Open: Single click the .sln file, click Options and uncheck Close Current Workspace.

Credit: https://www.jimbobbennett.io/opening-multiple-solutions-in-visual-studio-for-mac/

Note. the active project(For run/debug) changes depending on which file you have marked/selected/editing.

Isaack Rasmussen
  • 457
  • 4
  • 11
  • Can't believe this hasn't gotten any upvotes. Amazing trick - I didn't know it was possible to have multiple solutions open at the same time in the same Solution explorer pane! – HenningK Feb 09 '18 at 08:11
  • Upvoting this as it was exactly what I needed – Mick Walker Mar 05 '18 at 20:09
  • 1
    Probably a reason for no upvote is, from what I can tell, by doing this action it adds the solution to the current workspace not open a new instance of visual studio. – koderiter Aug 02 '18 at 00:00
6

If you don't want to daily search for this specific terminal command, create a script as below:

  1. Open "Script Editor" in Mac
  2. Paste: do shell script "open -n -a 'Visual Studio'"
  3. Save this file somewhere (On Desktop)
  4. Whenever need to launch another instance, simply open this file and click on "Run the Script" button

Screenshot Here

MilanG
  • 2,551
  • 16
  • 24
3
  • Visual Studio Code
  • Version: 1.39.2

enter image description here

Giang
  • 3,553
  • 30
  • 28
1

Official documentation: How do I open multiple solutions or instances of Visual Studio for Mac?

Open a second solution inside a single instance

To open a second solution alongside your first solution, use the following steps:

  1. With your first solution already open, select File > Open.
  2. Select the solution and press the Options button.
  3. Uncheck the Close Current Workspace button: work space
  4. Press the Open button to open the second solution in the Solution Pad.

Alternatively, if you have recently opened the solution, you can do the following:

  1. Go to the File > Recent Solutions menu item: screenshot of Recent Solutions menu
  2. Hold down the Ctrl key and select the solution. This combination opens the second Solution in the Solution Pad

Open a second instance

To open a second instance of Visual Studio for Mac, open the Terminal application and enter

open -n "/Applications/Visual Studio.app"
zwcloud
  • 4,546
  • 3
  • 40
  • 69
0

I am using MSSolutionLauncher for opening multiple instances of Visual studio for Mac. The github page of the project is Here. Download latest release and double click to unzip. Now keep the app in desktop and click on it to open new instance of the Visual studio for mac as many times as you want.

EDIT

Starting from Visual Studio for Mac 2019, MSSolutionLauncher is not required. Keep the VSMac Shortcut in Dock. Right Click the Dock Icon and select New Instance.

Paramjit
  • 760
  • 8
  • 25
  • it stopped working with the latest VS for Mac release, unable to open any project withing a solution. – Mando Jun 12 '18 at 23:17
  • I am using the latest version of VS for Mac and the MSSolutionLauncher is working fine. Never invoke the IDE directly. double click the solutionLauncher for opening new instance. – Paramjit Jun 14 '18 at 05:13
0

Based on @moke and @MilanG answers, I created a bash file on my desktop with this content:

#!/bin/bash

open -n -a "Visual Studio"

osascript -e 'tell application "Terminal" to close first window' & exit

I named this file "Visual Studio". Then I made the file executable on double-click by following this procedure https://stackoverflow.com/a/5126052/3819725

As a last step, I re-used the Visual Studio icon for the bash file on my desktop so that I instantly know what to click on. I did this:

  1. Right click on the bash file you just created and select "Get Info". An information panel opens with an icon in the top-left corner.
  2. Open a new Finder window and position it next to the "Get Info" panel you just opened
  3. In the Finder window, navigate to "Applications" and select "Visual Studio" from the list of applications.
  4. Right click on the "Visual Studio" application icon and select: "Show Package Contents".
  5. Navigate to "Contents" -> "Resources" and select the "VisualStudio.icns" file.
  6. Drag this file to the icon in the top-left corner of the "Get Info" window you opened in step (1)

Voila - you now have a clickable desktop icon with the visual studio icon that opens a new instance of Visual Studio for Mac and does not leave a Terminal window open.

Guppie70
  • 173
  • 2
  • 8
0

Clone the Application!

Open Finder
Navigate To Applications
Select Visual Studio
Edit > Copy
Edit > Paste
Open the copy
Ryan Williams
  • 1,465
  • 15
  • 19
0

Posted my solution here:

https://stackoverflow.com/a/62831584/2621976

just do

open -a "Visual Studio" \
"path to first sln" \ 
"path to second sln" \
...
quAnton
  • 776
  • 6
  • 10
-1

This is VS code (not VS4Mac as per comment below). But found this forum in my own search so might be useful.

open -n -a "Visual Studio" gave error "Can't Find Application Visual Studio", so I just did:

  1. Open a visual studio project

  2. To get another, right click (two finger press) on visual studio docked icon

  3. Click "New Window", and now you have two instances

enter image description here

Kevin Danikowski
  • 4,620
  • 6
  • 41
  • 75
-1

Just hit Shift+Command+N (Or go to "File > New Window" and it will open a new window. You can then drag files from one to the other.

I was trying to do the same thing which led me here. I didn't have luck with the highest-rated solution and then the above occurred to me. Unless I'm missing something more to the original request? Seems like the most obvious solution.