Visual Studio Toolbox

Extensions in Visual Studio 2017

Rate this post
(Video Transcript)
Hi, welcome to Visual Studio Toolbox. I’m your host, Robert Green, and joining me today is Justin Clarebert. Hey, Justin, how are you?

>> Very well thanks. Thanks for having me on.

>> Welcome to the show.

>> Thank you, good to be here.

>> Justin’s a program manager in the extensibility group. And we’re gonna talk about extensions. And we’re gonna focus more on the experience for consumers of extensions, not as much on what it’s like to create an extension.

>> That’s right, thanks, Robert. There’s a lot been going on in the extensibility space. And we’ve been working with the extension authors, to talk to them about the many changes. But I’d like to talk about the experience that users will get with our new Visual Studio 2017. To do with the new installer, the new experience for installing extensions, how we’re monitoring performance, some other features in the products that we’ll take in account.

>> Excellent.

>> Shall I tell you first about the new installation experience?

>> Sure.

>> We’re very excited about this. One of the best things about the new Visual Studio 2017 is that you-

>> I don’t know what was wrong with the old experience where I would go to set up, I’d check everything, and then I could do something like-

>> Yeah, that’s right, and you could come back tomorrow, and hope that it didn’t fail.

>> Yeah.

>> Well, we’ve improved upon that now, so that now you can install.

>> [LAUGH]

>> Instead of waiting several hours and installing six or more gigabytes worth of stuff. We’ve now improved the performance experience of the installer, so you can get an instance of Visual Studio up and running in minutes. And just to demonstrate that I will bring up an instance right now and I’ll show you. So, we have a whole new installation experience, it lets you choose what form or what version of Visual Studio you’d like to install. You can subscribe to many channels so that you can be getting the latest new releases or up and coming releases. And you can choose from Community, Enterprise and Professional, whatever editions you’d like to install. I’m going to demonstrate installing the Community Edition of 2017 RC.

>> Okay, and this is not on a clean machine, you’ve already got some other instances-

>> True, to put into perspective, another one of the new features of the Visual Studio installer is that it allows us to have multiple side-by-side installations. So I can have a copy of Visual Studio ’17 as well as a copy of Professional, as well as one of the new releases coming out so I can test the new features.

>> Yes, that’s very cool for people doing content because if you’re writing a course or something, or you’re doing something that you want everybody to see. You’d love to be able to do it in Community, so you can make sure that everything you do, everybody has, you’re not accidentally showing Enterprise features. But at the same time, I use Enterprise to develop all day long.

>> Exactly, that’s a good point, yeah. And just to demonstrate, I have instances running here, I’ve got two instances of Enterprise running of two different versions. I also have an instance of Visual Studio 2015 running. But now I will show you how we can install easily, a new instance of Community. Let’s pick the release channel, this instance I’m going to install is going to be version 26124. So by the time this recording comes out there might be an updated version.

>> Okay.

>> When we hit install, now one of the-

>> So this is our RC2? Cuz RC3 just got released. Is that about right?

>> This build is very close to the RC3 release that’s coming out now.

>> Got it.

>> Now here is what we’ve done. So, instead of the installer bringing down everything you might ever need and more than you will ever need, we give you the opportunity to just bring down the core editor. Just the shell, with things like Solution Explorer, Team Explorer, the basic text editing functionality, like coloring. But if you want additional components, you can select them. There’s a whole raft of additional components that you can choose from, including various .NET frameworks, Azure libraries, all sorts of coding tools. Lots of different things, debugging tools. What we’ve done is we’ve grouped some of these popular components into what we call Workloads. So if you’re likely to do some .NET desktop development, we’ve prepared a Workload full of components that you might be interested in. Including the .NET development tools, Framework 4.6.1 and some recommendations of other extensions you might want. Some that are strongly recommended and we’ve pre-selected for you, and others that you can choose.

