How do I launch multiple instances of Xamarin Studio on the Mac (Visual Studio for Mac)? [duplicate] - macos

This question already has answers here:
How can I launch multiple instances of MonoDevelop on the Mac?
(10 answers)
Closed 9 years ago.
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.

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.
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/"
Save with a name like "Xamarin Studio Launcher" and make sure to specify Application for the file format.
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.
Right-click the original Xamarin Studio app and choose "Show Package Contents".
Navigate to /Contents/Resources/ and copy the XamarinStudio.icns file (or monodevelop.icns, for older XS releases).
Right-click the launcher app you created and choose "Show Package Contents".
Navigate to its /Contents/Resources/ and paste a new copy of that icns file.
Delete the original applet.icns icon and rename the new monodevelop.icns to applet.icns to take its place.

Related

Make Visual Studio Code open files in the already open project window?

I build my project on the terminal using make. When I encounter some compile errors, the output indicates in which files there is an error. I can Ctrl-click the file names to open them (a feature of iTerm). However, this makes Visual Studio Code open a new window with that single file, instead of navigating to that file in the already open project window. Is there a way to change this?
There is an option window.openFilesInNewWindow, but that only works for files opened within VS Code, not from Finder or other apps.
VSCode accepts -r or --reuse-window as a parameter to force opening a file in the active project window.
If you can configure your iTerm feature and add this parameter, it should work as expected.
Reference : https://code.visualstudio.com/docs/editor/codebasics

How to open two / multiple instances of Visual Studio for MAC?

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?
Open a terminal window, and then issue the following command:
open -n -a "Visual Studio"
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":
See the details of the feature in the release notes of VS2019 for Mac Preview.
There is also the option of opening multiple solutions in the same Visual Studio instance.
From Recent list: Hold Ctrl while clicking the solution name
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.
If you don't want to daily search for this specific terminal command, create a script as below:
Open "Script Editor" in Mac
Paste: do shell script "open -n -a 'Visual Studio'"
Save this file somewhere (On Desktop)
Whenever need to launch another instance, simply open this file and
click on "Run the Script" button
Screenshot Here
Visual Studio Code
Version: 1.39.2
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:
With your first solution already open, select File > Open.
Select the solution and press the Options button.
Uncheck the Close Current Workspace button:
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:
Go to the File > Recent Solutions menu item:
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"
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:
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.
Open a new Finder window and position it next to the "Get Info" panel you just opened
In the Finder window, navigate to "Applications" and select "Visual Studio" from the list of applications.
Right click on the "Visual Studio" application icon and select: "Show Package Contents".
Navigate to "Contents" -> "Resources" and select the "VisualStudio.icns" file.
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.
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.
Clone the Application!
Open Finder
Navigate To Applications
Select Visual Studio
Edit > Copy
Edit > Paste
Open the copy
Posted my solution here:
https://stackoverflow.com/a/62831584/2621976
just do
open -a "Visual Studio" \
"path to first sln" \
"path to second sln" \
...
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.
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:
Open a visual studio project
To get another, right click (two finger press) on visual studio docked icon
Click "New Window", and now you have two instances

Unity3d 4.5.2 integration with monoDev

I am new to unity platform. I am having visual studio 2008 and unity 3D v4.5.2 working side by side. When ever i create a C# script and opens it to edit, it opens in visual Studio but not in monoDev even i have set the preferences to MonoDev built in and synchronized Assets with MonoDev. but still it opens in VS 2008. All i want is to open in MonoDev but not in VS. Ive searched it but not finding any particular solution to the problem.
Unity Preferences -> External Tools -> External Script Editor and instead of selecting the "Monodevelop (Built In)" option select "Browse" and go select the app exe file yourself and to debug in Monodevelop in Unity 4.3, you need to to tick the options "Development Build", and "Script Debugging" in the Build Settings panel
If you double-click a .cs file in Windows Explorer, does it open Visual Studio? If so, try making the default editor for .cs files the Mono IDE.
Hold Shift, then right-click a .vs file, then pick the "open file with" (or similar) item to permanently assign a new editor to .vs files.
i had the same problem and i broke my head but found the simplest solution
please follow
Open Unity
Go to Edit (Second Tab)
Click on Preferences (A new Tab will open )
Click on External Tools (Second Option Available)
Choose from the list of options Available
AND YOU ARE DONE (Make sure your option of the editor is Installed first LOL)
Click on the "Edit" tab:
Then find "Preference" in the available options. You will find such a mini window opening up, as in the picture below:
Then click on the second option, "External tools":
Then choose from the list of options available (if you have Mono Develop installed then it will be already selected for you)
My suggested options are:
Visual Studio
Mono Develop (usually I have to force close the first time , but I am comfortable with Mono Develop because of its light-weight and powerful performance compared to Visual Studio)
Notepad++ (for the pros)

How to clear User's Programs Menu folder?

I am trying to create an setup project in visual studio 2010 that clears an existing applications program menu. After running the installer that I am creating, the installer duplicated already existing short cuts in the programs menu. I would like to be able to remove all the existing short cuts from a specific programs menu folder and just have the new short cuts appear.
Right click on Deployment project, select properties and set the "RemovePreviousVersion" property to true..

Will VS 2010 display recent used project and solution in the context menu of the start menu?

Start menu in Windows 7 has a feature: a programs, pinned to the top, can show a context menu with recently used files:
alt text http://img65.imageshack.us/img65/5149/contextmenustartmenuwin.png
Will Visual Studio 2010 be able to display also recently used Projects and Solutions?
It is possible to pin solution files to the recently used file list.
First make sure you already have Visual Studio pinned to the Start Menu.
Next, drag the Solution file on to the Start Menu so that it is pinned in the main list.
Now select the the Recently Used Files button for Visual Studio so that the list is showing.
Drag the solution file from the main list into the recently used file list.
You can now remove the solution file from the main list.
Beta 1 doesn't seem to support this yet. Its easily possible by using the new Taskbar APIs and specifically the custom categories feature. I think their main problem might be that the solution files are associated with an app called VSLauncher.exe (this small app determines what version of VS to load when you launch a SLN file).
If you want to "pin" your fav solution files to any version of VS, one option this is (I currently used this with VS 2008 and 2010 Beta 1:
Open Explorer and browse to any SLN file you want to pin.
Drag it and pin on the taskbar (it will pin to VSLauncher.exe; this is okay)
Now just repeat the steps for other SLN files.
When you click on a SLN file from the above pinned program's jumplist, another instance of VS2010/VS2008 will launch. It won't show your recent projects or solutions, but atleast it allows you to pin your fav/recent solutions manually. I think you can use this for CSProj or other project files as well.

Resources