[MUSIC]
>> Hello, Sayed Hessini
here with another Visual Studio for Mac tips and tricks video.
In this video, I'm going to show you
two tips on how to work with multiple solutions.
First, I'm going to show you how you can open
more than one solution and the same instance
of the IDE, and then after that,
I'm going to show you how you can
launch multiple different instances,
we can load up different solutions of Visual Studio for Mac.
All right. In Visual Studio for Mac, here,
I have a particular solution loaded up and imagine that
your boss comes over to you as you're
knee-deep work and in a feature and says,
"You should make a bug fix in
this other application that you were previously developing."
So, we can do that, you don't have to stop
your workflow and close out of everything.
What you can do is using Visual Studio for Mac,
we have a workspace concept here.
The workspace represents a single instance of the IDE,
so it's possible to load at
more than one solution inside a single instance.
I'll show you exactly how to do that now.
So, I'm going to go to the "File", "Open".
This is the open project dialog.
I'm going to first select the solution that I want to open,
and then I'm going to go down to options.
You can see we have a checkbox here for close current workspace.
Now, uncheck that checkbox and then click "Open."
As I do that to keep an eye out to the solution pad.
So, we can see that the
previous application that I was working on and
still loaded up at the DotNetNew Web solution.
Now, I also have the MyWebApp solution node
that has been opened here.
The way that this works is whatever file you're currently editing,
the solution that's associated with that will actually
be the one that's going to be launched on Runner debug.
For example, here I'm editing
the template pack controller that's a part of templates API.
If I was to click the "Run" button,
it will launch the DotNetNew Web solution,
so let's go ahead and do that.
Here, we can see that it has successfully started
the DotNetNew Web application.
Let me go back to Visual Studio for Mac,
and I'm going to stop debugging that.
Minimize the DotNetNew Web.
Then, I'm going to open a file that's
associated with the MyWebApp.
Then, I'll go ahead and click the "Play'' button on that.
Here, we can see it has successfully loaded up
the MyWebApp project instead of the DotNetNew Web.
So, let's go back to Visual Studio for Mac, we stop this.
Another thing to keep an eye out is the "Toolbar" that's here.
That will also give you an indicator as
to which solution is currently active.
You can see when I'm on MyWebApp,
I get debug and default as the options,
but when I go into a file that's associated
with the API or the Web project,
the DotNetNew Web, I get some different options here.
That's because the DotNetNew Web solution contains
a run configuration to launch more than one project
on start. All right.
After you're done making your bug fixed in the MyWebApp,
you can right click on the solution and select "Close".
That will bring you back to
the previous solution that you are working on.
Let me show you another way that you can do
this same thing using the recent solution,
so go to "File" "Recent Solutions", then here,
if I were to click on hold Control while
you click on the node here, so MyWebApp,
that would do the same thing instead
of closing the current workspace,
that'll keep the current workspace open,
and then open the additional solution into that workspace.
Let's move on to our second tip,
which is how can you open
more than one instance of the Visual Studio for Mac IDE?
So, we don't have a built-in feature to enable you
to launch more than one instance today,
but we can use the terminal to do this very easily.
All I have to do is execute a command,
so it's open dash n, dash a,
and then the path to the application that we want to launch.
The default location for Visual Studio for Mac
is applications Visual Studio.app,
so I'm going to go ahead and execute this.
This will then open a new instance of Visual Studio for Mac.
Here, you can open up
a separate solution that
you might have been working on previously,
so let me go ahead and open that.
Then, I'll bring it side by side to my other instance.
All right, so here I've got my original instance of
Visual Studio for Mac wireless
developing my DotNetNew Web application.
Then, I've opened up a second instance of Visual Studio for Mac,
for my native iOS and Android project here. All right.
To recap in this video,
we showed you two tips on how to work with multiple solutions.
We showed you how to open multiple solutions
in the same instance or workspace,
a Visual Studio for Mac,
and then we showed you how to launch
more than one instance of Visual Studio for Mac.
This is Sayed Hessini.
Please keep an eye out for future videos in
this Visual Studio for Mac tips and tricks video series.
[MUSIC]