Showing posts with label everyone. Show all posts
Showing posts with label everyone. Show all posts

Wednesday, February 4, 2026

Connect your application to Azure using Visual Studio 2022

>> [MUSIC].
>> Hi everyone. My name is
Angelos and I'm a PM for.Net.
Today we're going to look
at how Visual Studio helps
me integrate my application
with Azure services.
We're going to look at how to get
our Kobe's configured correctly.
We're going to look at how to
emulate Azure services locally,
during local debugging,
we're going to look at how to
publish our application to Azure.
Finally how to deal
with the situation
of maybe I want to
connect my application
to different instances
of services for
different environments.
Let's jump right in.
Here I am in the
connected services tab,
and I can get back here by
just double-clicking on
the Connected Services note in
Solution Explorer at anytime.
This tab is split into two parts.
The bottom part is called
Service References,
and that helps me connect
my application to OpenAPI,
gRPC and WCF endpoints.
We're not going to spend
time on that today.
We are going to focus
on the top part,
which is service dependencies.
That helps me connect to Azure
services and SQL Server.
Right now, my application
is not connected to
anything and it says so right here,
and I'm going to click "Azure
Service Dependency" to get started.
Let's take a look at
some of my options here.
The first two items from the list
are referring to
Application Insights.
The first option is a local
only option that is only
available during F5 when I'm
debugging my application.
The second option is
letting me connect to
an actual live instance
of Application Insights.
Now the reason why on this screen,
I'm getting some
local options is that
because when I'm configuring
things to connected services.
I'm configuring how my application
is going to behave during F5.
Though, some of these options
are not going to make
a lot of sense doing published,
but they are not going to be there.
Following on, on the list and
next few options are
about Azure Storage.
The first two are two local
on the emulator options.
One of them is going to
run the Azurite emulator,
as it's called in a container,
the other one is going to
run the Azurite emulator
just straight up on the machine.
Finally, the third
option is to not let you
connect to Azure Storage,
real life instance.
Then moving down the list,
we have Azure Signal R Service,
which is again connected to a
real life service in Azure,
we have a local option for dealing
with applications secrets.
You can use the secrets
translation file,
which is the default way of keeping
application secrets outside
of your source repo.
Then we have the ability
to use Azure Key Vault and
actually Visual Studio
is smart enough to
let you use Secrets
Rotation locally,
and when the time comes to publish,
to switch that out
for using key vault,
we'll see how to do that later.
Then we have the ability to connect
to Azure app configuration,
which is just another
way of centralizing
all your application
configuration and
even integrate with keyboard.
That's pretty cool.
Then we have three
options for SQL Server.
SQL Server Express LocalDB,
that's a local only option,
it's very popular for doing local
development with SQL Server.
Then we have Azure SQL database,
which is connected to a
live instance of Azure,
Azure SQL database online.
We also have the ability to connect
your application to SQL
Server database on-prem,
maybe you have an instance on your
local machine on the network.
Then we have two options
for Redit cache.
One is a local
emulation option again.
It's going to run in a container.
The other one is going to connect
to a live instance of Azure.
Finally we have Azure, CosmosDB,
and much of identity
platform that lets
you achieve authentication
through Azure Active Directory.
I'm going to keep
things simple here.
I'm going to configure
my application to connect to
SQL Server Express LocalDB.
I click "Next" and I get to give
a name to my connection string.
I'm going to say my
connection to SQL.
Here Visual Studio
is helping me manage
that application secret the
connection string value.
Ideally, I don't want
it in my code base.
I can either by default would've
been the user secrets file,
or it can even integrate
with Key Vault.
This is basically the
equivalent of me adding
independency to Key Vault and
then putting the value in there.
I just don't have to do that
manually, VS can do that for me.
I'm going to keep
things simple and use
my local user secrets file locally.
Now we get a little summary
page that is going to
tell me what is VS
doing on my behalf.
It's telling me it's
going to get the right
makeup packet is spin up,
put the value in the
right Secret Store.
Because it's SQL Server,
it doesn't need to be paid a
code-based anyway so that's nice.
I can just click "Finish".
It will give me a little summary
of everything that it did.
Now it's telling me that my
application is configured
correctly to talk to
SQL Server LocalDB.
Let's do that one more time, and now
let's add a connection to storage.
Now I could connect to live
Azure Storage instance,
but locally I want to emulate things
so I'm going to pick the
storage Azure emulator.
I'm going to click
"Next" I'm going to give
my connection string and much
low my connected to storage.
Same options with the application
secret, I click "Next".
In the summary page it's telling me
that it's going to do the
same things as before.
This now an extra
step to also prepare
my codebase to be ready to
consume The Azure Service.
Didn't need a physical server,
but I do need it for storage.
It's really nice that Visual Studio
will just take care of
all of that for me.
Just click "Finish" here,
get my little summary of
exactly what's going on.
Now my application
is configured with
very few clicks to consume
Azure Storage and SQL Server,
and I'm ready to write
my business logic.
Now at this point, I
can go to "Publish".
I can create a new
Published Profile.
Pick Azure and offset this
Linux as my deployment target.
Here, Visual Studio is letting me
manage all of my Azure resources
without leaving the ID.
If I have multiple accounts
that I'm logging with,
I can switch over to
the different accounts.
If I'm logged in with
multiple subscriptions,
I can change the subscription.
I can search for instances that
already exist and pick them.
I can group things
by resource group,
which is very helpful for people
who are going to keep everything in
the same resource group when it
comes to a flat list
by resource name.
Of course, I can always
provision new resources
without leaving the ID.
Now I don't want to
do that in this case,
I already have an instance created,
so I'm just going to pick it from
the list and click "Finish".
Visual Studio now has
a published profile that is
ready for me to use immediately.
If I want to, I can just click
"Publish" and visuals are just
going to be the right thing.
It's going to build the app
and publish it to App
Service successfully.
That's why the status
is ready to publish.
But I've already told Visual Studio,
that I am connected to
SQL Server and storage.
It's smart enough to
know that locally,
I'm connected to basically
emulation options,
the storage emulator and
the SQL Server LocalDB.
It knows that's not going to work,
that's not going to
be successful when
I'm deploying an
application to Azure.
Because even though publishes
successful and the application
will be there when it starts to run
and tries to access the resources,
it's not going to be able to, so at
the bottom of the page here we have
our service dependencies list.
Again, the same list as we've had
before in Connected Services tab,
we now have it in this
Published Profile.
VS is telling me that this is
good to go as soon
as I configure it.
I just need to hook it up to
an instance that is available
in that environment.
I just click "Configure".
It knows that Azure SQL database
is probably what I want to do so it
has filtered the list
and just slap on
pre-selected for me,
I can click "Next".
Now I'm immediately in select an
existing instance to connect to.
It's the most common scenario.
That's why we default into it.
But like I said, you
can always provision
new Azure instances
without leaving the ID.
Here I'm just going
to pick an instance
that I already have
and connected to it.
I'm going to keep my
connection string the same.
I'm just going to
provide the username and
password that I know I can use
to connect to this instance.
When I click "Next",
it's going to give me
a summary of what it's
about to do and I'm
going to click "Finish".
It's giving me a running summary
of what it's doing right now.
Now this connection has
been configured correctly.
All I have to do, is go to
the next one and do the
same thing for storage.
Again, I can provision
the new instance,
but I don't have to, I can just
pick an existing one right now.
I'm going keep the same
connection string name.
Of course, the
appropriate connections
in value is automatically
figured out by VS.
I don't even have to worry about it.
I can just click "Next". Little
something that's going to happen?
Click "Finish". Now my application
is all set up and correctly
configured around this environment.
Now when I do publish,
application is going to end up
in App Service successfully.
Once you start running,
is going to access
the appropriate connection
strings with the configuration.
My application will be
able to run successfully.
Well, that was fun.
I hope you guys had
fun with me as well and
learn something new.
We're constantly adding more
support for more integrations.
We are adding support
for more Azure services
and we're dying to
hear your feedback.
Let us know what you
think, Tweet at us.
Let us know through
developer community.
Just know that we're
always listening.
Thank you very much. Take care.

