15 ms·
.NET Productivity Improvements [video]
- topbanana 10y agoLooks like NCrunch is now built-in. I happily paid for this extension, which is now redundant. I hope MS paid the developers for their idea!
- taspeotis 10y agoI can't see the video, but if you're referring to continuous testing then yes. http://comealive.io/Code-Connect-Joins-Microsoft/ http://comealive.io/Code-Connect-Joins-Microsoft/
- alkonaut 10y agoHow does it find which tests are relevant? How big can the solutions and test suites be before it starts to...not work? I have a decent sized project (100 projects, 10k+ tests, different suites with longer running smoke tests that take hours and so on). How does it know which tests it can run, and how does it know which will cover a certain line?
- topbanana 10y agoI can only speak for NCrunch, but once it's done a full coverage run, it knows which tests are likely to be affected by any changes, so it runs those tests first.
- gokhan 10y agoYou can automatically re-run affected UI tests after any code change with UI tests recorded in Microsoft Test Manager, since 2012 if I remember correctly. So the technology is already there, I guess it was relatively simple to apply it to unit tests. Test Professional is an interesting product, with recording manual tests, turning them into code, running them as a suite etc. https://www.visualstudio.com/vs/test-professional/ https://www.visualstudio.com/vs/test-professional/
- topbanana 10y agoSounds fragile as hell. How does it work in practise?
- Metasyntactic 10y agoHi Alkonaut, i'm dev on the Roslyn team, and i work closely with the group working on LiveUnitTesting (LUT). By default LUT just runs all your tests in realtime, as you make edits. It smartly prioritized tests based on seeing what code was previously hit by tests. Now, that said, such an approach would definitely not scale up to projects with huge amount of tests, or tests that take hours and hours to run. As such, LUT provides ways to create 'test sets'. i.e. sets of tests scoped down to just the work you're doing. The intent is to have flexible way to create these sets and the individual sets can be set up to run automatically or manually depending on your preference. A nice things is that all of these test run outside of code VS. So the perf of the tests is far less impactful on VS than it would be otherwise. i.e. you don't have a single GC engine trying to manage all the memory for core VS as well as whatever garbage the tests are generating. With this, and with tests running at lower pri, your editing experience should not be impacted (and we take perf impact very seriously with this feature). Cheers!
- alkonaut 10y agoGreat answer, thanks
- restlessmedia 10y agoI thought the same, bit of an NCrunch killer there. Code style looks good - both welcome additions to the IDE.
- douche 10y agoThat is always the danger of building a business around filling in holes in other people's products. NCrunch is far from the only continuous testing runner. I've been using the one built into ReSharper lately.
- logiclabs 10y agoIt's only available in the Enterprise version, which is well beyond the budget of most. https://www.visualstudio.com/en-us/news/releasenotes/vs2017-relnotes#LiveUnitTesting https://www.visualstudio.com/en-us/news/releasenotes/vs2017-...
- taspeotis 10y agoSome Microsoft Partner tiers give you 5-10 MSDN Enterprise subscriptions. I think Gold ISV gives you 25. https://partner.microsoft.com/en-AU/membership/msdn-subscriptions https://partner.microsoft.com/en-AU/membership/msdn-subscrip... The registration fee is something like $2K. There are various competencies you need to demonstrate to become a partner, but there's enough diversity between them that most businesses with Microsoft tech somewhere in the stack could become a partner.
- douche 10y agoIf you are an ISV producing code that runs using Microsoft tech on Windows, it is not particularly difficult at all to qualify as at least a Silver-level partner. It's kind of a PITA to run your applications through the verification process every couple of years, but it's not hard, more tedious; or you can get a couple people to pass some of the certification tests.
- LyalinDotCom 10y agoSuggestion, you should also check out this video: Live Unit Testing https://channel9.msdn.com/Events/Connect/2016/171 https://channel9.msdn.com/Events/Connect/2016/171
- bobcostas55 10y agoWhat happened to integrating the Alive extension? MS bought them, shut it down, and now they're not adding it to VS?
- Metasyntactic 10y agoHi Bob, I'm a dev on the Roslyn team. Alive is still being worked on. :) But making something production quality and adding it to VS takes a lot of time.
- bobcostas55 10y agoGood to know, thanks for the info. Hopefully in VS "16", then.
- setq 10y agoIs there a tl;dw (too long didn't watch)? 12 minutes can probably be combined into a few bullet points which is far closer to my attention span.
- zubspace 10y agoLive Updated UnitTest OK/Failed/Not-Covered line indicators. Better Exception Messages. NullReferenceException displays what variable caused it. Inner Exceptions are somehow displayed on top level. Configurable Code Style suggestions/enforcement. Intellisense filters in dropdown including shortcuts (Only show methods, properties, etc.) Ctrl-T. "Goto All". Navigates to file or symbol, also with filters. Find all References is now a nested, colorized tree. All in all a nice update, cleary inspired by Resharper. We'll see how Resharper will evolve after this. I still depend a lot on it, because it really offers alot of features which are sub par in Visual Studio, for example like superior refactoring options, better 'find usages', File Structure Window, UnitTest Sessions. Things I use and depend on each and every day. Edit: Here's an alternative link on youtube with the same video, if someone prefers that: https://www.youtube.com/watch?v=TJu0hzuz9hE https://www.youtube.com/watch?v=TJu0hzuz9hE
- setq 10y agoExcellent thanks for this - much appreciated. I dumped R# a few years back. It couldn't cope well with larger C# projects that I have to deal with and regularly hoses VS. Plus I spend a lot of time on Linux platforms so I don't want to get further embedded in that ecosystem as a mindset really.
- LyalinDotCom 10y agoYou can read this article Kasey wrote instead, free up online on MSDN magazine: Visual Studio Development – Productivity Enhancements in Visual Studio 2017 RC https://msdn.microsoft.com/magazine/mt79 https://msdn.microsoft.com/magazine/mt79
- sreyaNotfilc 10y agoI love this! We all come from different backgrounds and may never have had the chance to brush up on the best-practices of the updated code. I just bought a book that's about 1,600 pages long on the latest ASP.Net framework. Interesting stuff there, but it can be daunting to learn. I love how Visual Studio is moving towards suggesting best practices for their languages with these new features. Not only are you going to write more solid code, but you'll also can improve and update your skill-set in C#. I think C# is a fantastic language, and the more I learn about it the more I want to code in it. Its beginning to be less of a "means to an end" and more of a very solid tool for productivity code. I can't wait to use this new version of VS.
- d--b 10y agoHaving coded in C# with Resharper for more than 7 years, I feel like I can't code in any other language anymore. I mean anything that doesn't have that level of intellisense / navigation / refactoring is just so painful to work with for me.
- Anchor 10y agoI especially cannot live without the high quality static analysis possible on .NET anymore. So much so that any dynamic language just feels "shaky". I mean, when you are not entirely sure you covered all method calls with that refactoring, it feels uneasy. Upon reflection, my code editing workflow follows surprisingly often the results of the static analyzer: I remove a code element and let the ReSharper figure where I need to go to make the required changes, be that variables in one function - up to solution wide elements. Alt+PgDown - Alt+Enter is a very powerful combination. Edit: my goodness, it just struck me that I have used C# for 13 years already.
- Anchor 10y agoVisual Studio seems to keep incorporating features from ReSharper in every new version, and ReSharper subsequently keeps adding new features as a response. The ReSharper developers have the fun task of combining these features into a coherent UI. New features in VS2017 that were already in ReSharper include configurable suggestions from static analysis, Ctrl+T navigation (it even uses the same shortcut), structured find references, intellisense filtering, multiple refactorings in given scope, live unit testing and coverage (in ReSharper Ultimate). This is great and a bit amusing at the same time, but as a user, I like the improvements we get.
- tonyedgecombe 10y agoEvery time a new version of VS comes out I try it for a while without Resharper, usually it only takes a few days before I miss something important.
- recursive 10y agoEvery time I try to use Resharper, it takes only a few days before I have to uninstall it. Last time, I couldn't find a way to turn off ctrl+click navigating to a definition.
- Anchor 10y agoReSharper | Options | Environment | Search & Navigation | Rich mouse navigation in the editor
- chinhodado 10y agoWhy do you want to turn it off? Do you use ctrl+click for something else?
- hhjj 10y agoCopy in one click when dragging a selection (very useful if you just selected words with ctrl+click).
- 10y ago
- partycoder 10y agoCopying and pasting the code in the live demo really irritated me. They should make the constructor reuse the default constructor.
- gacek 10y agoNote: the Go to navigation is available since VS 2010, you only need to set the shortcut. Integration of style-cop-like rules seems ok, my only worry is that all those features will make VS sluggish. And that braces refactoring seems a poor example. Either you are a member of your team, and you don't write code without them, or it's some old code, that shouldn't be automatically refactored if the refactoring is the only goal.
- Metasyntactic 10y agoHi Gacek, > Integration of style-cop-like rules seems ok, my only worry is that all those features will make VS sluggish They really shouldn't. We've actually spent the majority of our time in VS2017 on perf. So even with all the extra functionality, it's significant faster and more responsive across the board. One thing that helps out here is that we don't run any of this analysis in the core VS process. As such, we are not contending for any resources that VS itself needs. i.e. a large source of hiccups in VS was due to the GC having to run right when a UI request was coming in. By moving this analysis out of proc we dramatically lighten the memory load in VS and we make it so that the GC runs less often, and takes less time. This clears up the UI thread more and makes things much more responsive. > Either you are a member of your team, and you don't write code without them, or it's some old code, that shouldn't be automatically refactored if the refactoring is the only goal. Or, you're a team that has decided on new, more stringent, coding requirements. And now you want to find and fix up all the violations. Or you're absorbing code by a different group with different coding patterns. Or, you just missed something during a code review and you want to go fix it up :) If teams have a style preference, then it is definitely valuable to have automated tooling checking to ensure the style is maintained. Otherwise you're shifting the burden onto the team members, which is precisely what tooling like this is supposed to alleviate. > And that braces refactoring seems a poor example. NOte: we've added many style options in VS2017, and we're going to continue adding more. Options include: 1. Do you want field/property/methods/events qualified with "this." or not 2. Do you prefer predefined types (like "string") or do you prefer the .net fx types (like "System.String") 3. How and when do you use "var". 4. Do you want to use => for simple properties/methods/etc. 5. Would you prefer to use the more concise typechecking constructs over the previous approaches for type-checking. 6. Do you want to use ?? or ?. when applicable etc. etc.