Microsoft Ignite NZ 25-28 October 2016 SKYCITY, Auckland
C# and Visual Basic Code-focused Development with Visual Studio “15” Kasey Uhlenhuth Program Manager .NET & Visual Studio @kuhlenhuth
Agenda Intro Visual Studio 2015 “Roslyn” Productivity Languages 9/16/2018 11:46 PM Agenda Intro Visual Studio 2015 “Roslyn” Productivity Languages Foundation: performance, reliability © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Visual Studio 2015 Microsoft 2016 9/16/2018 11:46 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Roslyn Write new features faster Provide open source API
9/16/2018 11:46 PM Exploring the power of Roslyn in Visual Studio 2015 & Visual Studio ‘15’ © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
9/16/2018 11:46 PM Exploring the power of Roslyn in Visual Studio 2015 & Visual Studio Next © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Productivity Refactoring support Navigation/search Style enforcement Microsoft 2016 9/16/2018 11:46 PM Productivity Refactoring support Navigation/search Style enforcement Better IntelliSense Testing © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Productivity Demo 9/16/2018 11:46 PM © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Productivity Takeaways In-the-box refactorings Enhanced navigation Smarter IntelliSense Configurable code style Custom analyzers
Visual Studio “Next” Visual Studio 2015 C#6.0 & VB14 C#7.0 & VB15 Microsoft 2016 9/16/2018 11:46 PM C#6.0 & VB14 Go To Implementation Refactorings/Code Actions Extract method, inline temporary variable, introduce local, change method signature, remove unnecessary usings/Imports make method synchronous adding using/Import from reference assembly add using/Import for types in NuGet fuzzy matching delegate simplifier convert method to property C# Interactive Baseline Diagnostics Solution-wide analysis toggle/perf improvements FX Cop rules as analyzers (via NuGet) C#7.0 & VB15 “Go To” redesign Suggestion severity Refactorings/Code Actions move type to matching file add missing switch case convert property to method use string interpolation add braces IntelliSense Improvements highlighting/filtering target type preselection Code Style prefer var/explicit type, etc. naming conventions basic .editorconfig support Visual Studio 2015 Visual Studio “Next” © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
C# 6.0 & Visual Basic 14 String interpolation Microsoft 2016 9/16/2018 11:46 PM C# 6.0 & Visual Basic 14 String interpolation Expression-bodied members Null-conditional operator Nameof expressions Using static © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
9/16/2018 11:46 PM Language Demo © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
C# 7.0 & Visual Basic 15 Tuples Pattern matching Local functions Microsoft 2016 9/16/2018 11:46 PM C# 7.0 & Visual Basic 15 Tuples Pattern matching Local functions Ref returns ValueTask<T> © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Tuples Return multiple values from a method
Pattern matching Functions can operate over plain old data
Local functions Improve code organization & unclutter IntelliSense
9/16/2018 11:46 PM Language Demo © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
C# 7.0 & Visual Basic 15 Tuples Pattern matching Local functions Microsoft 2016 9/16/2018 11:46 PM C# 7.0 & Visual Basic 15 Tuples Pattern matching Local functions Ref returns ValueTask<T> © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
C# 7.0 & Visual Basic 15 Tuples Pattern matching Local functions Microsoft 2016 9/16/2018 11:46 PM C# 7.0 & Visual Basic 15 Tuples Pattern matching Local functions Ref returns ValueTask<T> © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Performance on large solutions Microsoft 2016 9/16/2018 11:46 PM Performance on large solutions “ Performance is the biggest issue. It takes an actual minute or so to start VS. Similarly loading projects can be painfully slow. ” © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Full Solution Analysis 9/16/2018 11:46 PM Full Solution Analysis © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
9/16/2018 11:46 PM CodeLens © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Out-of-process Visual Studio Next 9/16/2018 11:46 PM Out-of-process Visual Studio Next © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Deferred Project Load Visual Studio Next 9/16/2018 11:46 PM Deferred Project Load Visual Studio Next © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Performance Recap Out-of-process Deferred Project load 9/16/2018 11:46 PM Performance Recap Out-of-process Deferred Project load More performance tips for large solutions at http://bit.ly/2acRfiA © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Takeaways Visual Studio 2015 + “Roslyn” Productivity boosts 9/16/2018 11:46 PM Takeaways Visual Studio 2015 + “Roslyn” Productivity boosts New Language features Foundation: performance, reliability © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Related Sessions The Power of Roslyn: Improving Your Productivity with Live Code Analyzers [M344]
Resources GitHub Repo: http://roslyn.io Microsoft 2016 9/16/2018 11:46 PM Resources GitHub Repo: http://roslyn.io Performance tips: https://github.com/dotnet/roslyn/wiki/Performance-considerations-for-large-solutions Roslyn Twitter: https://twitter.com/roslyn C# Interactive Walkthrough: https://github.com/dotnet/roslyn/wiki/C%23-Interactive-Walkthrough Writing Custom Analyzers: https://github.com/dotnet/roslyn/wiki/Getting-Started-Writing-a-Custom-Analyzer-&-Code-Fix © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
9/16/2018 11:46 PM © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.