Cortana Analytics Building a recommendations model in 5 minutes!

hello everyone my name is Luis Cabrera
and I work in the azure machine learning
organization but today we're going to
cook ourselves our recommendations model
one of the missions of Cortana analytics
is to in a sense democratize machine
learning we want to make sure machine
learning is available to everyone not
just to data scientists but also to
developers we want to make sure that
everyone has the capabilities to harness
the power of machine learning one way in
which were doing that is by providing to
you what we call machine learning api's
this machine learning api's are
completed services that you can find
today in the Cortana analytics gallery
these are already baked they use machine
learning capabilities but you do not
need to be a data scientist in order to
use them
today we're going to be talking about
one specific API called the
recommendations API let me start with a
story when I was a kid and I wanted to
watch a cook a cooking show in my native
country of Guatemala there were only two
channels that I could watch at any time
so my probability of getting the best
channel at any time was about fifty
percent and that was great but today my
children you know if you have a service
like xbox you really have over a hundred
thousand streaming options to prick from
which makes it very very hard to find
the content that you need so actually
for the Xbox we built recommendations
engine and in order desire to
democratize or to bring to the world
this capabilities we put these
capabilities together in the
recommendations API so let's get cooking
what you aren't going to need to create
a recommendations model is some catalog
data these are like the the items that
you want to sell for instance or that
you want to recommend you will need some
usage data which represent the previous
transactions that you have seen in your
application or you or your retail site
for instance so you mix these two pieces
together I will show you what these
files look like you you mix them in this
beautiful recommendations builder you
let it bake for a few minutes and then
you are ready to serve in your favorite
website or mobile application okay so
let's get cooking here so first of all I
am going to gallery dot Cortana
analytics com where I can see several
machine learning related resources for
you including machine learning AP ice so
if i click on machine learning api's it
will show me a catalog of different API
study we have available for you for
instance we have faced api's text
analytics computer business API etc but
today we're interested in the
recommendations API so I'm going to
select that one where you can now you
can see a description of the service
links to documentation and and so forth
you will notice that you can also sign
up for the service I have already signed
up so I am NOT going to do it right now
but I have to tell you that you actually
are able to sign up for ten thousand
three transactions per month enough for
you to be able to play with the service
and once you have signed up for the
service you can use the recommendations
UI which is in beta right now and i
actually have already opened the service
which is right here once you are in the
in the recommendations you I you can
create new projects let me create a new
project i will call it connect and this
project is going to be my container
where i can add the usage the catalogue
files and where i can later train my
model so it just created the the model
and step-by-step it asks me to add a
catalog file so i actually have a
catalog file that with transactions from
from the microsoft store actually so i
am going to use my catalog from the
microsoft store as you can see it was
able to upload the catalog now the
question that you may have is what does
that catalog actually look like let me
show you so that catalog has a very
simple format it shows you that there is
a items the identifier for each of the
items in the next row it will give you a
description of the items and then a
description of what type of item is in
my catalog so in this case these are all
items from the microsoft store for
instance so you know i want to be able
to recommend to a customer when they are
buying one product what other type of
product will make sense for them to to
purchase as well it will allow them to
discover those items faster as well so i
need information on metadata about my
catalog and then i also need information
about each of the transactions
in in column a here I have the actual
identifier for users and in in column B
here i have the identifier for
particular products so for instance in
in the first row here I know that person
with id3 BFF DC blah blah blah but item
QR 2000 11 which may be a piece of
software or a piece of hardware for
instance so the system is able to take
the the catalog and then the usage files
and I will just add a usage file here
and you can see that it's starting to
upload the usage file as well so so once
it has both of these pieces of
information it can crunch the
information to create a recommendations
model for you I should point out that
usage files should be less than 200
megabytes in size and if you have more
than 200 megabytes of information you
are allowed to upload several files okay
so once once you have the catalog and
usage file you can actually create a new
build the the first file uploaded and I
am in the process of uploading a second
first once the files have uploaded to
the system you can create a new build
and you can pick a type of build we have
two types of builds recommendations and
frequently bought together we also have
a ranking bill but that's an advanced
feature that you can check in the
documentation for it now so let's say
that we want a recommendations build and
then all I will have to do here is is
click build and then this is going to
take about 30 minutes
okay so after the 30 minutes we are able
to see our build and we can actually
score it so in this case I have to tell
you that I do that images and you don't
see how i am adding the images but when
you select an item you will be able to
see the recommendations for that item so
in this case we have Mike Wazowski the
Infinity figure and you can see the the
recommendations for that item right here
are all that infinity figures which
makes sense you know if a child by its
design and they may want to buy the
other ones as well so if someone on the
other hand were to buy a game like
Assassin's Creed which is a more mature
game we will expect to get
recommendations that are a little bit
more mature right so sage Anarchy Reigns
men in black fuse which makes sense
right these are other games for xbox 360
which people purchase when they when
they purchase the assassins creed game
so in this case you can see how as I
pass one item to the recommendations
engine it is able to return to me all
their items now this is all great and
you already have a model by now but I
have to tell you that if you go to to
the gallery you are also able to
download the coals to do exactly what we
did in that you I it's actually pretty
simple and I'll walk you through it this
is this is actually the exact code that
you download in the sample so all you
need to do is just like with it in the
UI you need to create a model which is
what we're doing there on the only
create model call then you need to
import a catalog and a usage file which
which are the selected lines right there
once you have imported those lines you
want to trigger a build which is done in
the in the next line
so you want to build a model you pass at
the model ID and then the rest of the
code really is in a tight loop just
waiting for that bill to be completed
once the build is completed you you need
to update the model to use that build ID
or that build as the default build this
will allow you in the future to have
several bills and then select which one
is the one that that your model should
be returning recommendations from so it
was actually very simple and you notice
how we were able to use the UI to create
a recommendation sending but you can
also automate it in code as well I
should point out that you can retrain
the model as you get new usage data as
well I should point out that there is
other related content that you may be
interested in we actually gave a
presentation on intelligent retail
scenarios at the Cortana analytics
workshop and it's on channel 9 so this
is the link and you can find me at Lewis
Scott microsoft com and that's my
twitter tag as well
thank you so much and it has been a
pleasure spending some time cooking with
you

