Azure Tips and Tricks for Visual Studio 2019 | Azure Friday

September 14, 2019 posted by


>>Did you know that
Visual Studio 2019 includes new and updated functionality to improve your Azure
development experience? It has new project templates, improved syntax
highlighting, and more. Michel Crump is here to
give us a tour of what you can do today on Azure Friday. [MUSIC]>>Hey everyone,
Donovan Brown here with another episode of Azure Friday. I’m here with Michael,
he’s going to show us all the new Visual Studio
2019 features that improve your Azure
development experience. So we just launched 2019. I haven’t even had a chance
to download it yet, but I hear there’s a lot of
awesome features in there.>>There is a ton of
awesome features, especially for Azure developers.>>Awesome. Show me some of them.>>Let’s do it. Let’s
jump straight into this. One of the things that you may recall if you were
using Visual Studio 2017 was that there was this more structure of
you select a template. From selecting that template, you may have like a.NET Core app, maybe just a desktop application. With Visual Studio 2019, it’s a lot easier to find which
you’re actually looking for, the project types that
you’re looking to create. Another thing is that
with the Get Started, it straight up to, “Okay. Let’s clone or checkout your code.” So obviously, if you have
anything there within your GitHub or wherever that you would like to take
advantage of, you can do that. Also, there’s this button
here, “Continue without code”. Maybe you just want
a blank instance of Visual Studio. Maybe you’re going to
use it for a Live Share, which I can see in the future. So if I click “Create a new project”, you’ll see this is
the new experience.>>Okay.>>Obviously, I can scroll
down through this and I can see all the project types, or I can come up here
to project types, and I can filter it down by Cloud. Since I love Azure and since this is typically
the area that I’ll be in, this makes it a lot easier in
order to find that template. So if you look at
the different types of languages, you can even, from there,
keep filtering down. So whatever your skill set is, whatever you prefer working on or you know you’re going to work
on with Azure Functions, for example, it makes it a lot
easier to get into that. Cool. So why don’t we, since we’re already
inside of this template, I’m going to go back and I’m going to select “Azure Resource Group”. Again, you can select it
from this dropdown as well. So if I click on “Azure Resource
Group” and then I click “Next”, I’m just going to leave
the defaults here. One thing you will
notice is that, up here, this talks about the languages
that this project is going to use, and you’ll also see that if
you’re targeting things like with.NET Core for macOS or Linux, it will also have
those icons here as well, which is great for any of them. So if I hit “Create” here, and again at the bottom you could
even change your framework, there is a variety of
different templates. So from virtual
machines skill sets to a Service Fabric clusters
to our web app, but there is one in here
that is one of my favorite, which is Logic Apps. So I can actually click
the “Logic App template”. Since I selected Cloud, you’ll see in just a few minutes
where it’s going to ask me a little bit more information about my Azure subscription
when I get into it. So I am going to maximize
the screen for us, and this is actually the Logic App. If you open it up, you’ll see
there’s all the parameters, this is the outline of each
and every piece of this app, but this isn’t very user-friendly. We all know with Logic Apps, we’re used to just clicking
through a workflow.>>But this right here,
just to be clear, you created a resource group project. This isn’t the actual Logic App, this is the infrastructure as code necessary to provision the Logic App.>>Perfect.>>All right.>>Absolutely. You’ll
see that it even has this ps1 file in
this PowerShell script. It will help you if you are
getting ready to deploy this.>>All right.>>So if I go to LogicApp.json, which is created this template, I can open with Logic App Designer. Then from here, I have
to provide a tiny bit of information to get into login. Once I do that, you’ll see that now, it’s connected up to my subscription, my resources, and here is
the Logic App’s front-end. What’s really amazing here is
that this is the same thing that you see that’s automatically
are ready in the Azure portal, but I didn’t have to leave
my favorite development environment, I stayed in Visual Studio. Again, from here, I can
start building it out. I can go ahead and start
adding my HTTP request. I can pull in the connectors. If you save this out, you can obviously see the changes
inside of your JSON file.>>That’s incredible because that’s one less context switch, as
I like to call it, right? Every time I have to Alt+Tab out of Visual Studio to go
do something else, there’s a chance I’m
going to get distracted, then I’m going to have
to go check my e-mail, I’m going to go have to do something that’s just
going to slow me down. But being able to stay focused inside of your IDE and
not have to leave is just going to increase
your productivity like nobody, like somebody will.>>Even with that, when you are complete and you are happy
with your Logic App, you can also deploy it directly again right here
within Visual Studio. So I haven’t left my favorite IDE and I’m still being as
productive as possible.>>Interesting, and the changes you’re making to
your Logic App through this designer is just changing the ARM template that’s going to be deployed eventually
when you run your app.>>Exactly. It is getting it
all set up and ready to go. Again, it’s perfect because
I’d get my Visual Studio. Another thing, let me just switch
over to a new project here. This project I want to show, this is the traditional ASP.NET Core application that you may
want to hook up to Azure. Here, you can see, it has the languages, so you’re like the Linux, the macOS, and like the web. I’m going to select
a web application. You can see Docker supports
already built-in here. Once I hit “Create”, I want to call out two big
features of this that I think our Azure developers would really
love to take advantage of. From one of this is
the new syntax highlighting. The syntax highlighting is
making it a lot easier. So for example, in this sample
like Docker [inaudible] strings, you can see that the strings that
will be used by different color. So take advantage of
the new syntax highlighting. You can also customize your own.>>Right. I see that in the past. I’m actually colorblind, and I would always have to
go in and tweak them. It’s really nice to
know that every one of the items that you just described, you can completely control
how numbers are rendered, how operators are rendered, how strings are rendered, it’s
all customizable as well.>>Yeah, exactly. One other nice thing here for Azure developers
or for really any of the developers is that the new search capabilities,
they’re extremely smart. So if I am searching for
code definition window, obviously, the first I would pull up here
for the code definition window, which you’ll also see that we
have a couple of different menus. We have everything or we can
narrow this down by just menus. Or if there’s
components, for example, like if I actually look into
install the code map tool, I can do that directly from there. Then also, if there is a templates
that I would like to add to this existing project instead of spending the time to try
to find those, I can. Then even if you do look at
these little funny things and I’ve tried a couple of these, even if you don’t
necessarily spell it right, it is automatically
determining what would be the most common thing that
that word would match to show you.>>That is going to save me
a ton of time because I’m one of the world’s worst speller
and I’m a bad typer. So you combined bad spelling
and bad typing, I type words that no one
knows that this was to be.>>I’m the same way. I absolutely am. One other quick tip is that
when you’re inside of this, and this is just a web application
and maybe I’m getting ready to publish the application, sure, you can create an App Service which
most people like know and love. But while you’re inside
of this dialogue, what I get caught up in
sometimes is, is that, “Oh, I actually need
a SQL database for this.”>>Okay.>>Again, I don’t have
to leave Visual Studio.>>Got it.>>I can simply jump back in here. I can create a SQL database. I can provide it a name or
I can provide in a server, and that connection string
will now be stored inside of that web project
automatically for me too.>>Got it.>>I remember those days of trying to put together a connection string, and it was so much work, and
they take care of that for me.>>Got it. So this is the second
time that you’ve shown that you can right-click in “Deploy” or
“Publish” right out of here. So as a DevOps person, I will be flogged if I do not
mention that you can also do all of this from Azure DevOps
as a proper CICD pipeline.>>Absolutely.>>But there are times where I do right-click and publish
out, perfectly admitted. So it’s nice to be able to
quickly get it out in there, make sure that everything’s
working before you go and you give yourself
a nice pipeline. But it’s cool here too that, “Oh, I forgot the database. Where’s all this data
going to be stored?” I don’t have to stop what I’m doing to go ahead and
add it, which is nice.>>Yeah. I believe the saying was, “Friends don’t let friends
right-click publish.”>>Damian Brady. Yeah, exactly. This is like he said it twice
and I haven’t corrected him yet. So I needed to make sure I
got to get that out there. So yeah, there’s
two ways of doing this. This way, which is short
and convenient and great.>>Yeah.>>There’s also a more formal or more fleshed out way
of it as well.>>Absolutely.>>Perfect.>>That has to be covered.
Okay. Great. So one of my last features that I think are Azure
developers would love to take a look at is the Live Share. So now, everybody else is shown
Live Share with two people.>>It’s true.>>I’m going to demonstrate
Live Share with myself. So I don’t necessarily have a friend.>>You’re so bleeding edge, no one can help you with
the code but yourself. That’s how far ahead you
are than the rest of us.>>Isn’t that awesome? So the reason I want to show you this is is that
when you’re working with Azure, you may be on a team and
you’re trying to fix a bug, and maybe there’s somebody
that you’re working with that’s located
overseas and you’re, “Hey, you need just a quick look,” because maybe they wrote
the initial application. So I clicked the “Live Share” button
up here at the top. What I’m going to do with
this window is I’m just going to tie it to this part
of the monitor. I’m going to come back
to Visual Studio, and we’ll actually take the
“Continue without code”. Here, I’ll tie it to
that side of the window, and I’m going to go
“File” and going to, oops, one more time.>>There you go.>>I’m going to go “File” here, and then I’m going to
“Join Live Share Session”. Again, this is the Live Share that copied it directly
from the clipboard. What you can see over here is
that that web application is now pulling in just the parts that’s needed in order for
them to work with it. So if there was a bug
over here in the program.cs file and I’m in
the cs file over here and I’m like, “Hey, what’s happening here? Why doesn’t this run?” As you can see, the cursor is on each
one of the screens, and you can see them live
potentially fix this bug.>>I have to admit, this is
the first time I’ve ever seen anyone Live Share with themselves. I’m actually quite
impressed [inaudible]. Are you going to get that to work? But I’ve used this feature too. It’s not only a great feature
for our Azure developers, it’s a great feature for anyone. You can be on a Mac versus Windows, you can be inside of
Visual Studio Code or Visual Studio.>>Yes.>>It’s just an amazing way
to pair program.>>It is, and it’s changed
a lot of the ways that a program is being able
to call on friends.>>That’s awesome. Thank you so much.>>Yeah.>>We’re learning all about the new Visual Studio
2019 features to enable our Azure developers
here on Azure Friday. [MUSIC]

1 Comment

One Reply to “Azure Tips and Tricks for Visual Studio 2019 | Azure Friday”

  1. Chris Smith says:

    Awesome, fun video!

Leave a Comment

Your email address will not be published. Required fields are marked *