Learn Roslyn Now is a blog series that explores Microsoft’s Roslyn compiler API. My aim with this series is to introduce people to the power of Roslyn through small self-contained examples. I’ve taken inspiration from LearnVSXNow, a series by Istvan Novak that walks people through Visual Studio Extensibility.
- Part 1: Installing Roslyn
- Part 2: Analyzing Syntax Trees With LINQ
- Part 3: Syntax Nodes and Syntax Tokens
- Part 4: CSharpSyntaxWalker
- Part 5: CSharpSyntaxRewriter
- Part 6: Working with Workspaces
- Part 7: Introducing the Semantic Model
- Part 8: Data Flow Analysis
- Part 9: Control Flow Analysis
- Part 10: Introduction to Analyzers
- Part 11: Introduction to Code Fixes
- Part 12: The DocumentEditor
- Part 13: Syntax Annotations
- Part 14: Introduction to the Scripting API
- Part 15: The SymbolVisitor
- Part 16: The Emit API
Learn Roslyn Now TV
- Episode 01: Introduction to Roslyn Tooling
- Episode 02: The Syntax Tree API
- Episode 03: The SyntaxWalker API
- Episode 04: The CSharpSyntaxRewriter API
- Episode 05: The Semantic Model and Symbol API
- Episode 06: The MSBuildWorkspace
- Episode 07: The VisualStudioWorkspace
- Episode 08: The AdhocWorkspace
- Episode 09: Introduction To Analyzers
Best source to go into Roslyn API. Tanks Josh!
This should be in the Roslyn wiki.
What package is it that shows the variable values on the right as you type into the editor please?
It was called Alive, but unfortunately it’s no longer available. Sorry about that 😦
Oh the irony, alive is dead!
I quick google and I found that you wrote Alive yourself. Please make it available again, take my money!
Does the Roslyn helps to construct source code from an assembly (dll) – decompiler functionality
No it does not. You are looking for .NET Reflector (paid, but worth it) or ILSpy (free).
Is it possible to construct Method Symbols from an existing Assembly (dll) or Compilation object from an assembly without having source code
I think so.
I know there is IAssemblySymbol, which I believe you can use to get INamedTypeSymbols and their IMethodSymbols.
I know you can also create a Compilation with the given Assembly and call GetSymbolsWithName() or GetTypeByMetadataName().
Hi Josh,
Thanks for an awesome tutorial! I wasn’t aware of it until somebody contributed the link to the Awesome Roslyn list. Learning Roslyn would have been much easier if I had been aware of this tutorial before 🙂 I moved the tutorial to the deserved top of the Awesome Tutorials list with the comment “A perfect tutorial to start with :-)”
Thanks!
Thanks a lot!!!
Really nice, thanks!