Create Reusable UI (7 of 18) Building Apps with XAML and .NET MAUI

[Music]
hey everyone welcome to another episode
of Visual Studio toolbox part of our
ongoing miniseries all about getting
started withn net Maui and zaml
applications I'm your host Leslie
Richardson and I'm your ho your co-host
Robert Green and I'm your presenter Paul
Sheriff yep we're gonna have that whole
Spiel memorized we are by the
end
so this is episode seven seven of our
multi-art yeah of our multi part Series
in the last episode we talked about how
easy it is to route from one page to the
next in your application and this time
around we're going to talk about some
good old reusability practices when it
comes to creating UI so Paul hand in the
rins to you let's dive in so you know a
lot of times we need to have like a
header across multiple Pages or maybe we
have
address and we need addresses on
customers employees things like that so
the way we can do that we can create
reusable content and I'm going to create
another folder here so let's add a new
folder I'm going to call it uh partial
views wait a minut I create it views
partial that way everything kind of
sorts the way I want it and then we're
going to go ahead and add another new
item but instead of doing a content page
I'm going to do a Content view content
views are made to be reused and placed
on content Pages I'm going to call this
one header View and we'll go ahead and
add this and then we'll just add a grid
where this vertical stack layout is and
if we take a look at this grid this
might look kind of familiar to you if
you remember our user detail these were
the first like three lines that we built
it has the title it then has you know a
kind of a description and then that box
view if you remember that box view that
we have so all that stuff looks pretty
much the same I have the grid I have the
road definitions I have the label I have
the box view where he's still using the
grid. rows and column spans and all of
that but I got a little extra little
thing now we haven't talked about data
binding yet but what I want to do is I
want to able to pass in from the main
content page the title and the
description that I want to display on
this reusable header so I'm going to
create a binding down here to what's
called The View Title and the view
description now I put the path equals in
there just because a lot of WPF
programmers are used to that in Maui we
don't use that very often okay so you
don't really need to use that so the
question then is how do I get a View
Title and a view description on this
page that I can bind to well the answer
is with what's called bindable
properties and we do this in the code
behind so I'm going to come here and I'm
going to add a little bit of
code so let's kind of expand this out a
little bit so I'm adding a public string
View Title it's got a typical get a set
so that part looks familiar but then we
have this thing down here public static
readon bindable property and then it's
View Title property equals bindable
property. create sorry did not mean to
double click on that and then View Title
so type of string this is going to be a
string value so I change that we're on
this header view so we're using that
type and then I give it a default value
which is string.empty I could of course
give it whatever I want but this creates
what's called a bindable property and
then since it's on this particular uh
class right here I can then use it and
bind to it here in the zaml once I've
done a couple of things okay well
actually one thing I have to do is set
The Binding context equal to this class
that's the main thing that we have to do
there now if I want to give it some
default values I could actually
initialize those here
like
so there we go so now I've initialized
the properties and I have bound those
properties by doing this binding context
equal to this so that means this has it
contains View Title and view description
we're going to be covering more about
data binding later on but I wanted to
show you this because it's kind of
important for these reusable uis where
you're going to want to be able to p
pass things in so let's now go back to
our user detail view because this is the
one where I had the label the two labels
that have kind of the title and then the
description and the Box view now what I
want to do is I want to get rid of this
right so I'm going to get rid of these
three put one back so now I only need to
remove two of these Autos I know need to
remove two rows now what I want to is I
want to use that header view right here
you'll notice it doesn't show up Okay
the reason why is because it's actually
underneath as views partial so that
means it's in a different name space
right so you can see the name space here
so that means I need to reference that
namespace so I have to come up here and
do an XML
namespace okay and I'm going to call it
partial and I'm going to do Adventure
Works views ui. views partial there we
go and now I can do partial there it is
look at that header view so if I hit
tap okay now I can do grid. row is equal
to
zero and grid. column span is
two and then look at
this there they are there's those two
properties because I Define them in the
code right it gives them to me as
properties so can set the View Title to
user
information and I can set the view
description equal to use
this screen to modify user information
so whatever kind of description of this
I want okay and then we'll close that
tag and there we go so now the only
thing I have to do is I actually have to
since this is grid row zero I now need
to rumber these unfortunately I haven't
found a way
to renumber these all right in uh WPF it
was really easy to do it through the
editor here inet Maui at least so far I
haven't found a way to do it I'm hoping
they're going to add
this um in uh sure no that should have
been five sorry uh hopefully they're
going to add it in the next version
where they'll have some mechanism for us
to do this all right so now I should
have 0 1 two 3 4 five for all of these 0
1 two 3 four five six is that right yeah
six there we go all right so if I've
done everything correctly right should
be able to run it and we should still
see everything like it did before and
maybe it's a little might look a little
different just because I think I changed
a couple of things there but this is one
way that we now have a reusable piece
that I can now take and I can put it on
the other Pages as well right so if we
go here to the users and we navigate to
that detail there it is now I've
centered it okay the box view is going
across that way so it looks a little
different but it's still the same
information so now all I got to do is do
the same thing over here on each of
these others right so if I go to the
product detail view I'd have to do the
same thing XML Nam space partial and now
it's not going to give me the
intelligence because I gotta
stop I always got to stop stop stop and
but obviously it makes sense right I
mean we can't do everything so all right
let's go ahead and do this one so I'm
going to add a lot more stuff though
into the product detail
here take all this out and look at this
I'm going to give us a nice big lots of
labels and entries and then there is our
reusable header view again but I changed
the View Title and the view
description okay so that's kind of nice
let's do one more let's do our login
view so again I would do the XML name
space
partial
works. Muse uh M partial that's the one
great make sure you get the right one
there are a lot of name spaces that will
come up there all right and then let's
go ahead and change this guy here as
well so it looks more like a login page
but again using our reusable code and
we'll build more a couple more of these
as we go throughout this series here
let's go ahead and try this out and make
sure they're all working up to this
point
but you can see the power of this right
there's
reusability so there's our product
information screen and now you can see
I've got a lot more here I didn't do
anything on customers I did login so
there's our login
screen and of course our detail screen
so we're reusing that code instead of
duplicating
it very
nice now like I said I mean there's a
lot of things that I think you'll find
that you can do with this um like I said
like you you'll have addresses for
everybody right customers employees
whatever so that might be a great
reusable thing I think we're going to
build that one coming up as well I think
you're going to find a whole series of
things that you do with this um use it
for help for instance that might be
another thing you do put a help little
help button on every page and that help
button and all the all the code behind
can be Consolidated into that one place
too right so yeah you can do your own
cancel your save cancel you can do small
things you can do large things
absolutely yeah yeah so a really good
use I think um is to keep trying to use
these reusable uh you know widgets if
you want to call them and again the key
here I like keeping them separated into
a separate folder uh that may be just me
I don't know but I personally like them
so I know which ones are the reusable
ones which ones aren't um so I'm really
big on keeping my folder structure big
uh nice and separated okay and when
you're doing the ad new item make sure
you're using the content view zaml all
right as opposed to the content page the
content page is for a whole new page
that you want to develop content views
are the ones that you wish to reuse over
and over again cool so this kind of like
um if you're familiar with blazer
applications having different components
that you can Define and then reuse
across
whatever Pages you you're interested in
in the web context absolutely and you
know in U you know in uh what is it MBC
you'd have like you know the little
partial guys that you bring in it's a
partial tag and in WPF it's a user
control right and we had those in
Windows forms too if you remember back
then so yep so we've always had this
concept of reusability you know you just
have to take advantage of it and make
sure you're really thinking ahead to
can I use this again don't go overboard
with them but you know really think
about and you know you might start
building a couple of pages and realize
oh wait a minute those things I just if
you're copy and pasting from one place
to another stop yourself right and
refactor just like you would do a c or
any you know VB doesn't matter what
you're writing if you find yourself
copying and pasting stop and refactor
put it into something that's reusable so
it's the same thing with UI I think
right what's up next well next we're
going to start looking at some borders
and frames and we're going to use that
in a couple of places plus we're going
to build that reusable address uh
control right cool all right so tune in
and then till then Happy
[Music]
coding

