S105 - Latest Productivity Updates in Visual Studio 2017 Update 15.8

S105 – Latest Productivity Updates in Visual Studio 2017 Update 15.8



hello we're back at the dotnet comp so welcome to my talk it's the latest productivity updates in Visual Studio 2017 specifically for version 15.8 i'm kendra havens I'm a program manager on dotnet in Visual Studio so if you haven't watched one of our productivity talks before we always try to cram in the tips and tricks and just the little things that make coding and Visual Studio so much easier so we have a lot of awesome updates to share and again a lot of these that I'll be going through we're all customer asks so if you filed a feedback on developer community or engaged with us on our github repositories thank you so much the community being a part of this development is huge ok let's dive in so this is a general overview first I'll talk about all of the performance improvements that we've packed into all of the visual studio version like 1500 releases and also specifically what we got into 15.8 after that I will basically do one whole demo of refactorings and code fixes source link debugging the different code cleanup options that we've recently added as well as editor config tooling that we have and in Teleco if you don't know what some of these are you were in for such a big treat I'm so excited um ok so first off performance uh so specifically in Visual Studio 2017 version 15.8 the very latest stuff we are still focusing so much on solution load performance is always one of the top things that customers bring up and solution load is also right at the top within the performance category so just in general across this release cycle solution load is already 25 percent faster in Visual Studio 2017 than it is in 2015 I actually think that's a super conservative estimate so I'd really love to know what you all experience in the wild if you ever wanted to like do a blog post about how much better it is working firstly your solution loved is it something we also focused on improving performance for is branch switching that can really interrupt your development flow if you're not being able to switch in between branches really quickly so we we are focusing on that we also focused on unloading and reloading c-sharp and visual basic projects making that a lot faster as well as test execution now test execution I'm extra excited about because that's what my team specifically works on every single day besides just the general productivity category so listening for large test projects if you run a few tests within them that test execution is where we've seen the most improvement so in our labs for an MS test project with many different test projects with over 10,000 tests when you're only running a single test it can execute 82% faster that's huge we're so excited about that um I can't wait to show that later so also I just want to call out earlier across the versions in general 15 updates much better solution load during the whole time we've made incremental improvements as well as much better test discovery and I can't talk about performance with actually also having a video all on test discovery so I have a side-by-side comparison video you will see solution load just a little bit in the beginning it kind of happened so fast because I didn't use a big enough solution for this that it's it's hard to see the difference and in the improvement across these updates but test discovery is huge so on the Left we have Visual Studio 2017 update 15.5 and on the right we have update 15.8 now they're both loading a 10,000 tests project and you can see on the right it's already finished so that was 10,000 tests discovered in less than 5 seconds on the left side we previously needed to build in order to discover to us because we discovered to us by assemblies back then on the right we introduced source base discovery so I added a test it was automatically discovered because it's just running over my source I didn't need to build and then I could execute that really quickly on the left looks like we're still not quite up to oh okay so it looks like it's just gonna be 10,000 tests but when I right click I can't quite execute it yet because it's still finding all the information and loading it into the test Explorer and now it's discovered so that took about 29 seconds compare that to what it is now at four point seven to five huge improvement okay so moving on from performance let's dive right into productivity tips and tricks now I want to give you guys sort of a let's see what do you call it uh warning the next slide is really text heavy ah okay this is because we have packed in so many features into even minor visual studio releases so here on the right I've kind of sectioned off everything I'm about to dive into for 15.8 this will include new keyboard profiles for the S code ant resharper refactorings but all of those you access through control dot and their code fixes we've got for loop two for each invert if converting to a ternary conditional you can have a code fix to add a parameter from the call site as well as removing extra parentheses which I'm going to use all the time we also have finally multi cursor mode officially in 15.8 you don't need extra tennis extra extension you don't need to turn on a feature flag it's just there by default it is ctrl alt click so excited to show that to you guys um we also added improved our navigation a bit so the ctrl T navigation or our go-to all we also added a recent files a shortcut that I'll show you soon and we also have a navigation keyboard shortcut for going to the enclosing block then in my demo I'll dive into the code cleanup one-click code cleanup controlled KD we're really excited to share more about that and the code cleanup configuration and tools options that we've added I'll also cover Intelli code which is really exciting ok throughout this demo I'll also be wanting to call out just the major improvements that we've made previously across visual studio versions because there's so many I'll definitely go over a source link debugging oops I think it did come out in 15.8 but it is compatible back to 15.7 which is very exciting so I'll kind of be covering navigate to do assembly's go to definition all of the tests explore improvements just that we've made in earlier versions just so people know they they're hearing the big stuff okay did I call out everything yeah that looks good okay okay let's dive into the demo a skate PowerPoint gross okay so I'm generally going to be opening our smart hotel 360 app this app you've probably seen if you watched any of our build demos what were the most recent things if you have gone to any of the Visual Studio Live etcetera um you might have seen our smart hotel 360 it's just a general web app that runs on an azure app service that allows hotel guests to book rooms or book services through our website so I'll go ahead and open that and if you will keep your eye on the test Explorer because I'll never get over how excited I am about source-based discovery so yeah loaded and boom five thousand tests discovered in a matter of seconds so nice um so as you can see I can expand the test Explorer to see a hierarchy view that was a huge customer asked it's organized by project namespace in class I think we got that in first in 15.6 uh but still major feature people are excited about another major one um since we're already inside of the test Explorer is actually making more risk spent responsive test runs so as I run this you can see test pending to execute get this clock icon and tests that are currently executing get a progress ring this is so key when you have a really long test run and you're trying to figure out what is holding up your test run and what is taking so long and you have a suspicion you're like okay I think this test is the culprit you're actually immediately getting feedback on that in the test Explorer so we're really excited to sort of be able to easily identify whatever rhaggy tests that you might be seen okay before I dive into my code I actually wanted to show you our new key bindings so you can easily get there by typing keyboard and quick lunch or just going to tools options it's under environment and keyboard and I'm definitely going to use the default for this demo because that's what I'm really comfortable in but we now have an option to use resharper key bindings as well as visual studio code so it'll make it so much easier if you find your so switching between ID ID ease and which is great because we just want to make you more productive okay and before I dive into my whole demo code flow I actually went to oh right I didn't show off more of test discovery if I uncomment a test it'll automatically appears in the test Explorer I mean yeah I'll never get tired of doing that so it didn't require a bill turret actually to appear super super helpful okay so with the first code fix that I want to show off it is actually caused by a merge conflict so I'll go ahead and cause the merge conflicts really quick so I'll go up to merge in the team Explorer and I'll select to merge master with um this add test branch that I already had oh yeah and I'll go ahead and save so merge conflict appears because on my other branch I had already tried to add a similar method at the same place you can see the code fixes appearing already so you can kind of give us some more room here so I can see when I hit control dot which opens up the light bulb that I get I can choose what branch I would like to take in order to resolve the merge conflict and I can even choose both and it'll just erase the comments that the merge conflict inserted so we'll go ahead and take the head there we go okay so now let's focus in on so that is a 15.8 feature and that was actually submitted by the community which was very very cool so thank you contributors all right so I want to go ahead and invest agay twunt s right here and actually since I want more room to work with this uh one minute I just wanted to check something really quick oh yeah oh that's not looting okay here we go okay now I feel better sorry okay so let's go ahead and check what's happening with this null check why is it causing it why is it failing so since I'll be working a lot with tests and trying to get it to pass again I'm gonna go ahead and start live unit testing now I'm sure a lot of people have heard about it for now but just to make sure everyone's on the same page live unit testing can listen to your code changes as you type and run to any tests that are affected by those code changes in the background as you're developing and it will give feedback in the margin on that test whether for whether to so you know whether or not it passed or failed so if you guys remember I had 5,000 tests in this project I know some of them are just perfect a store regression test or integration test they're not unitized so I don't actually want to include them in live unit testing because they're less interesting at this point something we added to live unit testing is the ability to exclude a large test project so now I know that the tests that are running over my code are only the unit tests and not those integration tests that I didn't want running so I can actually get feedback in the feedback that I want right in the margin so I'll go ahead and use control click to investigate my text housekeeping method so this is generally this is part of my Go Green request you could see that the title of the test was my go green ol test was failing so this is if a customer at our hotel wanted to go green for a while and opt out of that all of the new towels in like getting new sheets every single day because nobody needs that much so this checks so as part of that function they can also text housekeeping and we can insert a message for them but it looks like the GoGreen ol test is throwing an exception so I'm getting an old reference so I'm gonna go ahead and debug this and just wanted to really quick call out that we have an awesome exception helper that pops up now when you're debugging and Visual Studio 2017 you can actually manage the options of why it will appear so I'm getting my message as null and it's no reference exception so I'll go ahead and stop debugging and add a null check one of the many code fixes and refactorings of course is our null check you might have seen it before but here's what's brand-new in 15.8 when I drag this down and I make it a part of my if statements that's checking whether or not the Simar has had housekeeping within the past seven days I get an interesting little sort of prompt here I can tell that my parentheses are actually grayed out so in 15.8 we added remove unnecessary parentheses and now that I see that it's there I'm actually noticing I get this everywhere in my code I guess I was always the kid in the English classroom that added way too many comments to their sentence um so I guess when I learned code learned to code I'd started doing the same thing with parentheses so luckily Roslyn we have a Rossellini analyzer to take care of that for you so something else you might have noticed when I was opening my code fix for this area when I hit ctrl click inside of an if statement it actually offers for me to invert the if-else statement so I can go ahead and hit that and that's just a really kind of clever helpful thing that helps you refactor code really easily um something I also wanted to call out that as soon as I placed in these nil checks I now have passing tests so live unit testing was already in the background re running my tests for me so I'll go ahead and do the invert and I'll check up here but I do really hate when return false is before return true I don't know why that's just me so I think I'll go ahead and go back there we go so there we go so we got a few other options within when we hit control dot and we had clicked inside the if statement one of these is converting it to a conditional expression so that was a very simple so this converts a very simple if-else statement that returns true or false into a ternary expression and then of course I'm prompted to also just use an expression body for this method something I want to call out is that if I had a more complicated if-else statement that maybe had an if statement nesting inside of it and it wasn't always returning true there oops there we go if I try to trigger this code fix again I actually no longer get the prompt to to transform it into a ternary condition so it kind of only suggests it when it's a simple fix that you can easily do in your code and doesn't when your code is a bit more interesting so I'll go ahead and convert it to a ternary expression and then go ahead and make that a expression body ah feels really good okay it's got my demo cheat sheet to make sure you don't skip any of these because I don't going to vast okay so when we're texting housekeeping this client is sending us a message and I actually wrote an azure cognitive service that could run over the guest comments that guests are leaving and actually give a sentiment score for how they're doing so within this I'm actually iterating through this little sentiment batch result item in order to calculate the score in text housekeeping one of the refactorings we added is the ability to convert from four to four each so I can rename my variable that I'm using to iterate it and I can also convert back from a for loop to a for each just a really simple code refactoring that is all about sort of someone's taste and how easy it is for them to read code we now have right in the editor so let's see if I yeah okay I'm doing good so one of the refactorings that works right in this area is converting to linked to for each so we're really excited to show this off because it was definitely a top customer request so if I go ahead in whoo select oh sorry shift alt select my link statement there we go I can trigger the code fit fix so I can convert my link query to for each and I mean not that I've ever had issues reading link but really if there's anyone new on your team who isn't as familiar with the latest things chart features it's really nice to have this code fix then so we don't yet have the code fix to convert for each back to a link but we really hope I hope that I can demo that around that 16 previews maybe connect time frame maybe ignite time frame it'd definitely be in preview there but we understand that that is definitely a high interest code fix to get in okay so going back up to this calculate chocolate method I am actually only texting housekeeping to leave more chocolates if the sentiment score is underneath point 5 so it analyzes the guests comment and then it gives a score from 0 to 1 it's just a pretty easy to use as your cognitive service so what I'm not doing is actually calculating how many chocolates that we should leave based on how a negative their score was so what if I went ahead and added that here so what if I did something like 10 – uh-oh I'm gonna get warnings for using way too many parenthesis again see told you guys so what if I had something more like this let's go ahead and remove that extra parenthesis and you actually see I had another code fix pop up there I can also add the extra parenthesis to make the meeting more clear because hey order of operations is pretty smart there we go we'll have that all in one line because it's easier to read so in this case if the customer had a sentiment of like point it would get down here and it times it by ten sowed before and then ten minus four six so I would text housekeeping to leave six extra chocolates on the pillow right but the text housekeeping method doesn't actually have that parameter so this is our code fix we're adding the parameter from the call site so now that I did that you see I don't get an air and if I actually navigate to text housekeeping which control click you can see that it added this double so if I actually went to the air list you'd see I call this method in a lot of other places so I should definitely add a default value and that takes care yeah of the other issues I was having so I definitely want to include this in housekeeping in my message so I might as well just be using in interpolated string ah that was such an easy fix to do feels so good man interpolated strings get onboard everyone okay so something you might have noticed let's see if I got everything yep looks good okay so something you might have noticed when I was working in the calculate chocolate method was I didn't actually have any on live unit testing test running that's because the tests that I have for this isn't actually included in live unit testing and I'll show you why so I want to navigate to my chocolate sentiment test so I should use ctrl T for that right and I could use the regular camelcase searching was which is pretty fantastic or let's say it's a Monday and I don't actually remember the camel case or even like my test name I can also choose but I dunno I was working in it recently I can also just type r now so it'd be ctrl T R and that will bring up all of the files I've most recently been using you can also click this little recent files clock icon in order to open this up so ctrl T navigation has always had you've been able to type enough for specifically searching for files at4 type sanam for members um now we have our recent piles so pretty wonderful I'll go over to my chocolate sentiment so test so this test has a skip one live unit testing category because as you remember this is actually Colleen and Asha cognitive service and I don't exactly want that running every single time that I make a code change right it's not that that would be too many interactions but I would not expect to get like 3,000 interactions in one coding session from the iShare cognitive service so I probably just want to keep those a manual run so this test is actually in a test file with several other projects that are included in live unit testing but since this has a skip category I can avoid it okay so this test is actually feeling so it looks like it actually doesn't have enough um let's see so inputs returning to grant a chocolate sentiment so what I should do is put in some more guest comments that are more negative so I can select these and hit ctrl D to duplicate them that's one of the newer code fixes as well and then get ready for it Multi cursor I can hit ctrl alt and click in multiple places in order to edit code in all of them so I'll say very bad awful means la chocolate there we go and as you notice as you're calm your service is pretty cool here I'm actually entered in multiple different languages and then it's converting it into the sentiment score that I need so that's just also a really helpful thing so it looks like I added four more negative comments oh wait let's see I think I misspelled chocolate can I go ahead oh I'd undo all of them that's right oh but if I actually still have my cursor there so I'll go ahead and spell it correctly there we go okay so I can use my code lens icon to rerun this test manually and should running running there's the tiny running like huh mmm I was talking too long oh there we go okay so it passed um okay so I wasn't super familiar with a sure cognitive services when I was first building up this app one thing that was really really helpful um when building out my service for this uh I needed to learn a few couple things are a few things about this new gate reference that I'm using and so I didn't know exactly what they expected to have like a multi-language input I didn't know how we needed to read the guest comments as strings into the correct format in order to make like a language batch result so I could use just my cursor to hover over it and get more info about what this method expects me to be infini but one thing that was super helpful was navigating to the decompiled source so this is navigate to decompiled assemblies you do need to turn it on it's not on by default you can turn it on in the text editor whoops that's not it I thought it'd take me right there editor there we go so it's the text editor I think it's C sharp and advanced so this is your enable navigate to decompiled sources and it is still in experimental so we partnered with aisle spy to use their decompiler in order to do compiler source and uh usually you will see like a EULA agreement pop up to make sure that we're allowed to be decompiling one of your new great references so make sure you pay attention to that but I know this is eyes are cognitive services they're totally okay with me doing it so if you focus back in here you actually see more than just getting what order of strings I needed to read into this language ID and then text I also got that Oh language they're expecting a two-letter iso representation so like ian for english or yes or for spanish that's really helpful know what input they're expecting so–that's navigate to decompiled sources but what if the nougat reference that I'm using is actually open source that brings me to source link debugging so I'll go ahead and jump to a different test so I can show you source link to biking this is my airport shot of a quest hat so I was sort of in the middle of implementing function for my user is that so the guests of the heart our hotel would be able to order an airport and get earth I order a shuttle in order to get to the airport in order to do this I took a dependency on Casey Lewin who it's bus helpers a nougat reference so let me show you what source link debugging can do I can set a breakpoint and I'll go ahead and debug this test so as soon as I step into this since I know this nougat references source link I'm actually stepping in to the reference so I can see how someone else's nougat reference is handling the inputs I give it as I step through it if I hover over this little bus helper GCS file at the top I can see that this source is actually in my app local data sources so a data source server so this is actually not a part of my source code but since I case Leland hoot the package maintainer was able to publish it with dotnet core SDK 2 dot 1.3 or later and all the maintainer –zz need to do is change a few things within the cs proj in order to enable this I'm actually able to step through her source so something you also see is that this also has a commit ID within it so you actually know the particular commit that the publisher used to publish their new yet package so when you're like browsing through the source line you will know what you're actually debugging through because you can still compare commits very cool so I'm sure a couple more things I want to call out about debugging is we've added this run to click debugging super easy to use if your hand is already on the mouse something else that we're extremely site excited to talk about more is this little tiny arrow in the top so this is step back debugging and as soon as I hit this I actually go into an historical debugging mode so this is not recompiling my code but I can step back and see what the local variables were and their values when I had compiled of that step this is super helpful if you for if you ever realize you stopped just a little bit too far and you don't want to recompile that line of code by like clicking run to click above your method or above your stuffer where you currently are you can just step back and see what to those variables work so I could click return to live debugging or if I step all the way forward again I will actually enter back into just the regular debugging mode so sort of back to live debugging so we're really excited to show off that historical debugging feature okay so that was sourcelink debugging as well as the Renta click and step back debugging all of which were really excited about the next major thing that I want to talk about is Intelli code so we've always known generally like good programming practices to have and what we should be recommending to users but it's about time machines started teaching us instead so in Teleco do is an extension right now in Visual Studio so it's not a very by default you gotta go grab it I would highly recommend doing so in Teleco is an extension that offers better dock completion better overloads and a few other things so what it is is a machine algorithm that ran over 2,000 dotnet repositories that are in the open source out on github and figured out what the best coding practices in coding styles people are using in certain situations so let me show you it in action so here I'm calling dot on this little first shuttle a string so the most common overloads or properties or sorry methods that people would use on a string are now listen it up at the top before without intellicus Hort of have the static alphabetical list that's not getting people anywhere fast so it actually is saying that the most common property that people use in a dock completion would be length on string so intellicus super great in that if I change this to expect a string array instead of just a var and I type dot completion again I actually now get split at the top so that's what it expects so if I went ahead and did that and then I typed a parenthesis in order to trigger my overload suggestions you can see Intelli code again so which is helpful because split actually has ten overloads and it can tell me what is the most common overload used for this method so it's super helpful so even if I change this back to var now I mentioned that in Telugu can also learn what context you're operating in so I just called split right above this method it now thinks as soon as someone calls split it is more likely that they call trim so you'll notice if this had no context around it it still would have been dot length up at the top just a really cool feature and then if I do my dot completion a third time it now knows that I'm actually just repeating myself so it is offering split again because that's what I will more likely want to use in this context so this is super well this is a date time function so if I do dot completion on that similar sort of recommendations are at the top so it's really popular unlike commonly used types so assert is definitely one of those so it'll have top suggestions for a cert op overloads for the most common things used in this earth um the last thing I want to call out about Intelli code is let's take for example KC Olin hoots bus helper new cut reference so I don't actually have this class library I was not one of the libraries that Intel code trained on properly probably or it's just not used as commonly so you won't see until a good suggestions there which makes a lot of sense okay so that is intellicus that I want to show you or sorry this is a navigation shortcut is ctrl out alt up arrow that is jumping to your enclosing block so it only worked for jumping from the bottom to the top so if I put my cursor inside of my class and hit ctrl alt up arrow I will jump to the top of my class so just another just nice little navigation feature that you find yourself using a lot so look what is the code style and spacing happening over here this does not look good don't worry we'll get rid of this in a second one thing that we are really excited to introduce is the one-click code cleanup so that is control KD ah feel so much better with my spacing but I'm noticing it didn't actually apply the VAR rule even though I'm being prompted with a code suggestion for it to apply um so in order to change this but that's actually because we put the vara code style role as unchecked by default and I'll show you what I mean so I can go to my cleanup options and that is in text editor c-sharp code style format in general or if you forget that line of things just hit ctrl Q it'll put your cursor and quick lunch and you can type in cleanup and it'll bring you right where you need to be so this apply implicit explicit type references is now unchecked by default we realize that would probably be a more gentle interaction to code cleanup we don't need people um you know breaking each other into jail with that one when you're trying to just apply code styles with your team so I'll hit ctrl K D again and now I have explicit types okay so I also wanted to mention really click that when I was in the options up there I you can also set a lot of your code style preferences in the IDE from visual studio so it's interesting I actually have preferring explicit type but I'm not actually offering a suggestion only a refactoring but you're still seeing that I'm getting a well I was getting a suggestion in my actual code file this is because I have an editor config so editor configs can overrule the code style rules that you have set through the visual studio UI and I wish that I could tell mo um the ability to export the code style rules that you've already set through visual studio into an editor config file format that's something we're definitely working on we hear you hopefully maybe that'll be like a dead 16 preview I'm sorry Visual Studio 2019 a preview kind of thing that we can show later but not yet but we're working on it so if you a lot of you may have heard about editor config before it's absolutely like applauding the community kind of thing editor config existed before like a part from dotnet and we adopted it because it was an awesome sort of code style and Universal formatting guide that people could use across IDs and languages so we adopted it and worked with that community awesome stuff and created our own dotnet code style so this is what you see in this editor config that I have in my solution but you realize that yeah these can be these might be kind of tedious to set yourself um so what I actually want to show you is where editor config and in Teleco and intersect so I'll actually go ahead and save this file okay so over in my solution Explorer like let's say that I wanted to I really liked all of the coding style in my public web dot test project if I wanted an editor config that exactly matches the code style that I'm already following in that project and tella code can help me make that so what I need to do is right click add a new item and search for editor config so we have a default editor config and a dotnet editor config but if you have the entelechy extension installed on your machine you can actually create an intel occurred in fir'd editor config now another awesome that thing about utter config is that it can nest and its director directory based so this editor config will still inherit from the root that I have at on my solution level but any rules that it has specifically said it will overrule but only within my public web test context so I can have different code style rules in my test project versus my project code so if I went ahead and looked at the comments here I can actually see that this file was initially inferred by Visual Studio and Teleco from my test project so that is super helpful and it also has the date listed in there so I know when it was actually conferred inferred so if I scroll down to where I am studying my VAR rules and I go ahead and change my using bar for built-in types to true and go back to my guess for test test requests test you will now see it rerun over this test or maybe not or maybe I'll switch to this again and save it and then go back there we go okay maybe it just needed a little bit more time so now I am getting the code fix to apply var instead of the explicit type and I could do this in my whole document or I could just hit ctrl K D again because I know it's now being picked up as I under those code style rules okay so that isn't elekid combined with editor config now see you thought I was making a statement about using VAR or explicit types but now we're just back to using a bar so I am completely neutral in that argument we're not starting out here this is the wor free zone okay so that was a lot of content let's do a quick recap back on the slides so we'll go here mmm okay so I showed off new keyboard profiles several refactorings for loop de for each and fit invert if ternary conditional all of that I won't read through all of them again something you might have noticed with all of these features being added to every single version even minor versions of Visual Studio is that there's a lot of them first off and we're iterating very fast and I can't stress this enough a lot of this is due to our really big decision of reaaargh detecting the Rosslyn compiler that we first shipped back in Visual Studio 2015 so Rosslyn was our c-sharp and visual basic compiler that was reacted to an extendable API that was completely focused on being open source and more of a platform for a community to plug into the community had an awesome response to that I know the merge conflict code fix is definitely contributed by the community I think there are a few more in there but we just had a really incredible response there uh so part of extending Rozlyn is being able to create your own Rozlyn analyzers so I just want to take you through really quick what that looks like I think it's so important that people sort of wrap their heads around what exactly creating your ROS your own Rozlyn analyzer means so if I went ahead and created an analyzer code fix private provider I'm only getting these areas because I haven't hasn't restored I can actually launch an analyzer project and in doing so it launches another version of Visual Studio I'm not sure if you all have seen this before but it's very meta so you're running Visual Studio from Visual Studio so sometimes it takes a little bit longer to startup but this version of Visual Studio is being launched by this one so if I went ahead and opened my console project I can actually see our default analyzer template running over it and sure it takes a little bit of extra time for Visual Studio to also launch Visual Studio but I feel like the metaphor is strong when I when I do go through it there we go okay so here I have just a class named Kendra and our default analyzer just when you file a new project Rozlyn analyzer is making a code fix that changes your class name to all caps so it's make uppercase so I can actually set a breakpoint within there I'll probably need to maybe set it down there and open up my other version there we go and now when I hit the control dot to open my code fix it actually triggered a break in my analyzer project in Visual Studio so that's sort of what analyzer development implies it's really fun to do and the community has had such an incredible response to using it actually I think I'll go ahead and show you uh one of them if I went ahead and opened an ex unit project you can see what Roslyn analyzers that X youcan't unit community has already made using the Rosalyn api's and they're very cool so you can see in my solution Explorer that I actually have an X unit project rule set that's because I went ahead and grabbed the nougat reference that applies a X unit analyzers so these are all of the rules that all see that I'll be seen so one of these is for example a fact methods cannot have parameters so what if I went ahead and tried to woo add one so you can immediately see that I'm getting a code fix that says oh hey if you're using if you want to use a parameter that should actually be an X unit theory so that can apply a code fix so let's see oh I think it's just prompting me to so I could just convert that to a theory in order to get that to pass so that's those code fixes and analyzers aren't provided by you know Microsoft that was that was our tools that were then taken by the community and they ran with them and it's a very cool library to check out okay something else I love to call out during talks well first I'll skip on to the resources so that you guys kind of have a launching point um and then I'll talk about Docs at the end because it's the last resource that I mentioned so all of the tips and tricks for Visual Studio that I just showed you you can although little code refactorings and everything I just went over you can get at a kms /v s 2017 guide so that we'll have much more documentation and actually write out all the keyboard shortcuts that I just used because I know that's hard to keep up sometimes when I'm just saying them out loud you can go and grab the entelechy extension at akms slash Intelli code and if you are a nougat package maintainer and you'd like to enable source link for your for the people consuming your package you can go to github.com / dotnet slash source link to find more information about how to hook up your source and how to publish your reference with what you need to enable a source link um throughout the demo I used live unit testing so that is an enterprise only feature you can learn more about it at a Cayden ms slash live unit testing so I know a lot of people really love to focus and only on the like visual studio version 15.8 brand-new features so I went ahead and made a like one-page simple tutorial on all the productivity 15.8 features that's in my repository it's Kendra he it's on github slash Kendra Haven slash productivity – 15.8 so you can download that and check that out it's a really simple you just go straight through the the file and enable all of the refactorings that I explained how to do in the comments on all of the methods so the last thing I want to call out and when I always like to kind of kind of a public service announcement is that our Doc's are open source and you can submit pull requests to them and they're wonderful to use so I'll go ahead and go over there right now so this is our Visual Studio 2017 c-sharp productivity guide always you can change your theme from dark to light absolutely wonderful I mean from light to dark and always leave it there and I can hit this edit button and this will bring me right to where this document is hosted on github on um so I think Myra Wenzel has a talk later and during dotnet comp I think it's uh probably not tomorrow but the next day and I'm guessing she'll be talking all about our open source Docs and how she maintains it she does a ton of work on the dotnet Docs and it's wonderful to work with her so you can easily navigate to where the doc is hosted on github and click this little edit button and you can edit the doc right in your browser you don't even need to actually clean the repository if it's a small change and then you can propose the file change and make a PR request right in your browser it's really easy to do especially for Docs it's also kind of a good starter project anyway so that was Visual Studio 2017 productivity thanks so much for watching