When I do my development with extension development, I use these extension development Workload down the bottom here. Which gives me a whole suite of extension development tools, including the Visual Studio SDK. Today I’m just going to install the core editor to show you how neatly it’ll just bring down just a few hundred megabytes. Here it’s got an install size of 733 megabytes. Because I already have an instance running, it wants me to choose a different directory, so I’ll put in Community2. And you can give it a bit of a nick name, say, Demo version. All right, so now, if I can install that.

>> It’s asking to close all instances of 2017 RC.

>> Right of course just like any major installer, if you’ve got the program already running, it’s going to want me to shut that down. So I’ll close that down and hopefully now that goes away, thank you for that. So now we can go ahead and install a new version of Visual Studio.

>> 733 megabytes.

>> Yeah, so that’s significantly smaller than the 6.2 gig that the last version required you to bring down.

>> So if you’re just doing web, you don’t want WinForms and WPF. If you’re just doing those, you don’t necessarily want some of the web stuff.

>> And you can have separate instances for your C# development, your C++ development, Python tools require a much smaller set that don’t need any of the Roslyn components.

>> So I could have an installation that has just the web stuff I do, and a version that just has the desktop stuff, and the version that just has the mobile stuff and bounce back and fourth.

>> Yes, and on top of that you can have extensions installed into each instance that are related to just what you need.

>> And presumably that doesn’t install the product three times? They’re shared installs?

>> Okay, let’s talk about that, I’m glad you asked about that. Part of the new setup of Visual Studio, is that each instance is its own, isolated entity. We are no longer putting entries in the registry. Instead, each isolated entry has its own private registry. So if you should blow away that directory, you also get rid of all the registry entries. So it keeps thing a lot cleaner, you don’t get stuff hanging over. Also the other DLLs, assemblies that are required, are not going into the public GAC anymore. They’re now also being included in the directories that are a part of the instance. So again, when you remove an instance, you remove it cleanly with all the assemblies and you don’t have your Windows system cluttered up with additional assemblies.

>> Got it.

>> Which is nice. There will be, let me think, are there shared components? No, there’s very little in the way of shared components.

>> Okay.

>> Everything’s basically been separated into separate instances.

>> It’s done [LAUGH].

>> I believe it’s already finished. So that happened a lot faster than we thought, and now we have an instance here.

>> Here we are talking to kill time and we don’t need to [LAUGH].

>> We can launch this now. So let’s launch up the new version of Visual Studio Community 2017 RC. Version 15.026114. And here it’s starting up, and I’ll get the start up experience where it knows who I am and it can bring down all my settings, my favorite colors, even the roaming extensions. It’ll know what extensions I like to use and can even suggest them to me. And here we are, so we’ve launched it up. So that’s the installation experience. From inside here I can talk to you about some of the new changes that you’ll see inside the tool. Specifically those related to extensions. There are so many changes, we’re very proud of the features that we’ve brought out. But let’s first look at one feature that’s very impactful and that’s what we call lightweight solution load or deferred project load. The idea is, if I open up a project, which I’ll do now, that has dozens of projects. If I open a solution I mean, that has dozens of projects. Even if the projects only take two seconds to load, if I’ve got 20 projects that could take 40 seconds to load a solution before I can get in and start working on it.

So, instead of that, we can, let’s have a look. If I open up my Productivities Tools Project-

>> Productivity Power Tools!

>> This is one I was working on last week.

>> Did you know that the first two episodes of this show were on the Productivity Power Tools?

>> I had no idea, no, I didn’t know that.

>> Back in the day, when the idea was to limit the show to no more than 20 minutes long.

>> Yeah?

>> And so I did part one and part two, those are the first two episodes of this show on the Productivity Power Tools.

>> Well there you go.

>> Yeah.

>> Well maybe we can come back sometime and do another one since we’ve just released these tools for 2017.

>> You’re going to or you’re going to be back here in about month. And we’re going to do an entire episode on Productivity Power Tools.

>> That is good.

>> So look for that in probably late February early March-ish time frame.