Creating a private extension gallery for Visual Studio

[MUSIC].
>> Hey everyone, I'm
Leslie Richardson from
the Visual Studio
extensibility team.
In this video, I'm going to
show you how you can create
your very own private gallery
in Visual Studio 2022.
Why even create a private
gallery? What even is it?
If you've ever written
an extension that you
didn't want to release to
the world publicly either via
the VS marketplace or
some other location,
and you only want it to
share it with a select group
of people like maybe your
team or your company.
Then a private gallery
allows you to do just that.
It's essentially a privatized
version of the VS marketplace,
allowing select people to
install and uninstall
extensions that you specify.
Let's check it out. The first step
that you're going to need to do to
create your private gallery is,
create an empty folder.
Ideally, you want to place
this folder somewhere
that's going to be
easily accessible for the people
you intend to share
that gallery with.
I'm going to make mine local,
but feel free to place
your folder either in
a OneDrive or a SharePoint or
anything like that as well.
Let's call mine my private gallery.
The next thing we need to do is
actually populate that folder with
the Vsix files that correspond to
the extensions that you want
displayed inside the gallery.
Luckily I have a few on
standby. Add those in.
Now from here the crux
of the entire gallery is
based on this XML file
called an Atom feed file.
This is very similar to
an RSS feed that you might
see with podcast or websites
and stuff like that that
will keep a record of all of
my Vsix information that needs
to be displayed in that gallery.
Once you share out that file
path or that corresponding
URL with the people who you need
to have access to this gallery,
they can all get that same updated
information as you continue to
iterate on your gallery
or update any of
the extensions within
it and all that jazz.
There are a couple of
ways to create this file.
The first is manually,
which is not the most fun option,
but if you want to do that,
all power to you, or
you can also just have
that XML generated automatically
via a third-party tool.
For instance, Mads Kristensen
has a private gallery creator.
This is an executable that
you can just run within
your folder or if you prefer
the first-party options,
we recently added a new tool
called the Vsix Util tool,
which is short for the Vsix
command line utility tool.
That's what I'm going to demo today.
In order to use the Vsix Util tool,
first is you're going
to have to have
the build tools NuGet
package installed,
which is this one right here.
Then we're going to navigate to
where that NuGet got installed.
Mine by default showed up
under my user profile,
but your mileage may vary.
We are going to go from that package
to the latest version or
whatever you installed,
followed by tools VS-SDK.
You should see the
executable right there.
But we can't just run that
executable file from here.
Instead, we're going to
copy paste this path.
Then in any terminal of your
choice, you can use PowerShell,
I'm using Developer command prompt,
we're going to navigate
to that location.
From here we are going to
write the following command.
Let's do Vsix Util.
Then the keyword today
is createvsixfeed.
This is what's going to
generate that XML file.
Now I need to indicate the source.
Where's that XML getting
it's information from?
In this case, I want
the path for my private
gallery folder that I made.
Then indicate where I want
the XML file to end up.
I'd like to end up
in that same folder.
Then finally, let's name
the XML atomFeed_test.
There we go, it tells me that
the feed has been
created successfully.
It even gives me the path
of the XML which I'm
going to go ahead and copy
right now because we're
going to need it later.
If you're curious,
you can go back to
your folder where
you output the XML.
A bunch of icons have
been generated as well,
but we also have this XML file
that you can open up and take
a look at it if you need to.
As you can see, this
is storing all of
the related data for
each extension that is going to be
included in your private gallery.
This is the critical
bio about this file,
nobody else will be able to
see the private gallery.
But we're not done yet because
we still need to actually
get the gallery to show
up and Visual Studio.
In order to do that, we
need to go into Tools,
Options, then search for Extensions.
You'll notice that, I'll
just scroll up a little bit,
there is an additional extension
galleries block right here.
We're going to add
a gallery like so.
I'm going to call my gallery,
"My First Private Gallery."
From here you can either add
a URL link that corresponds to
that XML that you generated,
or in my case a file path,
and that's what I
just copied earlier.
We're going to apply that.
There it is. This may look like
you're done because
it showed up here,
but that is not true.
In order to test it out and make
sure that it actually works,
we can go into Extensions and
then the Extension Manager.
Just like you'd be able to browse in
the VS marketplace for
extensions that you want,
you can now do the exact same
thing in your own private gallery.
You can download, install,
uninstall extensions here,
but its exclusive, it's
the VIP experience for
a select group of people,
so this is really cool.
What's great about having this
RSS feed style XML file is,
once you, again, choose to
update any of these extensions,
all you'd need to do is run that
same createvsixfeed command
and update your V6s and everybody
will get access to
that same information.
That is how you create
your very own private gallery
in Visual Studio 2022.
The next time you have
an extension that
you don't want the
whole world to see,
be sure to check out making
a private gallery and only
sharing it with a
select group of people.
You can learn more by checking
out the related docs.
Until next time, happy coding.

