for many people building insights has been instrumental in improving the performance of the wheels we have received a lot of feedback from the community expressing their desire to have this functionality integrated into Visual Studio hi I'm Nelson troncoso and today I am excited to announce that for 17.7 preview to build insights will be available inside Visual Studio also we have worked closely with game studios whose large and complex code bases can greatly benefit from buildings to bring you this tool so without further Ado let me show you a preview build insights is included by default in the desktop development with C plus plus and game development with C plus plus workloads to get started we will need to collect performance data to do this under the build menu you will find an option to run build science on solution selected project or projects you can choose between performing a build or a rebuild I'm going to select build as soon as the bill starts visual studio will be in collecting performance data and it will automatically Stop and Save the data into an ETL Trace all right once the build is complete Visual Studio opens the trace and displays the collected data inside an editor window a very common issue that can increase the time it takes to compile C plus plus projects is the repetitive parsing of header files and it gets worse as the size of the code base increases for this reason we prioritize included in the first release to views to help you troubleshoot similar issues included files and include three the first view shows how many times a particular pile file was parsed by the compiler and the time it took the second the included displays which headers were included in every file it basically gives you the include hierarchy from here things that you can do is like for example go to the source code let me show you another file oh yes another thing that you can do from here is navigate to the other View as you can see I went from the header included by that file to this View also you can filter files by name all right let's start to investigate we can see that the repetitive parsing of some headers takes a significant portion of the build time uh windows.h takes 15 era locators there's 11 the other 10 10 and it goes from there with the most problematic headers a possible solution is to do a pre-compile header or PCH version here I have another project which is a duplicate of that one and I made some changes Windows Edge and you relocated the edge are included in a PCH something you might notice is that I have a C file and I have a CPP file file the reason is because uh Windows 8 is for C and C plus plus but era locator is just for C plus plus let's let's check as expected a real performance has improved significantly now it takes 37 seconds you can see the the percentage of parts in duration two uh let's go back uh yeah so 62 seconds almost half and then uh if we run we can also search for one of the files windows.h and we can see that it's no longer an issue just have uh half a second now it takes and we can see that it was included by the C and the C plus file which is expected because that's what we did um let's go to the included you see the PCH related files are the top one last thing we have also added a button you can use if you would like to dive deeper into your investigation using double UPA thank you to everyone who provided feedback we hope that this tool will enhance your workflow by helping you improve the performance of your C plus plus builds what you see today is only a glimpse of what is possible we're not done yet please continue to give us feedback as we refine this tool and add more capabilities thank you
Wednesday, 23 October 2024
Branches Merging, Rebasing, and Squashing in Visual Studio and GitHub [Ep 2] Advanced Series
hi everyone thanks for joining this session on integrating branches merging rebasing and squashing in visual studio and GitHub where we'll cover the different ways you can integrate changes from other branches using git and how each Works in vs and on the web in GitHub whether you merge or rebase a secondary Branch you'll end up with the same changes being added to your primary Branch the different lies in how the commits are connected in your git history when merging your primary Branch will get a new merge commit and you'll have the entire history of the second Branch preserved as a detour in your graph as shown in the graph here when rebasing every commit in your secondary Branch gets replayed on top of your primary Branch as if you made those commits on your primary Branch to begin with as shown in the graph here you can see they have the same commits but are connected differently compared with merging you get a cleaner history and a linear commit graph which is helpful for rolling back changes sometimes these actions result in merge conflicts which we covered in more detail in another video Once you pick your method it's easy to either merge into current Branch or rebase current Branch onto from the context menu when you complete a poll request on GitHub you can choose from the following options and your organization can configure which merge type it allows on a given Branch when either of these strategies are combined with squashing you lose the individual commits from the secondary branch and the result is a single commit with a new commit message this is useful if you want to throw away the source Branch completely going from a branch with multiple commits into a single commit to squash simply hold control and select a set of commits you'd like to combine into a single commit and rightclick and select squash commits thanks for watching everyone
Monday, 21 October 2024
AI Coding Assistance in Visual Studio 2022
a big step forward for the AI engine here in Visual Studio 22. here's a just a very simple.net console app and I want to show you some cool things and improvements we've done to the AI based coding assistant so I'm going to type a new line here and notice how Visual Studio automatically will suggest that I put in a last name which is exactly what I want in this case I want the last name property to be inserted for me right here I also want the full name so let's hit enter again and this time it suggests age which is it could be the accurate one but I want full name so I'm just gonna pretend it's not showing me anything and just start typing public string full name and notice here I can just hit Tab and I get my full name and it understands that full name is a product of first name and last name so the AI engine here in Visual Studio understands the context I'm in absolutely fantastic here let's scroll down and you can see here I have a method here called remove data and all it does it removes some data from the list that I have defined above it what's missing here is is a method for adding data so again I'm going to hit enter and visual studio already knows what I'm going to do here I'm going to create an add data method so notice that based on the name remove data it understands what remove means and so it suggests that I created a method called add but what was crazy was that it knew what that would do inside the method so it knew that it it should not take the list and remove something it should add to that list this is just absolutely fantastic here I'm just coding by tapping enter and hit hitting the Tab Key here and we can take it a step further let's say that I want to create a new method or I want some code but I'm not entirely sure how I should write it what I can do is that I can express it in a code comment like this one so here I have a comment it says take the two arguments and add them together so the arcs refers to the arcs that come into the to the main method up here so I'm just writing here in plain English what it is that I would like to have happen I can hit enter and visual studio will automatically suggest what that code might look like it understands what I'm saying in English in the code comment and can translate that into something that might be what I want this is the AI engine that is built upon huge data set and using machine learning it's able to take the context that the AI engine is aware of and pair that up with the big machine learning model when we pair those up together Visual Studio can do amazing things like this
Adding options to your extension
it is very common for extensions to use settings either as a mechanism for storing data internally or for allowing users to change some of these settings to better meet their needs either way the implementation is the same so let's take a look at how to add settings to an extension we're going to start by right-clicking the project node and select add new item from here we're going to navigate to the extensibility category and select options page and we're going to give it a name in this case general which is the default that will create general.cs inside a folder called options it contains two classes the second of which is called general and that is our options class so for this sample we're going to create an option to determine whether or not to use uppercase when we insert the good as part of our extension so i'm just going to update the text and the type as if it was any other property i'm also going to change some of the metadata and the metadata is contained within attributes on top of each property so i'm going to give it a display name and then a description that explains to people what this property is for and you can be very precise here and that will help out people better understand we're going to set a default value and make sure that that default value is also accurate reflected on the property itself like it is right here it's now time for us to consume this new setting in our code so we're going to navigate to our command class and start by getting an instance of the general settings class so those apis are async so i'm going to await general dot get live instance async and now i can simply query my properties located on the options class like right here so i'm testing for whether use upper case is set to true and if it is i'm going to change the guide here to be uppercase we now have settings that we can use internally in our extension to persist between instances of visual studio but now we need to make sure that the user can also modify those settings so if we go back to general.cs we can see that we get a few lines of code here that we can copy and paste into our package class these are two attributes that registers our settings class as tools options pages all i have to do is to modify the names to match that of my extension so now that we're done implementing our settings it's time to build and run our extension in the experimental instance of visual studio let's open a code file and just insert a good just to make sure that everything still works as it did before and we can see we get a lowercase good now let's open tools options and find our newly created options page called insert good here you can see the category the display text and the description all coming in and i can now as a user change the value to true and if we go back and run the command again to insert a good we can see that the changes have taken effect the settings are applied and we get an uppercase good inserted you can have as many options classes as you'd like in your extension and you decide which ones to expose to the user through the tools options menu by only copying those attributes over to the package class that you want there's a lot more to explore when it comes to settings and options how to dynamically update the values and save them or listen to events on when they change it's all exposed through the api and very simple to get started with so go try it out enjoy
Accessing Code in the Cloud with GitHub [Ep 1] Beginner Series
hi everyone thanks for joining this session on accessing code in the cloud with GitHub where we'll go over how to clone a repo to your local machine with Visual Studio I'm starting off on the learning series main repo page where I can see this green code drop down button I'm going to copy this https URL and then I'll go to visual studio and click clone a repository here I'm going to paste the link and I can decide where in my file system I want the repository to live by default Visual Studio groups all of your clone repositories together in the source slash repo folder of your user Drive I click clone and my repository begins cloning I know it was successful because I can see the name of my repository in the status bar and also in the get changes window label you may notice that there's a notification Banner prompting me to enter a username and email this is a git configuration that adds your name and email to each of the commits or snapshots of code that you push it can be different from your GitHub or Visual Studio account also depending on your use case you may need to adjust your username and email per repository if for example you'd like to push your code changes with your work email or your personal email we'll keep the checkbox for its set in global.git config checked for now since for this series we don't want to change this information every time but you can always go into the tools options get settings to adjust this later thanks for watching everyone
Access options for Visual Studio subscriptions
>> Access Options for Visual Studio Subscriptions. There are two main options your subscribers have for accessing their Visual Studio subscriptions. This video will explain Microsoft accounts and work or school accounts, which are a feature of managed tenants like Microsoft 365 or Azure Active Directory. We'll also show the impacts of choosing a type of account for your subscribers and some of the benefits that come with managed tenants such as improved security and ease of subscription management. What is a Microsoft account or MSA? The Microsoft account, commonly referred to as an MSA, is a personal email account owned by an individual to access Microsoft services when an organization isn't using a managed tenant for M365 or Azure AD. An MSA is set up by the individual and maintained by the individual. For example, Kai may have set up kai.carter20@outlook.com as his MSA. This would be created, owned, and maintained by him. Why would subscribers need an MSA? Companies use MSAs when they're not using managed services by Microsoft, such as M365 or Azure AD, or if they're using managed services from other companies. For example. Kai Carter was assigned a subscription by his company, Contoso. His admin assigned it to his company email, kai@contoso.com. However, Kai needs to make it an MSA because Contoso is not yet using Azure AD or M365. kai@contoso.com is owned and managed on-premise by Contoso, so an MSA needs to be created for Kai to access his subscription. Are there governance risks to using an MSA? Since MSAs are owned by an individual, any policies you've defined for account security, like password strength, won't apply to that MSA. Additionally, if the individual is no longer with the company, they can still access services that are connected to their identity. For example, if Wesley Brooks used his own MSA, wesley.brooks01@outlook.com, to assign Visual Studio subscriptions and manage admins, he would still be able to do this even after he leaves the company if his account is not removed from the Visual Studio Subscriptions admin portal, Wesley owns this email address and will continue to own it even after he leaves. This can pose a security risk to your company if the user maintains unauthorized access to confidential information. What can I do about it? Consider transitioning your users to a managed tenant, such as Azure AD or M365, as well as making sure that your subscribers choose a work or school account when signing into their subscription for the first time. What is a managed tenant? A managed tenant is a cloud-based directory that allows the organization to have end-to-end control over the user's access to Microsoft services. This can be achieved in a couple of ways through hybrid or full cloud solutions, such as M365 or Azure AD. The organization has full control of the email address and can manage access this way. Why does this matter? Unlike MSAs, managed tenants allow your company to have increased governance and full control over a user's access. For example, let's say that Wesley Brooks is an admin and uses wesley@fabrikam.com to manage Visual Studio subscriptions and admins. When Wesley leaves Fabrikam, as soon as his email address is deactivated, he no longer has access to sensitive or confidential information like product keys, Azure resources, and more. Wesley also doesn't have the task of setting up and maintaining his own email account as he would with an MSA. Since the sign-in and security for Wesley's email address is within M365 and entirely in the control of his company, once his account is deactivated, he loses access to cloud services. Is it possible for subscribers to use an M365 or Azure AD work email for their MSA? Yes, your subscribers can create an MSA out of their work email. For example, Hannah could have an email address assigned to her by her company, such as hannah@fabrikam.com. When she's setting it up, Hannah should choose the option to sign in with a work or school account if the organization is using a managed tenant like M365 or Azure AD. If she chooses a personal account, then she will be creating an MSA. This means that even if Hannah left Fabrikam, and she'd used that email address as an MSA to sign into other services, such as Visual Studio Subscriptions, that would still be her user sign-in. How do managed tenants make Visual Studio subscription management easier? Using an M365 or Azure AD work email as an MSA still provides some ease of administration benefits at the cost of security risk. The Visual Studio Subscriptions admin portal will recognize all of your users and be able to track the status of their email accounts. This is helpful because the system will identify when a person's account is deactivated in Azure AD and remove access to the subscription. However, the subscription will still be listed in the portal until it is removed by the admin. If you delete the user out of Azure AD instead of just deactivating them, then the Visual Studio subscription will be automatically removed within 30 days. This makes subscription management easier since there are fewer steps that an admin needs to take to remove unauthorized access. If you're already on a managed tenant, make sure your users are not using consumer domains like Hotmail or Outlook by looking at their sign-in email address and changing them to their work accounts. For information about how to do this, watch our video at aka.ms/MSAsignin. Still have questions about how this works? Check out managed tenants on M365 or Azure AD at aka.ms/M365Domain and aka.ms/AADDomain.
2018 Microsoft Ability Summit
For us it's not just about falling in love with new technology but it's about being able to apply a breakthrough in computer vision and creating an application like CGI or taking something like Gates. I mean it's phenomenal. I see what has happened inside of Microsoft in the last four years or so? There's been a renaissance all sorts of people have come together and said let's just raise accessibility of Grace universal design and all these technologies we talk about all have come out. This is a journey this is not something we claim to be the best at this it's about making sure that you're empowered that you have all the resources available. And that's never been more important for us to have people with disabilities in the fabric of Microsoft. The best thing we do is make sure every single Washingtonian gets to exercise their talents. That kind of spirit that so many of you have helped us advance here at Microsoft that has led to our inclusive hiring programs. Let's use this movement to really define Seattle as a city of inclusion. Microsoft has now looked upon as one of the global leaders in disability inclusion. And what we need to do is to start breaking down more of these barriers to get people with disabilities into the workforce. We have over a billion people with disabilities if our products don't work for a few people on the planet. We're missing an incredible business opportunity. This is something that we will continually love. But making sure that we think about just cool features within our products and empowering the party and 80 partners with a much broader spectrum of products.
Building Bots Part 1
it's about time we did a toolbox episode on BOTS hi welcome to visual studio toolbox I'm your host Robert green and jo...
-
hey everyone welcome to Microsoft Connect my name is Nina Zakharchenko I'm a senior cloud developer advocate at Microsoft ...
-
It's lunchtime, and this is Brad Anderson's lunch break. Here in Redmond we're visited by some of the smartest peo...
-
[MUSIC]