>> Good, I’ll look forward to coming in and showing you about that.

>> Good, cuz you’re on my calendar doing it. [LAUGH]

>> Now what’s happened is the Productivity Power Tools that I was loading up in that other instance, that was a very clean instance. It didn’t have the tools for C# development, so I’m going to open up in another instance that I’ve got running. I’d like to draw your attention to what we see at the moment. What’s going on here, looks like there’s a big yellow warning bar. It’s telling me we’ve noticed that this extension, Solution Error Visualizer, is slowing down Visual Studio. Well, that’s not very good, is it? But at least now, we can manage it. One of the complaints we get a lot is that people are reporting that Visual Studio appears slow. And it’s not always the product itself. Because we have such a vast ecosystem and we allow extension developers to develop all sorts of extensions which our users love. Often there are extensions running on Visual Studio that are slowing the product down at startup, solution load, during typing, tool window performance. So one of the great new features that we’ve got in extensibility is that we’re now alerting users with a big yellow bar that will say this extension is slowing you down.

So if I want to I can go and look further into that, Management Visual Studio Performance. When I click on this it launches a new window that we also have accessible here under the Help menu, called Visual Studio Performance. Let’s have a look at that. So here it’s showing me that-

>> 7 seconds on start up.

>> It’s adding 7 seconds.

>> Who wrote that thing?

>> Well that’s-

>> [LAUGH]

>> That’s a community project that we’re all working on. So this lets me know, as an extension author, cuz I am responsible for this product, that I can go and work on the performance of that at startup. And then I won’t annoy the user.

>> Okay.

>> If I don’t do that, I might hear from the user who might tell me, get out of my way.

>> Right, so this could very well be an extension that you want. Like, Outlook will do this from time to time, will tell me that an add-in, it was disabled cuz it’s slow. And I look at the add-in and it’s something that I rely on, so I turn it back on. But it’s nice to be told that it is that particular add-on, so in this case you could report this, talk to the author, and alert them to the-

>> But many times you might know that you have an extension, you expect it to take long cuz you know that it’s doing some processing. In which case, you’ll be alerted three times about each extension. If you continue to ignore those warnings, you won’t be alerted anymore. So that’s how you can manage that. So if you want the extension to keep running.

>> Yeah.

>> You’ll see it, you’ll know about it. Three times later, it will stop telling you about it.

>> It’ll stop telling you, it won’t automatically disable it?

>> That’s right.

>> Right, okay.

>> But you will always be able to then go into the Performance Manager via the Help, and have a look at what extensions.

>> Okay.

>> I’ll draw your attention to what it’s looking at. Extensions on Startup, Solution load, and Typing, so those are the three things that are most important at the moment.

>> Okay.

>> And specifically, we’re measuring the utilization of the main thread. So if your extension is running in a background thread, it won’t show up here because it’s letting the program run along. So anything that’s hogging the main thread on the program. And we’re reporting in three categories, there’s startup. So this is before you’ve loaded any solution, just opening the product can sometimes load extensions, like in my case, the Solution Error Visualizer.

>> Yep.

>> That are affecting performance of startup. So they’ll be reported there. Solution Load is once you actually start loading the solution and many other extensions kick in, so we’ll alert you about those. And then finally Typing, some other extensions fire off on almost every keystroke and that can affect typing performance. So each of these are controlled by a threshold that you can set. And by default they come out to about 5 seconds for an alert, and 15 or 20 seconds for it to show up in here.

>> Is that configurable?

>> It is configurable in the private registry that comes as part of it.

>> Okay, so I can decide what my threshold is.

>> You can, that’s right. But the typing threshold obviously is much higher, it’s down to milliseconds if it takes more than a couple of hundred milliseconds, you’ll know about it. Finally, there’s Tool Windows. And there’s extensions, and also in product Tool Windows. You might have an in-product tool window like the error window, or even a build window. If they’re turned on by default, they will run at startup. So if they’re being slow, here it looks like Team Explorer takes 3 seconds.

