46

I'd like to have multiple copies of Xamarin Studio running simultaneously. Once one copy is running, double-clicking the Xamarin Studio icon in /Applications or clicking the currently-running Dock icon simply brings the current one to the foreground.

patridge
  • 26,385
  • 18
  • 89
  • 135
  • 10
    Not really a duplicate question. One asks how to open multiple instances of [MonoDevelop](http://monodevelop.com/@api/deki/files/201/=ss-main-window.png), Xamarin Studio's predecessor. This asks about [Xamarin Studio](https://xamarin.com/images/studio/screenshot1.jpg). Even though the answer is *currently* similar (& patridge maybe initially karma baited by immediately posting the derived answer), these are two different apps with trivial differences in the command line call -- and if Xamarin Studio changes in the future, *this* question would be on point, not the legacy MonoDevelop one. – ruffin Feb 01 '14 at 15:35
  • 1
    I'll have to agree with ruffin, I don't see this post as a duplicate and also believe the accepted answer here to be much more complete than the one in the linked thread. – LostBalloon Sep 03 '14 at 20:52

1 Answers1

75

Just want a tool?

If you just want to download something that does this for you, there is also the MS Solution Launcher or the older Xamarin Studio Launcher v3. Presumably, it does something similar to the script below but comes in a nice pre-built app with a distinct icon you just copy to your Application folder. As well, it can even be set up as a target for opening .sln files, allowing you to launch a new Xamarin Studio instance when you double-click a solution file.

Do it yourself

Just like described for MonoDevelop, you can force a new instance from the command line. As well, with an AppleScript side-trip described for MonoDevelop, you can get this in the form of an app icon.

The only difference between the MonoDevelop script and the new Xamarin Studio version is the requirement of an additional escape character since the new app has a space in its name.

  1. Open AppleScript Editor and enter the following (note the doubly-escaped space to get the space to the shell unmolested).

    do shell script "open -n /Applications/Xamarin\\ Studio.app/"

  2. Save with a name like "Xamarin Studio Launcher" and make sure to specify Application for the file format.

  3. Drag the icon to your dock.

Each run of this new "app" will launch a new instance of Xamarin Studio.

From there, as described in a comment from the MonoDevelop answer, you can use the Xamarin Studio icon instead of the default applet icon.

  1. Right-click the original Xamarin Studio app and choose "Show Package Contents".

  2. Navigate to /Contents/Resources/ and copy the XamarinStudio.icns file (or monodevelop.icns, for older XS releases).

  3. Right-click the launcher app you created and choose "Show Package Contents".

  4. Navigate to its /Contents/Resources/ and paste a new copy of that icns file.

  5. Delete the original applet.icns icon and rename the new monodevelop.icns to applet.icns to take its place.

Community
  • 1
  • 1
patridge
  • 26,385
  • 18
  • 89
  • 135
  • 4
    In the version of Xamarin Studio that I have (4.1.1), the icon "monodevelop.icns" in the original Xamarin Studio App is named "XamarinStudio.icns" now. – woutercx May 04 '13 at 06:28
  • 1
    @woutercx Thanks for the update; I hadn't even noticed. I updated the answer accordingly. – patridge May 06 '13 at 16:25
  • For a CLI launcher, edit your ~/.bashrc or ~/.zshrc and configure the following shortcut: alias xam = 'open -n /Applications/Xamarin\ Studio.app' – Geoffrey Huntley Mar 18 '15 at 00:39
  • For some reason this just un-minimizes my already running app – Jonathan Nov 18 '16 at 02:04