Microsoft Ignite NZ 25-28 October 2016 SKYCITY, Auckland.

Slides:



Advertisements
Similar presentations
Joe Hummel, the compiler is at your service Chicago Code Camp 2014.
Advertisements

Joe Hummel, the compiler is at your service SDC Meetup, Sept 2014.
Joe Hummel, the compiler is at your service Chicago Coder Conference, June 2016.
10/18/2017 3:02 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Three Runtimes, one standard… .NET Standard: All in Visual Studio 2017
C# and VB code-focused development with Visual Studio
5/19/2018 1:01 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
TechEd /1/2018 7:56 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
The Future of C# The Future of C# and VB 2-577
Data Science & Web Dev with Python in Visual Studio
Azure API Management Jothi Prakash A
Introducing ASP.NET Core 2.0
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
Microsoft Virtual Academy
Tips and Tricks in Visual Studio 2017
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
Microsoft Ignite NZ October 2016 SKYCITY, Auckland
Explore web development with Microsoft ASP.NET Core 1.0
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
Building modern web applications with Visual Studio and Web Essentials
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
Microsoft Build /19/2018 2:06 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Microsoft Virtual Academy
Xamarin Inspector & Profiler for Visual Studio Enterprise
What’s new in Visual Studio for web developers
Microsoft Connect /26/2018 6:08 PM
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
Learn. Imagine. Build. .NET Conf
Microsoft Build /30/2018 2:15 AM Migrating Silverlight Windows Phone apps to the Universal Windows Platform Ricardo Villalobos Principal SDE Manager.
C# Today and Tomorrow Mads Torgersen,
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
12/1/2018 9:33 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
What’s new in F# 4.1 Phillip Carter Program Manager.
DotnetConf 12/3/2018 1:48 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE.
Application Insights Diagnostics Preview
Web Development in Visual Studio 2017
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
Microsoft Connect /2/2019 9:06 AM
Microsoft Connect /17/2019 9:04 AM
Microsoft Connect /17/2019 9:55 PM
Welcome to Azure Notebooks
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
2/16/2019 8:43 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Microsoft Connect /16/ :45 PM
C++ Productivity Improvements
Microsoft Connect /22/2019 9:54 PM
Microsoft Connect /23/ :38 AM
Microsoft Build /27/2019 2:26 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Using Windows Runtime and SDK to build Metro style apps
Create rich, data-driven Web apps with ASP.NET 4.5 Web Forms
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
Microsoft Build /8/2019 6:29 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Learning with Xamarin Workbooks
Windows Device Portal Hirsch Singhal Program
“Hey Mom, I’ll Fix Your Computer”
4/29/2019 9:20 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
DEV322 Visual Studio 2005 C# IDE Enhancements
5/13/ :30 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
5/6/2019 7:40 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS.
Microsoft Connect /28/2019 1:25 AM
5/30/2019 1:59 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION.
Microsoft Ignite NZ October 2016 SKYCITY, Auckland
Server & Tools Business
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
11/11/2019 1:15 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Microsoft Connect /14/ :11 AM
Presentation transcript:

Microsoft Ignite NZ 25-28 October 2016 SKYCITY, Auckland

The Power of Roslyn: Improving Your Productivity with Live Code Analyzers Kasey Uhlenhuth Program Manager .NET & Visual Studio @kuhlenhuth

Agenda Introduce Roslyn Demonstrate Analyzers 4/6/2019 10:23 AM Agenda Introduce Roslyn Demonstrate Analyzers Build an Analyzer (using in-progress IOperation) Explore Analyzer Ecosystem © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

http://roslyn.io @roslyn Microsoft Ignite 2016 4/6/2019 10:23 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Microsoft Ignite 2016 4/6/2019 10:23 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

1 2 Write new features faster Provide open source API Microsoft Ignite 2016 4/6/2019 10:23 AM 1 Write new features faster 2 Provide open source API © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

1 Write new features faster Microsoft Ignite 2016 4/6/2019 10:23 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Tuples Easily pass around groups of values

Pattern matching Test the shape and content of expressions

Local functions Clean up classes by nesting helpers

2 Provide open source API Microsoft Ignite 2016 4/6/2019 10:23 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Microsoft Ignite 2016 4/6/2019 10:23 AM Analyzers identify errors and provide fixes in your code as you type, i.e. without having to wait for a build. © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Demo Microsoft Ignite 2016 4/6/2019 10:23 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Analyzer Severities Editor Treatment Build Consequence In Error List Microsoft Ignite 2016 4/6/2019 10:23 AM Analyzer Severities Editor Treatment Build Consequence In Error List Error Breaks Yes Warning None Suggestion No © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

VSIX NUGET Microsoft Ignite 2016 4/6/2019 10:23 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Teach new language features/concepts Introduce best practices for SDK Enforce code style rules Identify errors before build 4/6/2019 10:23 AM © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Syntax and Semantic APIs 4/6/2019 10:23 AM Syntax and Semantic APIs Syntax Tree High-fidelity representation of source code Semantic Model Answers semantic questions about syntax IOperation In-progress evolution of Roslyn APIs Provides semantic information Abstracts over common syntactic shapes Common representation for C#/VB Syntax Generator Can generate source code for both C# and VB © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Let’s write an analyzer! 4/6/2019 10:23 AM Let’s write an analyzer! var a = new int[0]; var a = Array.Empty<int>(); © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Diagnostic Code Fix Microsoft Ignite 2016 4/6/2019 10:23 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Demo Microsoft Ignite 2016 4/6/2019 10:23 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

4/6/2019 10:23 AM Analyzer Ecosystem FxCopAnalyzers (MSFT): https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers/ SonarLint http://www.sonarlint.org/visualstudio/rules/index.html StyleCopAnalyzers: https://github.com/DotNetAnalyzers/StyleCopAnalyzers CodeCracker https://github.com/code-cracker/code-cracker Roslynator https://github.com/JosefPihrt/Roslynator VS Refactoring Essentials: http://vsrefactoringessentials.com/ GCop: https://visualstudiogallery.msdn.microsoft.com/f082f20e-5123-4c0d-975a-0a17995d858b © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Call to Action Write an analyzer! Explore what is in the ecosystem 4/6/2019 10:23 AM Call to Action Write an analyzer! https://github.com/dotnet/roslyn/wiki/Getting-Started-Writing-a-Custom-Analyzer-&-Code-Fix Explore what is in the ecosystem kaseyu@microsoft.com @kuhlenhuth © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Related Sessions C# and Visual Basic Code-focused Development with Visual Studio “15” [M380]

4/6/2019 10:23 AM © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.