>> Okay.

>> I like Team Explorer, I’m probably happy for it to continue to take 3 seconds. But maybe I don’t need it to happen on startup every single time. So if I minimize, or I hide it at startup, that’ll save me 3 seconds every startup.

>> Right.

>> So this is what our performance monitor brings in.

>> That’s cool. So is that 3 seconds on top of the 7 seconds or? So is that a total of 10 seconds or are they happening at the same time?

>> Yes, that’s right, that’s each.

>> Okay.

>> So one of them is contributing 3 seconds, the other is contributing 7 seconds.

>> Okay.

>> And all of this adds up. So now you can disable those extensions. Which I can show you and I now ought to. I’ll disable the slow extension here and now it says I need to restart for changes to take effect, but I’ll do that later.

>> Okay.

>> So in the mean time let’s load up a solution. This is the productivity power tools that we spoke about earlier. This has 22 projects in it at the moment and let’s watch as it loads these projects here. It’s loading them in the background. They’re loading quite quickly. I think we’ve improved performance of loading.

>> Wow, that is fast.


>> But this still took a few seconds.

>> Yeah.

>> What we can do now, is with this new tool called lightweight solution load, we can have it not load any projects. So under Tools > Options here, there’s a new setting under the Projects and Solutions. This one at the bottom, it says Lightweight solution load for all solutions. If we enable that-

>> And it can be overwritten for individual solutions.

>> Well, specifically I can talk to you about the way that works.

>> Okay, cuz I’m kind of thinking of like the Xamarin Forms project has the typically the shared code, the iOS, the Android, the UWP, the Win8, and the Win Phone 8 project.

>> Right.

>> And I don’t necessarily want to wait for them all to load. I might spend a week working on the iOS project, and I might not ever want the other ones to load, right? So I could configure that.

>> Sort of.

>> Sort of, okay.

>> At the moment the way it works, is that whicever projects you had open when you closed the solutions, will re-open and will reload.

>> Okay.

>> So that’s the best way to manage it, leave it open and it’ll open.

>> Okay.

>> Leave it closed and it won’t open until you open it.

>> All right.

>> I’ll demonstrate that now.

>> That’s cool.

>> When I launch productivity power tools, it now says lightweight solution load. Straight away, I’ve got access. I’m not waiting any. There wasn’t even one second of delay. I’m into my tool and I can immediately start searching for files. We have a new go to facility.

>> Now if you build the solution, then you’d have to wait for them all to load presumably?

>> No.

>> No?

>> Good question, building runs in the background. You don’t need the solutions in the projects to load in the tool in order for the MSBuild to build your product. So yeah, you can build without having to load all the projects.

>> Cool.

>> You can also do basic refactoring.

>> Behind the scene. Well, in a practical sense, you never had that capability in 2015 cuz you had to wait for everything to load, right?

>> True, we never had this.

>> But behind the scenes, was that always the case or is that new plumbing?

>> Basically, you could always launch out to a command window and run MSBuild.

>> Okay.

>> The tool would help you construct that.

>> Right.

>> It would tell you your path in MSBuild, so you could just run it. But you could always, from the command line, run and build without Visual Studio.

>> That is very cool.

>> But let’s see, we’ve got a new feature that will allow you to find projects but let’s have a look. As soon as I open a project, did you see that quick delay?

>> Yep.

>> It said, I’m loading the project. I’ll demonstrate on another one. As I expand a project, this is when they get loaded. So now, it says the project is loading, and it’s loaded. So it delays the project load until you need it. And then if I open up a file. I’m just opening it up now. Then I’ve got two projects open. If I now close this Solution, then the next time I open it, those two projects that I opened will load, one, two, load straight away. And the rest will stay unloaded until I need them. So that’s lightweight solution load.

>> Nice.

>> It’s a pretty neat feature, especially for people who are working on large solutions.

>> No, absolutely, yep.

