-
Successfully migrated several key files from NRefactory to Roslyn:
- TypeConfigInfo.cs - Replaced NRefactory types with Roslyn equivalents
- IMemberResolver.cs - Updated to use Roslyn's SemanticModel and SyntaxNodes
- IAstVisitor.cs - Created a new visitor interface for Roslyn syntax nodes
- MemberResolveResult.cs - Created a compatibility layer for Roslyn symbols
- IEmitter.cs - Started updating to use Roslyn types (partial migration)
- OverloadsCollection.cs - Created a simplified skeleton with Roslyn types
- IAnonymousType.cs - Created Roslyn-compatible versions
-
Added Microsoft.CodeAnalysis NuGet packages to the project:
- Microsoft.CodeAnalysis.CSharp (4.8.0)
- Microsoft.CodeAnalysis.CSharp.Workspaces (4.8.0)
-
Complete migration of all files: The build errors show approximately 20+ files still referencing ICSharpCode.NRefactory.
-
Key files requiring migration:
- AttributeHelper.cs
- BridgeType.cs
- EmitterCache.cs
- EmitterException.cs
- Helpers.cs
- Helpers.Cecil.cs
- IAbstractEmitterBlock.cs
- IAsyncBlock.cs
- IAsyncJumpLabel.cs
- IAsyncStep.cs
- IInvocationInterceptor.cs
- IPlugins.cs
- ITranslator.cs
- ITypeInfo.cs
- IValidator.cs
- MemberOrderer.cs
- Name/Converter.cs
- Rule/Rules.cs
- TypeComparer.cs
- XmlToJsDoc.cs
-
Implementation patterns:
- For each file, systematically replace NRefactory types with Roslyn equivalents
- Create compatibility layers for complex functionality
- Ensure interfaces match original API signatures where possible
-
Build and test:
- Fix one file at a time and verify compilation
- Implement incremental testing for complex functionality
Due to the extensive changes needed, it's recommended to:
- Work on a separate branch
- Use automated refactoring tools where possible
- Consider this a major version upgrade due to API changes
- Document all changes for downstream consumers