Samples and Walkthroughs
Anthony D. Green edited this page Oct 27, 2015
·
11 revisions
Pages 37
- Home
- API Changes
- Building Testing and Debugging
- C# Interactive Walkthrough
- Contributing Code
- Diagnosing Project System Build Errors
- EnC Supported Edits
- FAQ
- Getting Started C# Semantic Analysis
- Getting Started C# Syntax Analysis
- Getting Started C# Syntax Transformation
- Getting Started on Visual Studio 2015
- Getting Started on Visual Studio 2015 CTP 5
- Getting Started on Visual Studio 2015 CTP 6
- Getting Started on Visual Studio 2015 Preview
- Getting Started on Visual Studio 2015 RC
- Getting Started VB Semantic Analysis
- Getting Started VB Syntax Analysis
- Getting Started VB Syntax Transformation
- How To Write a C# Analyzer and Code Fix
- How To Write a Visual Basic Analyzer and Code Fix
- Interactive Window
- Labels used for issues
- Languages features in C# 6 and VB 14
- Linux Instructions
- New Language Features in C# 6
- New Language Features in VB 14
- Performance considerations for large solutions
- Roadmap
- Roslyn Overview
- Samples and Walkthroughs
- Scripting API Samples
- Syntax Visualizer
- VS 2015 CTP 5 API Changes
- VS 2015 CTP 6 API Changes
- VS 2015 RC API Changes
- Walkthroughs
- Show 22 more pages…
Contributors
Building, Testing, and Debugging
Tool Authors
Status
Edit-and-Continue Supported Edits
Interactive Docs
Clone this wiki locally
Samples
The samples below are available in the Git sources, under the Samples folder:
- APISampleUnitTests - A collection of unit tests that show how various APIs can be used. Many of these methods are referenced in the FAQ.
- AsyncPackage - A set of diagnostics and code fixes that help you use the await/async keywords correctly.
- ConsoleClassifier - A simple console application that prints colored source code to the console.
- ConvertToAutoProperty - A code refactoring to change a simple property with a trivial getter and setter into an auto property.
- FormatSolution - A console application that formats all C# and VB source files in a solution.
- ImplementNotifyPropertyChanged - A code refactoring to make selected properties of a class support PropertyChanged events. Select the properties to be updated in the editor, press Alt+. to show the refactoring lightbulb menu, and choose "Apply INotifyPropertyChanged pattern."
- MakeConst - A diagnostic (user defined compiler warning), that indicates when local variables can be made const, and a quick fix to make the variable into a const. The Diagnostic walkthrough below explores this sample in detail.
You can also explore the source repository to see how the Compiler and Workspaces layers make use of the APIs:
- The Diagnostics folder in the sources has many examples of real-world Diagnostics (mostly re-implemented FxCop rules) and Code Fixes. Just drill down to the leaf-node code files in the CSharp or VisualBasic subfolders.
Walkthroughs
Before working through the walkthroughs below, you should first familiarize yourself with the Roslyn Overview, which sets up some of the key concepts.
Getting Started
- Getting Started - Syntax Analysis (VB | C#)
- Getting Started - Semantic Analysis (VB | C#)
- Getting Started - Syntax Transformation (VB | C#)