>> Now, what brings us onto that. We’re talking about some of the new features in Visual Studio 2017 that affect extension developers. And we’ve just seen two of them that affect extensions. The performance monitor. So from now on, if you write extension and it’s badly performing, you know that your users will know about it, and then might report it to you. So then it’s-

>> Do you find, does the product report it to you?

>> So the product will send out some reports, and extension authors can subscribe to listen in and be notified. So that they don’t have to wait for users to email them and say, hey, your product’s, it’s bringing a big yellow bar across my-

>> Right, ideally you’d know ahead of time and try to do something about it before your users start complaining.

>> And we hope that the extension authors will use their own product and their own tools, and see these errors before they put them out. So that’s great. The second thing that affects extensions is lightweight solution mode because we can’t rely on the projects being loaded.

>> Yes.

>> Any extension that needs project information, like if you’re going to be looking at all the files in the project. If you want to provide a tool that allows you to enumerate the methods in a file, that information won’t necessarily be available. So now, there’s new APIs you can call to say, is the solution fully loaded? Is this project loaded? And if not, please load the project, or ensure the project is loaded, then you can get what you need.

>> Mm-hm.

>> You can also account for it. You can offer partial work and say okay, here’s some files that we know about. And then offer a UI to allow the users to drill down for more. In which case, then your function can expand the rest. So there’s things extension office can do to-

>> So does something like replace in the entire solution, require the projects to be loaded? Is it smart enough to know-

>> There’s a few things that will work nicely without loading the projects. Finding files works, building works, and basic refactoring works, as well. And that’s one of the main reasons people load 50 projects, is if they rename a method or a variable, they need it to be reflected in every class that uses it. So this is one of the beauties. In the background, lightweight solution load will do a small lightweight parse of the information. So you will get refactoring, find files, and building. So it’s pretty good?

>> Yeah, that is awesome.

>> So the other thing that effects extension authors is the fact that we don’t have the components necessary to. You can’t rely on all the components being there. So I’m gonna talk about that in a bit more detail now. One of the changes to extensions is that we have a new extension model, it’s a v6v3. And as part of that, we have introduced a new section to the extension manifest. It’s this thing called Prerequisites.

>> Mm-hm.

>> The idea of a prerequisite is that, we will tell the tool what products, what components we need. For instance, if this extension that I’m running, AlignAssignments, needs Roslyn components, we can say, well, we can use this UI and say, okay, I’m gonna need some sort of C# and Visual basic language. Or I might even be able to get more specific, and drill down and oops. And say, let’s see, what have we got? We need Roslyn stuff here? Well, let’s just say we need the C# and Visual Basic Roslyn compilers.

>> Okay.

>> So there we go. By default, it’s populated the versions that I have on my machine and so that anything that I’m testing with the users will have. And we can change these versions here and say, well. Any version of version 15 and above.

>> Okay.

>> I’ll be happy with the users to have. We put that in, so now we have added an additional prerequisite. What that means is that when we build this extension, when someone goes to run it, the installer will detect whether this component is on the system. And if it’s not, it will prompt the user. And it’ll say, you are missing this, would you like to get it? And if they say okay it will pull down the component, install it into the system and it will be up and running. So that is one of the new thing that Extension Office needs to do to allow for the fact that we now have such a very small installation of Visual Studio. I mean, that’s one of the big changes that we’ve been promoting. So if you’re in throughout there and you need to upgrade your extensions, that’s one of the main things you need to do. As well as changing the installation target to be hitting 15.0, which is our new version. So what we could do, if you’d like, is we could demonstrate how to build an extension here.

>> Sure, yeah, let’s see that quickly.

