I'm a program manager on the visual studio for mac team.
Kind of responsible for the general ide all up.
The.Net core experience in the ide. How many people here have worked
With visual studio for mac so far? that's a good number of people. Okay.
If you haven't used it yet no worries. We'll go through and focus on
Tips and tricks which assumes some knowledge of the ide but
You should be able to follow along just fine it's a good way
To get an overview of the ide too and chat with me afterwards
If you have questions or want to explore it a bit more.
And actually so real quick for those who aren't aware.
Visual studio for mac. This is our modern .Net ide for
Developers on a mac. So we focus on giving you a
Native mack-like look and feel to the mac user and provides you
Support for building mobile web and cloud solutions using
Xamarin for mobile. Asp.Net core and .Net core to go
To the web and game net for unity. C# first class citizen and f# as
A language we support. If you want to try it out and
Go to aka.Ms/vsformac to download
It off the conference wi-fi give it a try later if you don't have
It yet. Quick bit of material this week
We put out our version 7.5 Release. Backtrack a year ago we put out
Visual studio for mac 7.0. That was our first release of vs
For mac and this continued the work we've done with xamarin
Studio adding on web development, expanding our
Mobile development, going to the ide.
And all of this is building on top of our open source core of
Mono develop. So that is a random point there
On that 7.0 Version number if you get a little confused on
That for brand new product. That's where that comes from.
In this release we put out this week on monday, 7.5, We've got
New support for asp.Net core editors raiser editor and
Typescript editors big requests for a while. What we've been working on for a
Bit and we're happy to get that out finally. New azure functions tooling on
Top of the .Net sdk for sure functions as well as a slew of
Templates 10 or more templates you can use for the common
Trigger types q trigger for azure functions.
This is the same set of templates you you'd get for
Azure tooling on windows and another example of where we're
Actually leveraging some of the same sources vs on windows and
Able to take advantage of that with this product.
And also xamarin changes this last week in this release
Xamarin forms with .Net standard, .Net standard default
Code sharing and xamarin supports debugging over wi-fi
And android. Devs have a new sdk manager and
Preview of a device manager experience for working and
Managing your emulater images. And then for everybody in
General we've got new features for the latest version of c#.
C# 7.2 And crk is supported if you install it and as well as
Editor config support allows you to define things like your code
Formatting rules or code styling rules and a file that the .Net
Editor config file and ide will pick that up.
If you're contributing to a project like mono develop out in
The open that has an editor config file in it makes it a lot
Easier for you to be able to just adapt to those and then go
Tweak your personal settings change it for this project,
Bounce over to that project. And finally one i was excited
About in the mix with all this is preview of team foundation
Version control extension big request from last year and we've
Had on and off for support team foundation version control in
Either tfs -- using tfs or visual studio team services so happy to say we've got a preview
Of that available. Working on a bunch of changes
There and looking forward to feedback from you to help guide that work.
With all that out of the way let's focus on tips and tricks
That's why we're all here, right. Tips and tricks around i'll jump
Straight into demo mode here go through the ide a bit and my
Goal is to help you get a feel for ways you can tweak the ide
To work best for you. For whatever you're working on.
And i am going to start with what i like to do on any new
Project when i get into it. Any new application, is go on
Into the preferences and we're going to start our tour here.
Let's hit on a few common preferences you might want to
Take a look at the first time up get into the ide.
Simple one, changing between light and dark themes for the
Whole ide. A lot of us like those, you're
Just used to it all the editors got that for vs and mac.
And key bindings. I hear this every now and then
People come from vs on windows and say there's a reason you use
A mac and you want to be there but you've got that muscle
Memory from working with vs on windows. We have different key bindings
You can choose. So, for example, by default
We're going to make the app feel like a mac application.
We use these command c. That's what this is here.
As a copy keyboard shortcut. Let's say you want all windows
All the way you could change vs to windows settings go as far as
Control c for copy and keyboard shortcuts more mapped to what
You would want on vs for windows. I go to the mac.
I'll stick with my visual studio profile. But this is another good tip
Here is if you look through the key bindings you can actually
Learn some interesting things about the types of functionality
The ide provides. We've got all the commands listed out in here.
And it can be an interesting sit back with a cup of coffee,
Browse through see some of the features we've got.
There may be some that you would want to map.
Like i like this mini map feature. I can come and set it up with my own custom keyboard shortcut
Here. And now i would have this bound
To keyboard shortcut tailoring it tweaking the ide to how i
Want to work with it, what i want to do.
Slip past a whole lot of good stuff go down to text editor
Settings i want to call out. We have code folding options.
We'll hear this a bit too about people wanting to be able to
Fold and collapse method bodies and regions and such.
It's off by default in the product today and in the next
Release turning it on by default for how common we hear about it.
If you want to control it, turn it off then turn it on now,
Here's the code folding on and off. And markers and rulers.
There's another good section with some fun things here.
I like to have the braces matching when i mouse, when i
Click on them. Highlight the current line for my editor.
Zoom out here you can see some live changes as we go for the
Feature. And then maybe you want to get
Rid of line numbers if you're not a fan of them.
And again more stuff you could do here in the behaviors.
Intellisense and i want to talk for a moment on code theme.
We talked about the ide itself having visual styles you can
Change, dark and light theme. Independent of that, we've got
The ability to change up your text editor to various themes.
And now we support visual studio styles if you've got something
You used over in vs on windows, for example, like son of obsdion
You can use text themes if you want. I'm going to stick with visual
Studio look and feel right now. So those are just a few of the
Big preferences i wanted to all out there as far as some things
That might be useful to you. Okay.
Now we'll jump over to some stuff about navigating around in
The ide. So another common question.
How can i open up multiple solutions at the same time.
Vs windows you get used to opening them in separate
Instances of the ide. A little different on the mac side of this tis.
But we do have the ability to do this. Where you can come in, pick
Another solution you want to open up and if you go in your
Options you'll see this thing here about closing the current
Workspace. If i uncheck that.
Say open. Now you'll see over on the left
Side here in the solution pad i'll get my other solution to
Open up for me now i can switch between these two different sets
Of projects as i like all within one instance of the application
One window. So next up, many of us, when we're not presenting a
Demo on stage at build are working with a bigger monitor or
Multiple monitors. You want to be able to flow your
Code across those or just set up your environment a little
Different. You may want to take one file
Code, say, your html markup or something, push it off to one
Side, work in the ide. You can take any tab from our
Document well here, and i can actually drag it out into its
Own window. And now i could place this over
On my separate monitor if i would like to and then have them
Sit side by side, one window here.
One monitor, my other monitor has my main ide and flow between those.
Or maybe you want to instead just have them side by side in
Your want editor. Like i use a big 4k monitor at
Home i've got enough real estate on one screen i don't need a
Second monitor i like to put them next to each other every
Now and then i could take and drop it off to the side and do a
Split view of the two files side by side.
And this has a keyboard shortcut to move between these two
Windows also at any time if i want. I can go back to one by hitting command option 1.
Command option 2 and split the windows up and pull them back apart.
That gets handy when i think of web development, html on one
Side and css on the other as i'm working. You can also switch through
Documents in the well here with this menu bar.
Go back and forth through history. So that's another useful tool
For moving around in the ide. And then a really useful one is
Our navigate to bar. So let me open this up here.
I'm going to zoom it a little bit. I want you to be able to see the
Keyboard shortcuts i'm using. Okay. So let's say i want to move
Around in the files here. Hit command period, jumps you up
To navigate field. I'm get three different results
In this set. I have matches in the files on
My project. Got matches on types and members
In my code and i also have matches on the commands in the ide.
So in this case if i want to go to the helpers class i click on
That jump over on into that file here. Let's say i want to jump around
Files if i hit that command period i can do f colon and now
My search is limited to just files. So i'm searching within the
Files of the project. Or another handy shortcut is the
To get to commands is command shift p. You have this in visual studio
Code with the command pallet opens it up and i can do things
Like type format and just format the document, command shift p
And i can run a build. Very handy when you're working
With the ide and maybe you don't want to memorize all the
Keyboard shortcuts or there's a command you know about but you
Don't remember the shortcut or where to find it.
Command shift p pop up there, find the command, run it and go.
In this case we'll go back to my visitor repository.
And so i'm going to type f:i can v wrap and we get a partial match without having to spell
Out the full file and i'll jump over to the visitor repository
File for some code demos here. Last bit of layout.
I want to call out is our layouts feature in the ide.
So we have a set of preconfigured layouts like debug
We switch to when you start to debug your app. Set of common windows the last
Windows you had open in your debug session.
You can come and create your own layouts however you want to
Place the pads on the screen and switch between those.
Or use some of the defaults like our test pad here.
Or my test layout. And i can run my tests.
Jump back into my code, bounce between those.
Here you see our test render on your right side and on the
Bottom the test results coming up.
But we're going to go back to our code.
All right. Now we are in the home stretch
Where i'll focus the rest of the time really on editor tips and
Tricks and shortcuts because really that's where we spend
Most of our time, right? writing code, working in the
Editor, that's where you want to be the coding warrior. So first trick.
Let's say i wanted to change this first name property to f
Name. What i just did i held down the
Option key and i did a block selection here.
So i can select all of these items. Hold down option, select those.
And i can just type the new name i want and it will
Simultaneously edit all those lines, a little quicker than
Select them find and selection and replace and back back out.
If for whatever reason i want to move my mock data around in this
Case, i can use the option key and hit like option up and i'm
Moving the line up. Option down i move it down.
I can move the file or a set of lines up and down en masse that way.
There we go. Now, another fun selection
Feature: let's say you want to work with -- another trick we
Have for selection. So i can also do a block level
Selection in my code. What i mean by that i can take
If i hit option shift up, i'm actually selecting elements here
Kind of at a statement level or block level.
So i'm just hitting option shift up expanded to the whole line.
I go out to the block. I go up to that instantiation.
We're going to go on up to the next block, up to 4h.
Up to the method level. I can grab hold chunks of the
Code and maybe just move the whole method around inside of my
File if i like with option up and down.
So quick ways to fly around the editor window.
And there's also identifier highlighting. So if you click on something
Like this variable name here, in scope, it will highlight all
Usages of that instance. And then i could choose
Something like right click, refactor rename.
And name it whatever i want. And now it's changing all those
Instances in line there within that scope. So it's not refactoring that
Name somewhere else in the file if it's not truly that identifier.
It's a smart identifier highlighting and refactoring
That's going on. All right.
Now, let's look over here at something else going on in the ide.
You might notice, zoom it in. Over in the scroll bar area are
These marks going on on the screen.
These are actually calling out some recommendations.
These are being powered by some roslyn analyzers taking a look
At how i might improve my code i have a message about here a
Member name could be simplified. If we click that.
We'll zoom back out so you can see it. It highlights this part of my
Code and it's showing me if i mouse over i can scroll through
See some recommendation how to change the code get a preview of
What it will do if i apply that change. Well, anytime you see a squiggle
Or mark like that you can actually hit the option enter on
Your keyboard and it's going to bring up that quick fix list as well.
Coding along you see recommendation or a red squiggle
Come up hit option enter and you'll see the recommendations
For what you might do to fix whatever is going on.
And now i can scroll through, see what it's going to do to the
Code if i apply that change again and move forward.
One other trick here i can hit function option and then like my
Up and down arrow and i'm scrolling through each of these
Callouts that are over there in the scroll bar i can take a
Break, unit test passed and do a little code cleanup.
Page through clean up go to the next item.
Do something here, apply my retact torings, willy-nilly, i
Don't need to run the test, call it good.
Then the other little hidden gem on the scroll area as you see
This option, show mini map and i put the key binding on that
Earlier and it shows up here as a command i can choose and the
Mini map gives you a representation of the whole file
And you've probably seen this in other editors, too, it's a nice
Way to look through where you are relative to the rest of the
File and see a high-level view and i can jump around in
Different blocks that way or turn the mini map back off.
Let's jump back, that was kind of the rapid fire there through
The tips and tricks. I'm going to pull up a few
Screens here, we will recap what you saw, there are short cuts up
On the screen and get you set up so you can download this later
On and reach out to me and i can get you the deck, take screen
Shots, film is popping out, that's all good.
We went over i showed you commands for tweaking the
Preferences, tailor the id like you want, how you split out your
Windows, work with multiple solutions and a lot of different
Commands you can use to navigate around the ide and a lot of code
Selection tricks and you ways to move around in your editor
There, navigate is one of the most common ones i would
Recommend you get the hang of, files are split across different
Places and you can file through and navigate to classes and
Types and maybe you don't remember your file name you can
Use the bar to get to your source quick and fly around the
Ide. So the vs macwill led you
Download from the visual studio website, a got a lot of great
Docs, great information on the editors and such, a problem link
That takes you to our developer community site and we're
Actively responding and i'm out there being looking at items and
We have to base everything we do off of what we hear from y'all
So please do report us those problems and provide suggestions
Out on user voice. And then you can follow along
With a few things on twitter there, we got a hashtag, and i
Myself have my own twitter account that i share stuff out
On, usually vs for mac. We're at the tail end so the
Bottom session here which is going to be in this theater, 2,
Right after this round, azure functions which is the last one
You can catch but here is a recap of sessions throughout the
Week that apply to vs macbecause there are different features and
Sdks and things we support in the ide.
After build if you missed these, jump on channel 9, check 'em
Out. Michela's talk spent 45 minutes
Or so deep diving into the new features and talking more at
Length about the bullet points i briefly touched on at the
Beginning. How was that?
We're at the end so please, share out any evaluations,
You've got to love your feedback.
I will be able to talk for a moment after if you want or i'm
Going to be at the vs for mac the booth there.
I hope the whirlwind was useful. See you tonight!