Creating and Leveraging Branches with GitHub and Visual Studio [Ep 1] Intermediate Series

hi everyone thanks for joining this
session on creating and leveraging
branches with GitHub and visual studio
where we'll cover what branching is used
for in git and how to create delete or
rename branches in both GitHub and
visual
studio branches allow you to separate
your work from that of your colleagues
or the more finalized or stable parts of
your code base that you might want to
keep protected since they're for
production that main branch is usually
called Main and there are many branching
strategies out there but each requires
creating branches which I'll show now
here I have a new feature I want to work
on so I'll create a new branch called
new feature one I have the option to set
where I'm branching
from and I'm going to choose
main this is also analogous to doing the
following command on the command line
when I click the checkout check mark it
means that I'll be jumping to that
Branch where I'll be working on now from
the get repository window I can rename
my local branch from the context
menu and you can see that the delete
option is gr out here because I am on
that current checked out
Branch now I'll add a new commit to the
my new feature Branch so that we can see
how it is branching off the main
branch
and if I wanted to delete my main branch
or any of the branches that I'm not
currently on and have checked out I can
right click and click the delete
button lastly in this other repository
with many branches I can use the
multibranch graph feature to visualize
how different branches interact with one
another and compare commits between
branches I can control select two of
them and click compare commits in the
context menu
thanks for watching
everyone