>> All right, let’s talk briefly about extensions. Extensions are available for Visual Studio. And for those who didn’t already know, you can do all sorts of incredible things with the product by bringing in extensions. Under the Tools menu, we have Extensions and Updates. That allows you to browse the marketplace for, there’s about 7,000 extensions available today. And you can look online, and here, we’ll just bring it up. And there’s dozens of extensions that people have written that do all sorts of things. Browser Sync, Add New File, Telerik, guys have been writing great extensions for Winforms. If you’re interested in productivity, there’s extensions like Hot Commands that I wrote earlier this year that will give you all sorts of new features like toggle comment, and duplicate code. So you can fetch these tools right here, from inside Installation, the Extensions and Updates dialog. Alternatively, you can go to the Marketplace. Oops, we don’t wanna use Chrome. Let’s use Edge, and we’ll bring up

>> Formerly known as the Visual Studio Gallery.

>> That’s right, we recently migrated from the Visual Studio Gallery over to Marketplace. So now, I’ll just bring this up, and so you can browse the Marketplace. We’re featuring a bunch of extensions at the moment, like ReSharper, which is a very powerful extension that gives all sorts functionality into your product. And you can browse whatever you like. Including most recently the PPT which have been launched for 2017. And we’ll come back and talk more about that in the next release. But there’s now over 15 extensions that can help improve your productivity. So you can download those extensions and install them. And I’d like to show you the installation experience. But why don’t we do that with an extension that we developed right here on the show?

>> Okay.

>> So how about we have, I won’t save any of those changes. But how about we start a new project, and we’ll develop an extension that pops up a dialog box that says, hello rabbit, how about that? You’ve probably seen that one before.

>> Everyone should have that.

>> [LAUGH] Yes of course. So here we go. Here’s how you develop an extension. If you’ve got the workload, which is the extensibility workload, then when you go File > New Project, then, let me use the keyboard, cuz keyboard is much faster. File > New Project.

>> So if you don’t, this is a good question, so if you don’t have, no wait.

>> And this is since I’ve got Visual Studio extensibility.

>> All right, so if you didn’t, you wouldn’t have that node at all, right?

>> That’s, well let’s have a look at the experience, if I didn’t have that. Here is the other clean install that I put together earlier, and it doesn’t have the extensibility work load. So if I attempt to do it, create a Visual Studio extension, let’s see what happens. So, under Install Templates, all we have is Blank Solution.

>> Right.

>> But we’ve got this link that says, if this is not what you’re looking and you want more things, let’s find out. So you can click here and it will launch the Visual Studio installer. And then you can go down and get more components. Separately, if you happen to open a project that’s an extension project. It will detect it as an extension project and offer for you to download the extensibility tools.

>> Cuz what we do occasionally in 2015 is have a template for installing things like the tools for gaming, Unity, etc. There’s actually a project template for how you can install the Unity tools.

>> True, true, true.

>> Right, now it can be kind of confusing, potentially.

>> I know what you’re talking about. We haven’t gutted the base installation with all of that in this version. So you kind of need to know what you’re looking for.

>> Right.

>> But meanwhile I will take you back to writing extensions, so it launched the installer for me which I won’t be using at the moment. But here we go, we do have the extensibility workload. Then under C# or Visual Basic, you will see Extensibility Nodes, and I’ll choose to create a V6 project and we’ll call it Tech Demo. And create that project now. So this is what’s, what’s it doing? Where is it, who wants to put it? That’s fine. Select folder, I must have hit the wrong button. Tech Demo, solution names, Tech Demo, put in it Projects, and I’ll put it in C Projects. Okay, let’s see how we’re going. So it’s gonna create a blank solution. Here’s a bit of a help page, which can give you some information and link you to some docs and extensibility samples that you can follow. But, otherwise, now what I will do is we’ll right-click and we’ll add an item to this project. That would be a custom command. So again that’s in our extensibility list here, Custom Command. And we’ll say and this will be the Hello Robert command.

And put this in here, it’s loading up and now what it’s going to do is it’s going to make some changes to my project so I’ll get a VSTC file. And it’ll generate a bunch of things for me.

>> Okay.