28 thoughts on “S105 – Latest Productivity Updates in Visual Studio 2017 Update 15.8

  1. Instead of focusing on making VS2017 load a project 2 seconds faster than 2015, could you "PLEASEEE" fix some of all the everyday super annoying bugs? – I think VS2017 has become one of the most buggy versions of VS ever , which is a shame, as i LOVE VS, and loved how it use to work (before you screwed it up completely) – Don't care about live-tests, because it only works in the Enterprise version (which i have license to), but i can't use it, because its so heavy and buggy, that i had to downgrade to pro anyway.

  2. Мне некогда учить ваш примитивный английский язык, чтобы вас понимать!

  3. This is all great. If you would be able to use the same standard shortcuts as those in VS code or any other editor, that would be great! I mean, some of the text editing functions that are available in Code are sooo good. Block selecting, alt-moving, ctrl-alt-arrow duplicating (that is what I am getting at, ctrl-d in VS). Is it too ubiquitous to try and merge the functionality? Code is such an awesome project.

  4. It would be better if Ctrl+D would do Select_next_word/Select_next_occurance as in Sublime text and almost all other editors that support multiple custors.

  5. But when do I get the Intellisense update that writes my code for me? It still expects me to type two or three letters before it figures out what I want to do. Who has time for that?

  6. I like the scroll down thing where you see the whole document, really helpful. There is a bit of a problem though if you need to use visual studio build tools from 2015 they are not really compatible with the new version.

  7. Will IntelliCode eventually make suggestions based on your personal code? Or will the recommendations always be based on these 2000 open source projects?

  8. Since developer time is precious, these video should only show what's new for the latest version. MS could create playlists linking them together for those who are getting started.

  9. In the docs the Light and Dark modes shouldn't use the moon for dark because that should be used for night mode which would be different.

  10. Love all the improvements coming with each update to Visual Studio, keep up the great work. So many new features in 15.8 that I wasn't even aware were there, thanks for showing them.

  11. I wonder if I will still want to renew my ReSharper subscription with these latest productivity updates in Visual Studio 2017 … 🙂

Leave a Reply

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