Daily Workflow with GitHub in Visual Studio [Ep 4] Beginner Series

hi everyone thanks for joining this
session on daily workflow with GitHub
and visual studio where we'll go over
how to make a commit in your Repository
in my project I'm going to make a code
change
and get changes I can double click on my
file and see the difference view which
shows the additions in green and the
subtractions in red
optionally I can use the line staging
feature to Stage my changes one by one
to ensure I'm including all of the
changes I want and you'll notice on the
right hand
side how the file moves from the changes
section to the staged changes section
next I'll add my commit message and
click commit staged
a notification Banner will tell me that
my change was committed locally and I'll
complete the daily workflow by clicking
push
I'll get another confirmation message to
let me know I've done it successfully
I'll open my repository in the web by
using the option menu in the upper right
corner of the get changes window and
click on open in browser
and now in the browser I can see my new
commit in the web
thanks for watching everyone

Debug C++ with WSL 2 Distributions and Visual Studio 2022

hey everyone my name is erica sweet i
work on microsoft c
plus plus team and i'll be joined in a
few minutes by craig lowen
who works on wsl or the windows
subsystem for linux
and we've teamed up today to show you
the new wsl2 toolset for c
plus plus development in visual studio
2022
which lets you build and debug c plus
code
on wsl 2 from visual studio without ever
adding an ssh connection
so the first thing you'll need to do is
set up your wsl distro
to ensure you have all the required
build tools installed
so you'll need a c plus compiler c make
an underlying build tool like make or
ninja rsync
zip and gdp and since i'm using ubuntu
i can install these all using the system
package manager
i'm now ready to open my c plus plus
code in visual studio 2022
i'm using a cmake project which is our
recommendation for c
plus plus cross platform development and
my source files are located in the
windows
file system thanks to bullet physics for
creating bullet 3 which is the cross
platform 3d physics library that we'll
be using in this demo
i'm using visual studio's new cmake
presets integration
which will activate automatically
anytime you have a cmgpresets.json file
at the root of the project across the
menu bar you'll see that i have three
drop downs and the drop down on the left
is my active target system
so i can build and debug the same
project on windows
remote systems and on wsl from the same
instance of visual studio
which makes this a great option for your
c plus cross platform development
and when you select wsl 2 visual studio
will automatically use the new wsl2
toolset
for configuration and build when you're
targeting wsl
you'll have a native intellisense
experience so for example
if i were to go to document on this
header file
you'll see that visual studio is
automatically copying my system headers
from the linux file system
over to windows for a native
intellisense experience
and with that i'm going to pass it on
over to craig to build and debug this
project on wsl wsl2
thanks erica so over here on my machine
and literally all we have to do to get
started
is hit f5 from here everything is
compiled and built
inside of linux using the windows
subsystem for linux and we use
gdb to connect to visual studio for a
full debugging session
so our app started and you'll actually
notice that this is a linux based
gui app which wsol now has support for
in the windows insider preview channel
you can learn more about that at dot ms
wslg
what really gives this away is the linux
based tiling here at the top so you can
see that these
this chrome tiling is uh gtk based
indicating that we are
actually running this directly on linux
in a linux instance
so i can go ahead and interact with my
app i'm going to drag this robot around
and hit d
to trigger a breakpoint and i can use
all of my favorite visual studio
debugging techniques directly in here
i can take a look at my call stack i can
take a look at these
environment variables and what their
actual variables are
using my regular workflows that i would
use inside of visual studio
this is hugely exciting to unlock the
potential to use your favorite
tools at using visual studio to debug
run and develop
your c plus based apps inside of linux
as well even though you're using a
windows based machine
and exciting enough if we go ahead and
close this just as eric mentioned
i can go ahead and use my local machine
and target this back
to windows just by clicking that drop
down button so what's actually happening
behind the scenes to make this possible
well if i go ahead and hit build you
will see that i
have a line here saying starting copying
files to a remote machine
what we're actually doing is we're
creating a twin of your copies that are
stored on your windows drive
inside of the windows subsystem for
linux in your linux file system
the reason for this is that wsl 2 runs a
lot faster when your files are in the
linux file system
it can actually be up to 3 to 20 times
faster than wsl1
on top of that you get the added bonus
of wcl2 which includes a full linux
kernel
and 100 system call compatibility
letting you do fun things like
run linux gui apps for example and so
we can pop over to my terminal window
here
and you can see that i have this project
open inside of the dot vs folder
in my home folder on linux this is what
is being copied over using rsync so only
incremental changes
are basically transferred as you develop
if you want to learn more about this
project you can take a look
at the full blog post explaining these
changes in the links in the description
below
as well as links to the full code for
this repository
um morse presets wsl docs and the wsl
repository
as well where you can find any technical
issues or feedback that you might have
thank you so much for tuning in

Debugging Tips and Tricks in Visual Studio 2022