>> Straight out of the box, this product should run. So why don’t we give it a go? A live demo, let’s see if this works. But before we do, let’s make sure it actually says hello Robert. So we’ll just quickly go down to the talky box and we’ll put in, it said the title is hello Robert. We’re happy with that. And the message, let’s say, here we go, we changed this text, and the messages say, Hi Robert. All right, now, let’s see if that builds. Build Solution, cross your fingers here. Now, as part of the new Visual Studio 2017 extensions, we’re gonna need to do some minimum things on this before this will run. For instance, we spoke about the prerequisites earlier. So let’s go and make sure that we have the prerequisites that we need. In our prerequisites, we’ve got our Core Editor, which is great. So that’s the bare minimum that we need. Our Install Target is pointing to Version 15, so that’s excellent. So this is built, now we’ll see if we can install this extension. But for fun should we add in a workload that it needs to download?

>> Sure.

>> Okay, let’s force it to have to pull down something that my other installation might have. So, prerequisites, I’m gonna put in a new prerequisite, let’s see, maybe something nice and light and small. How about IntelliTrace, everybody loves IntelliTrace. So that’s now our prerequisite. We can say if you’re going to run this tool, you have to have IntelliTrace.

>> Isn’t that an Enterprise feature?

>> Is it? Yeah, you might be right.

>> [LAUGH]

>> Let’s make sure, that we want this to be available for community. So we’ll bring in a community feature. Let’s pick something else here that we know.

>> Desktop, do you already have desktop? I don’t know.

>> Well, what about Code Map? That’s not an enterprise feature, is it?

>> I’m not sure.

>> [LAUGH]

>> Okay, well Profiling Tools are good. MS Build, everyone should have MS Build, let’s put that in. Okay, so this requires MS Build. We’ll now build this tool and we’ll have a look at the output build. I will show you the output just so that anyone who’s interested in knowing what an extension looks like. If we open this in the bin folder, what we’ll have is a vsix. That’s an extension that ends in .vsix.

>> Yep.

>> Down here, it’s called TechDemo. It’s the single vsix. And if we, and what it is, it’s just a zip file.

>> Right.

>> And if we open that file, you’ll see it contains all the DLLs we need. The Tech Demo DLL, as well as a pkgdef, but also two important files that are new in Visual Studio 2017. This is the manifest.json and the catalog.json and with those files, it becomes a Visual Studio 2017 extension. Okay, so let’s see what happens if we run this, shall we? There it goes. We’re gonna run this extension. It’s launching the Visual Studio installer, the vsix installer, that’s Visual Studio extension installer. And it’s just looking on my system to see how many instances I’ve got, which one this one’s installed on. And it’ll prompt me to choose which instance I want to install. So because I have so many instances. Now this is really interesting-

>> So you could decide not to put it in certain instances.

>> Exactly, let’s take a good look at this. It’s detected that there are three instances that I can install it on. If I want to install it on this first instance, I’m gonna need to bring in MSBuild and it’s identified that. These two versions already have MSBuild, so we’ll install with those without any prerequisites. I don’t need it installed in the other versions, but I would like it installed in my community. So therefore, I will accept that it will download and install MSBuild for me. And here’s what’s going to happen. Just like any other installer, because I have the product running already. It’s asking me to please shut it down before we can go any further. So, we need to shut down all the instances of Visual Studio because we’re about to make a big change and install MSBuild. So, I’ll close this instance down. Our install is keeping it on track on the running processes and it’s checking when they’re all shut down. We’ve got another instance running over here, so I’ll shut that down.

>> So all, not just the ones you’re installing into.

>> Now there’s only one process so that’s right. It needs to shut down every instance. Now because there are some shared components, especially if we’re gonna be bringing prerequisites and we don’t know where we’re gonna need them. There’s only one thing left. We’ve got a little End Task button to speed things up. You can just, but there we go, it’s already ended. So now all those components are shut down, it’s installing. And it’s going to bring in my extension. It’s already finished, and we’ll have a quick look at the install log. And we might see that it’s brought down that one prerequisite. The install log’s quite beefy, but it’s brought everything down and it looks like it’s successfully installed that. So that means now, if we attempt to launch that Visual Studio, which instance have I got. I’ve got so many instances now.

