[MUSIC]
>> Hey. All right, guys.
Welcome to Microsoft Build Live.
>> Hello.
>> So here, we're going to talk
a little bit about increasing your .NET
productivity with Visual Studio 2019 with
my favorite Visual Studio ladies.
>> Hey.
>> Hey, Kendra and Alison.
All right. Kendra, won't you introduce yourself.
>> Well, I'm Kendra Havens.
I'm a Program Manager on.NET and Visual Studio,
and super pumped to talk about,
specifically Roslyn productivity features,
cool fixes, refactorings, all of that good stuff that we've added.
>> Awesome.
>> Alison.
>> Hi.
I am Alison Buchholtz-Au.
I'm a Program Manager on Visual Studio Intellicode,
I will be showcasing that as well as maybe some of
our other cool collaboration productivity features,
some code clean up in there.
>> Yeah.
No, we don't want as code.
All right. Yeah.
All the audience outside there,
please ask your questions online
and we'll read them off for the girls here.
>> We're doing it live.
>> All right. Let's start off.
What is the most-
You guys are working the booths back there, right?
>> Yeah. We got that booth duty.
>> What are people asking you over and over?
What's new? What should I look at?
>> The most common question I'm getting is
how do I get that shirt?
>> Such cool shirts.
>> Yes.
>> Physical shirt.
>> No. But a lot of so our booth is
the Code and Collaborate booth
right when you enter the Expo Hall,
and we are showcasing Live Share, Intellicode,
rich code navigation, and Cloud environments
and those last two just came out today.
So it's been a lot of what is this?
How do I use it? What can I do?
>> So tell us a little bit about what are these Dev environment.
>> Yeah. So Cloud environments is all about giving
you a fully hosted environments
that you can quickly check out a PR.
If you are trying to do something with
Java and you don't want to set up a whole Java environment.
You basically tell us what you need,
we spin it up and take care of it for you.
>> Okay. So like, for instance,
there and working on some really complicated system
like a bunch of microservices or something like that,
you're saying like I don't actually have to set up
my own machine it's not a VM though.
>> It's not quite a VM
and I don't want to spin it the wrong way,
so I would highly recommend you
come to the booth because we've got
our developers and the PM for that there
and they can walk you through a demo,
and then you can be one step closer to this snazzy shirt.
>> Great and that's right there, right?
>> Right there.
>> We have some snazzy shirts there.
>> We do. We have some .NET snazzy shirts too
if you guys want to go the .NET booth as well.
I'm just a little prefer, only blue.
>> Visual Studio, Rajan also has great shirts.
So make a round, get some shirts.
>> So what about some code refactoring you're talking about?
>> Yeah. The most popular question is this, what's new?
Visual Studio 2019? Is it even out yet?
Totally out, guys.
>> It released April-
>> Yes, April 2nd was our big launch event.
We streamed live. It was awesome.
So we have a ton of code fixes and refactorings,
like many doesn't just in the past couple of months,
even since the GA release,
and those are really cool things,
like converting for each loop that iterates through
an I-numerable to use links syntax.
You're kind of discovering how to write new things.
>> Can you show us a little bit of what you are talking about?
>> I absolutely can.
>> All right. Let's check it out.
>> Let's see. Have we switched to my computer?
>> Let's switch to Kendra's computer.
>> I have to say Kendra's team keeps
adding so many of these refactorings.
>> There we go.
>> All right. There we go.
Okay. So always always use "Control dots".
That opens the handy-dandy little tool tips
that you have in your editor.
Your cursor needs to-
All of our tooltips are really on contextually based
so you always get quick actions and refactorings
based on where you place your cursor in your code.
So I'm placing mine in a for each loop,
and this screwdriver appears at the side.
It could be a screwdriver or a light bulb.
In here, I have convert to for.
But I meant to show converts from-
Let's see. Convert from for each to link,
which I already have
because I didn't reset this code
since I was practicing our demos tomorrow.
>> It will back and forth between link and for each.
>> Yeah.
>> Okay. That's nice.
>> Which you'll see tomorrow if you come see our talk.
>> Oh, yeah you guys have a talk tomorrow. What time?
>> I've got it.
>> 3:30, right Kendra?
>> Yes, 3:30.
>> So we were filling while you were figuring that out.
>> Thank you.
>> Okay, cool.
>> Smooth transition.
>> All right, back to your computer.
>> Yeah, you place your cursor in a for each loop.
You hit "Control dots" and you convert it to link
using the method called syntax or the call form.
The call form puts it in one nice little line using a Lambda.
>> Cool.
>> Yeah.
>> So it's already your preference of what you guys want to use,
whether it's link, for each.
>> All right, what else you got there?
>> Yeah. People have been asking that for so long.
>> Yeah.
>> I feel like they really just want
to convince their co-workers that like,
oh, I use link everywhere.
It's so much more beautiful and elegant.
>> It's nice. So you have a [inaudible] base.
Maybe it was written before link.
>> Yes. Yeah, absolutely helpful.
>> What if you're learning it?
>> Like I can imagine a new developer comes in,
maybe they're not familiar with link.
It's a nice way to check your understanding.
>> Actually, that's a really good point
because I think I actually learned .NET
through IntelliSense in a way.
>> Really?
>> Yeah. So I mean.
>> Very common.
>> Through Visual Studio, all of these tools
really are almost like you learn as you go.
They're going to help, like Intellicode you were talking about.
>> Oh, yeah.
>> That's another one.
>> That's better than IntelliSense.
>> I know.
>> So what is it?
>> So Intellicode is our AI-assisted IntelliSense.
So it's basically like supercharge, turbocharged IntelliSense.
Actually, I can show you a quick example.
>> Let's go to Alison's computer.
>> All right.
>> We got them on their toes.
>> We got it.
>> I know.
>> Oh, it's showing up behind us.
>> That's still you.
>> Kendra's.
>> Maybe we can switch this.
>> Anyways, while we're waiting-
>> Yeah, that's it. You got it.
>> We're there.
>> We're there. You're on.
>> Perfect. I'm here now. All right.
So the way we give you supercharged AI
as is it IntelliSense is we scanned over 2,000 open
source repositories with C#
and we sort of distill the wisdom of the community to
give you better IntelliSense recommendations.
>> Interesting.
>> So for example,
I've got this string here that represents a tweet,
if I just wanted to go ahead and format it
and I did this test tweet here
and activated IntelliSense,
you'll notice that I get these starred
recommendations at the very top.
So these represent what you are most likely to want
based on this context.
So if we notice,
contains is here, then length, then replace.
But if I give the system a little bit more information
and make this variable a string array
and then go back and activate it,
you'll notice that my recommendations have changed.
Because now, it's sort of matching
and it says, well, if you want a string array,
you probably don't want to replace.
You probably want something
that's going to tear this string apart.
So that's pretty cool.
>> That is, yeah.
>> Yet another context is if we do something like an if statement.
So what do we normally do if we have an if statement?
We're probably doing a count of some sort,
trying to make sure something is in there,
which is pretty awesome.
This is available.
We announced our general availability today, which is amazing.
So we'll have Intellicode for at least 10 years.
>> Nice. At least.
>> At least.
>> Absolutely.
>> Yeah. If you install the Update 1 preview, we come in box.
>> Awesome.
>> So very exciting things.
>> This like the next evolution of IntelliSense, really.
>> It is.
>> Smart IntelliSense.
>> Way better than just the alphabetical list that we used to get.
>> Right.
>> So cool.
>> Yeah. Especially when you've
got like four different things you can call.
>> Oh my God, yeah.
It could be like 200 different completions.
>> Yeah, exactly.
>> Right.
>> So awesome, I love that.
>> Yeah.
>> What else have we got?
What else are your favorites?
>> Man, I'm going to switch back to my computer
and going to a whole thing of refactoring.
>> So we just keep getting
more and more refactoring tools
inside of Visual Studio every release.
>> Yeah.
>> How many refactorings do we have?
>> So let's see.
I actually have a list.
I actually have like a cheat project.
If any of you guys want to check it out, it's out on GitHub.
You can get there by going to .NET Features 2019.
Yeah. Okay. So this is sort of like
all of the quick fixes and refactorings
all in one long list.
>> Cool.
>> Yeah. A couple, it's a lot.
>> Yeah.
>> My team has been hard at work,
and also like over half of them are coming from the community.
Something I'm particularly excited about
is Regex Completion that came out in Preview 1.
That was completely by the community.
Let's see. Where do I have code that will actually trigger that?
>> Yeah, that sounds pretty cool.
>> Yeah. You have to keep rebuilding demos
because her team is working too fast.
>> I'm exhausted, no.
So If I'm inside like a regex string
and I hit "Control+Space"
which trigger is your sort of IntelliSense-like menu,
we now have regex completions
that are like basic explanations for what
all of those characters mean and how they'll be interpreted as
we as like they hover tooltips but just as super nice.
>> That is so handy. I always forget-
You do a reg expression maybe once in a while,
you always forget these things, right?
>> Yeah.
>> It's a cheat sheet everywhere.
I'm like, "Did it searching for this?"
>> Searching for Stack Overflow, help.
>> You don't have to switch contexts now.
>> Yeah, it's awesome.
>> Also, you have bracket matching, right?
>> Yes, we also have bracket matching.
That's just exactly I was getting to.
So stuff like this you'll notice
that it's highlighting matching brackets,
and you'll also notice that we get some regex language support.
So we're actually getting colorization.
>> That's cool.
>> Yeah, I'm excited about that.
That's brand new in 2019.
>> Start up the press.
>> Yeah.
>> Cool.
>> It's really great.
Gosh, I could just keep going on.
Tell me when to stop by-
>> We've got five more minutes.
>> Yeah.
>> Ask some questions.
>> I was like, "Are there any questions?"
>> If you guys have any questions,
we would love to answer that.
>> I can't ask them all.
>> Yeah.
>> So what was the most challenging feature
to build in Visual Studio 2019?
I kind of always to ask like you is a
little bit how the sausage is made a little question.
What was like baby it seems kind of minor,
but it was the hardest thing to build or get approval for,
or convince your devs to build the thing.
>> I think, let's see.
>> Or they all are just so awesome
that everything Kendra says is perfect.
>> Yeah, our devs are amazing.
They're just hard at work and everything works brilliantly.
>> I think I have a story on that.
Were you going to launch in?
>> I don't think I have one.
>> Okay.
>> Or when I can tell at least.
>> Yeah.
>> Generally, we've been able to-
It's always like we get what the customer is saying
but they just want to tweak it a little bit more.
We had Extract Interface for a long time,
but people wanted to Extract Interface to the same file.
So it's hard to get that feedback sometimes
because they think it gets or like we have that feature.
So [inaudible] is actually gets kind of there's
tension because we don't want to
dismiss something that people are asking for,
but it sounds like something we just did
but we just need to work with it more on it
and just tweak it a little bit more.
So we've had Extract Interface.
Then the next one, and it's kind of in this same thing.
So I can control that Extracted Interface from a class.
But the next one was also being
able to pull members up to a base type,
and we still have more things to fix here.
Actually, right now, my cursor has to be inside
the member in order to get the code fix.
It can't do it if I have this whole line selected,
I don't always get it.
So those kind of things that just make the usability so much
better like changing the selection scope and all of those details,
that takes a lot of customer engagement that we honestly
get from engaging with people who are outside of the team,
who are doing a lot of scenarios.
Because I guess we can't cover.
We have millions of developers.
>> Right.
>> We can't possibly get into the minds and
every scenario of exactly what
people want in certain refactorings.
Again, some refactorings are only used
by like 15 percent of developers.
So there's a good chance that we don't have
those experts always working on the team directly.
>> Got you.
>> So getting feedback like this,
so pulling members up to the base type,
I can select to pull all these numbers up and it
automatically promotes everything that
was in here to my EmojiSearch class.
So now I have all of those listed there.
>> Got you.
>> So just engaging with us,
especially on our GitHub repository,
is so informative and there's a ton of
PRs coming in from the community,
and obviously all of those are so appreciated.
>> So all these refactorings are
open source and available for people?
>> Yeah. You know it's coming.
>> How many were totally contributed by the community?
Would you say there's a ratio here like 50-50?
>> Yeah, I think 50-50 have passed.
Like in April 2nd when we're going GA,
I think it was about 50-50.
From the last two months,
I'm not sure if we're still 50-50.
I feel like the Regex Completion count is like three.
>> Got you. That's amazing.
>> It's so cool. Yeah.
>> So actually, just exactly what we're
doing with all of our products, right?
We're really trying to open it up.
It's like people like out the community
really helping us build these great features.
>> Yeah.
>> Thank you guys by so much for all the work that you do.
I never thought how much attention to detail
you need to put into that stuff.
So thank you so much.
>> Thank you.
>> Thanks.
[MUSIC]