>> Hello everyone.
My name is Hashada.
And today I will be sharing some of
our recent updates in
Visual Studio Debugging
and diagnostic space.
Let's get started into the demo.
Here I have an open source
application called ShareX.
It runs on your local and let's take
screenshots on your screen
or perform different tasks.
When I was working
around this application,
I noticed a inconsistent
bug sometimes when I was
trying to launch that it's not
able to find a local path.
I started my investigation ended up
on this method for
Update Personal Path.
When the name and
the code looks like
somewhere here we're setting a path.
It is a placement breakpoint
here on-line 462.
As I mentioned, the
pair was inconsistent.
I didn't want this breakpoint
of it every time when
I run my application.
I thought, why not convert this
to a conditional break point.
I'm going to go to settings
and select conditions.
Now as you know, conditional
breakpoints are really great
if you are to be in control of
execution of your breakpoint.
You can decide when and when
not the breakpoint can fit.
But sometimes coming up with
those conditions even remembering
syntax or understanding
different options
is not always straightforward.
And that's why I'm going to
ask Copilot for a help here.
As soon as I place my cursor,
you can see Copilot works in
the background and provides me
with these three
expression suggestions
which might work for my code here.
As I'm very familiar with this code,
I'm going to go with the first one.
You can even create
your own condition if
you don't want to use
the Copilot suggestion.
These expression suggestions also
works great with
actions or trace point.
Copilot actually can suggest some of
the status messages
for your application.
I'm going to close here
and you can see now
my breakpoint point is a
conditional breakpoint here.
As you're talking about
breakpoints here,
do you guys could've had
a scenario when you are
actually debugging a
complex application or
you're debugging multiple
issues at the same time and
then you end up having this
huge list of breakpoints.
That list is definitely not very
easy to navigate or even manage.
I used to have that too.
But recently, I started
using breakpoint groups.
As you can see here in
my breakpoints window,
I already create many groups here.
Creating a group is super easy.
You can do that using this new drop
down box and select
break point group,
and moving the breakpoint
to a group is more easier.
You just need to select
drag and drop to the
breakpoint group you need.
Now, if I need to focus on
particular area of debugging,
for example, for this demo,
I'm not really interested in any of
these non-demo breakpoint list here,
I can actually disable this
whole set of breakpoints in
a single click and I can focus
an area where I need to.
In our recent preview
release that is 17.11 P2,
we added another improvement
here that is called
default Breakpoint Group.
You can select any of
the existing group and
mark the breakpoint group
as default, like this.
What it does is, after this
any of the Breakpoints
which are created,
will get automatically added here.
For example, I'm going to
place a random Breakpoint here
on-line 459 and you can
see that gets added here.
This makes it more easier to work
around Breakpoints and also
around Breakpoint groups.
Now as we have looked
into Breakpoints,
let's continue further and
see what else we have.
Another thing I wanted to show you
here is this particular method.
Looks like we are setting
up some of the tasks
which we can perform
under this application.
I was more interested to see
different values which are
coming in this variables.
Instead of havarding
over each of them,
what I can do is I can
actually havard over
this object and use
IEnumerable Visualizer.
As you can see, I can see all
the data in just single view.
If you don't know, Visual
Studio actually supports
many different types of debug
visualizers such as HTML,
JSON, XML,
DataSet and IEnumerable Visualizer.
And, we recently made all of
our [inaudible] as non modal.
What it means is that you can
keep it handing like this,
or you can actually go
to this drop down menu,
dock it as a window,
or dock it as a tabbed document.
And the best part is, you can still
interact with the
editor in the back.
I'm going to comment out
this particular item here.
Continue my debugging and you can
see the real time change here.
You can actually also use
multiple types of visualizers
at the same time.
You can have a Text Visualizer
and IEnumerable Visualizer
open at the same time.
Maybe even the different screens
and it will still work fine.
Again, in our recent preview
release that is 17.11 P2,
we added another handy feature
and that is this
expressions textbox here.
This expression textbox,
let's write your own link
queries to filter on data.
Now I have a very small data here,
but imagine in the data with
hundreds and thousands of rows.
Having your own query
will make it super
easy to filter out on
the way you want to.
I'm going to write a
very simple link query
here or link expression
here to filter out my data.
As soon as I hit
enter you can see it
automatically filters out
the data however I want it.
That's what I have for today.
There are many other
Copilot assisted features
which we released
recently in our 17.10 GA.
If you haven't already,
please check out
our GA blog and learn more
about exception assistance,
deadlock detection and
profiler auto in sites.
Thank you. Thank you for joining

Debugging with step filters on a project level