>> It was called demo or something.

>> Yeah. Well I could find it from the installer here. And then hopefully we’ll see that our extension-

>> That’s a neat little trick. That if you have multiple instances and you didn’t necessarily put taskbar, you didn’t necessarily [CROSSTALK] go into the installer and find the ones you installed.

>> Exactly and then I can launch that version from there.

>> And it says install. That’s cool. That’s right, so I’ll launch this right now and I’ll pin it so that I don’t lose it for later. So I’m going to pin this tab. Okay, Pin to Taskbar. And I’ll slide it down next to all my other instances. Okay, now, let’s have a look. Under our Tools > Extensions and Updates, we might have a new extension here. What’s installed? Tech Demo, there it is. It’s an empty vsix project. And it’s created by Justin Clareburt on 26th of January. Now, let’s see if it works. If I go Tools > Invoke Hello Robert.


>> Hello Robert and there’s our extension. So there we’ve just created an extension for 2017 and installed it and demonstrated the prerequisites in the installation.

>> Very cool stuff, very cool stuff.

>> Thank you. That’s all we really need to talk about today.

>> Yeah that’s awesome.

>> All right.

>> Cool, so you’re gonna be back in about a month and do the productivity power tools.

>> That’ll be great, lots of extensions.

>> And I’m so excited about it I may see if we can move it up a little bit, but. [LAUGH]

>> That’s good. Okay.

>> It’ll be in the very near future. Thanks a lot for coming on the show and showing me.

>> Pleasure, thank you for having me on.

>> All right, hope you enjoyed that, and we will see you next time on Visual Studio Toolbox.


Read the video

In this episode, Robert is joined by Justin Clareburt, who shows us what users of extensions can expect in Visual Studio 2017. Justin first reviews the new setup experience, because that impacts extensions. Among the things he shows are lightweight solution loading [07:35], how you can monitor the performance of extensions and see whether they are slowing you down [09:00], how extension builders can specify what Visual Studio components are required to run the extension [18:50] and how to build an extension [24:45].


Comments to Extensions in Visual Studio 2017

  • Are those private registry (06:00) the same mechanizm that is used in legacy Win32 apps repacked into AppX using Desktop Bridge?

    Liero February 9, 2017 11:38 pm Reply
  • Where do I get the Setupprogram which includes all these VS-Versions? The Download i have seen are only for specific Versions (2015/2017) and not Multiselectable.Tnx for Infos/Links

    Christian Zuercher February 10, 2017 6:26 am Reply
  • @Christian Zuercher: That option is available for internal MS folk only. Sorry if that was confusing.

    rogreen February 10, 2017 8:30 am Reply
  • @rogreen:Hi RobertTnx for the Info. This is very helpful and tells me how to install both Versions.Greets from Switzerland and continue with these great posts!Christian

    dipicorg February 10, 2017 10:16 am Reply
  • Great video!But I could not figure out how to install more than one particular SKU (Like VS Community 2017 RC) side-by-side for different workloads.I have the latest version of the installer, but once a SKU is installed, I can only launch / modify it, I cannot install a second or a third version of it (with different workloads). Any ideas what is wrong? Will this be fixed in RTM?George

    FitDev February 10, 2017 11:56 pm Reply
  • @FitDev:The only way to have side-by-side installations at the moment is to have different editions (Community, Pro, Enterprise)Or to get a SKU from a different distribution channel.We are looking to bring in side-by-side installation of the same SKU in Update 1 or 2.

    JustCla February 13, 2017 3:36 pm Reply
  • @JustCla Thank you for clarifying! Will be looking forward to this feature in the next update then!

    FitDev February 13, 2017 9:11 pm Reply

Leave a Comment

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

1Code.Blog - Your #1 Code Blog