hello everyone I'm Isadora and I'm an
engineer in the visual studio debugger
team Microsoft and my main focus is
really hot reload and c-sharp but I
always doing a lot of random things
around C plus plus as well and for this
demo I'm going to Showcase what other
amazing developers on my team have been
working on as well which is native step
filtering but on a project level so for
this demo what I have here is I am GUI
which is an amazing open source library
that really just help you to display
stuff as an immediate UI helper here
what I have is one of the almost
documentation really where they have all
these examples on how to use their API
and what you can do with it so for
example here I can do some custom
renderings or I can do something which
is very very useful which is just
displaying tables and making them
resizable and doing different things
around it
so let's say that I'm using this open
source library and I want to see what it
does
so as a user here what I can do is
actually close this repo get started
with this demo and just just try
different things around
so the first thing that I'm going to
show here especially for this demo is uh
that's the tables so let's say that I
open here and then I'm going to find out
whatever this function does
so my first step is ADD butter is just a
step into it and see what it does
and you can see that I have this really
not expected view that I ended up in the
Constructor for I'm back because of
course I'm creating a vector somewhere
here in this call okay so what I can do
is just come here and then step into
begin table again
and then here again I'm creating the
string so I'm the Constructor for this
ring and not really what I expected to
be so I can just try again and then
finally I'm actually where I want to be
which is the some beginning table calls
and then I can just go further here
but as you can see this experience
cannot be very welcome for people who
are just onboarding your new project or
just trying to understand something
because it can be quite overwhelming
you're hitting a lot of this different
constructures and specific
implementation details of your project
also as a shout out before I can
continue one workaround that you can do
for this particular situation is that
you can actually right click and then
step into specific and then pick
whatever function you want to actually
step here so if I do beginning table you
can see that I have the same thing as
before and then I can go here and do
crazy stuff with it
but anyway there is something even
fancier that you can do and I'm going to
show you what it is
so first step here I'm going to pause
and then I'm going to open the solution
Explorer and there is this one neat file
that I want to copy which is called that
step filter
so I'm going to copy here this project
and now that it needs it needs to be
under source with the project similar to
Netflix for example if you ever use that
and then here what I did they actually
have this in the imq repo
and you might even argue that it can
always use netstat filters before Visual
Studio but you can see here even
instructions you have to copy into a
particular documents folder path
so again for new users just onboarding
in your project this can be quite
overwhelming that one of the steps is
just copying random files are around
your machine but now with 176 digital
Studio we provide a nice way that you
can simply have this in your project
other version control and then if you
click to debug again it's going to pick
up this exact file and just for the
specifics you can see here that it's
actually specifying the name for ivac 2
and I'm string and an action for not
stepping into it and I even added
something else just for myself that I
didn't want to stop anymore on any of
the overloading plus operators or any of
overloading operators really so I just
added two notes that into those and this
works very nicely so if I have here
again my demo and then again I can just
open the same beginning table and this
time I won't do anything fancy I'm just
simply going to step into again
and then you can see I'm actually what I
want to be and I didn't need to do
anything all I had to do was just call
and this file would already be here in
this report and I can have a much more
pleasant voting experience and this is
it I hope you learned something from it
and if you want more follow-up
information there's the Twitter handle
for PS debugger that I highly recommend

CMake Debugger

hi everyone today I'm going to show you
an exciting new feature in visual studio
for your cmic development my name is
Tina bakunja and I'm a product manager
here on the C plus plus team at
Microsoft focusing on cmake and
cross-platform development we have a new
cmake debugger integrated into Visual
Studio that allows you to debug your
cmic scripts and your cmake list.txt
files let's take a look at how it works
in Visual Studio
alright so now I'm in visual studio and
I have a cmake project open there's a
few different ways I can access the cmic
debugger from this point the first is I
can navigate to the project drop down
and select configure my project with
Scenic debugger this will spin up the
cmake debugger for this project
the next is I can also right-click any
of my cmake list.txt files in the
solution Explorer and the same option
will populate to open the cmake debugger
also if cmic cash generation fails for
any reason there will be a notification
that populates in the solution Explorer
to debug your project with the cmake
debugger
alright so now let's take a look at the
scenic debugger in action what I'll do
is open the cmakelist.txt file that I
want to debug I'm going to open the C
link list of txt file under the test sub
folder in this case
this file includes all of my testing
logic
I can start by setting a breakpoint for
my debugger on a line number and then
running the cmic debugger from the
project drop down
okay I can see that the IDE has entered
the debugging state in the locals window
I can see the state of the target I
defined under the added executable
command called test instant savior
I can expand to see more information
about this target like that it is using
ninja to generate and then I can scroll
down to verify that the source of this
target is set up properly
now let's watch the first test called
test one and step through the debugger
line by line I can step through this
code like any other debugger in Visual
Studio
I can now view the properties for this
first test that was set called pass
regular expression this can be super
useful as you get into larger cmic
projects as you can view all the state
of these types of variables at a given
point in time
as you can see in the locals window I
can also expand and view the state of
all of my cmake cache variables as I
step through code
I can set watches on variables by
right-clicking and selecting ad watch
these variables will now be watched in
the watch window
you can also navigate over to exception
settings and see the different C make
specific exceptions that you can set
your code to break on for example I'll
set a breakpoint on any warning that is
thrown and you'll see as I click through
my debugger and step through my code
that it will break on the first warning
message
this can be toggled to any other kinds
of Errors you see as well
all right so what do you think the cmake
debugger can allow a lot of insights
into your cmake projects at configure
time and works like any other debugger
would in Visual Studio as you could see
download the latest version of Visual
Studio play around with the cmic
debugger and please let us know your
thoughts we hope this helps you with
your cmake workflows and makes them a
lot more efficient also be sure to check
out the pure virtual C plus conference
on June 6th for more C plus plus content

Cherry Picking in the Visual Studio Git Repository Window [Ep 1] Advanced Series

hi everyone thanks for joining this
session on cherry picking in the visual
studio get repository window where we'll
cover what cherry picking is and how to
do it easily with the help of the
multibranch git graph in vs cherry
picking a commit is a way to apply a
specific commit from one branch to
another this can be useful in situations
where you want to selectively apply
changes from one branch to another
without merging the entire Branch for
example if you have a feature branch
that contains multiple commits but you
only want to apply one of those commits
to your main branch you can use cherry
pick to apply that specific commit first
you want to make sure you don't have any
uncommitted changes you can double check
this in the get changes
window then you can visualize the two
branches you'll need the one you're
currently working on and the other one
that you want to cherry-pick the commit
from since I have the current working
Branch checked out all I need to do is
click on the I icon to add the second
Branch to my my view and easily see
which commit I might want to cherry pick
I'll bring up the commit details to
verify it's the commit I
want this is analogous to the falling
command on the command
line but with the multibranch git graph
I no longer need to Fumble with the git
log and commit hashes to create my
command and I'm confident that the
cherry-picked commit was added to my
working Branch correctly sometimes
cherry picking resolves in merge
conflicts if there are changes that
overlap
but Visual Studio will help you resolve
those easily with the merch editor which
you can learn how to use in this
previous video thanks for watching
everyone