RoslynPad.Roslyn
5.0.0
Prefix Reserved
dotnet add package RoslynPad.Roslyn --version 5.0.0
NuGet\Install-Package RoslynPad.Roslyn -Version 5.0.0
<PackageReference Include="RoslynPad.Roslyn" Version="5.0.0" />
<PackageVersion Include="RoslynPad.Roslyn" Version="5.0.0" />
<PackageReference Include="RoslynPad.Roslyn" />
paket add RoslynPad.Roslyn --version 5.0.0
#r "nuget: RoslynPad.Roslyn, 5.0.0"
#:package RoslynPad.Roslyn@5.0.0
#addin nuget:?package=RoslynPad.Roslyn&version=5.0.0
#tool nuget:?package=RoslynPad.Roslyn&version=5.0.0
RoslynPad.Roslyn
Exposes many Roslyn editor services that are currently internal. Package versions correspond to Roslyn package versions.
Key Types
RoslynHost
Central service host that manages Roslyn workspaces and System.Composition (MEF) for dependency injection.
var host = new RoslynHost(
additionalAssemblies: [Assembly.Load("RoslynPad.Roslyn.Avalonia")],
references: RoslynHostReferences.NamespaceDefault.With(
assemblyReferences: [typeof(object).Assembly]),
disabledDiagnostics: null);
var documentId = host.AddDocument(new DocumentCreationArgs(
textContainer, workingDirectory, SourceCodeKind.Script));
// Later
host.CloseDocument(documentId);
RoslynHostReferences
Configures default assembly references and namespace imports for scripts.
var references = RoslynHostReferences.NamespaceDefault.With(
assemblyReferences: [typeof(object).Assembly, typeof(Enumerable).Assembly],
typeNamespaceImports: [typeof(Console)]);
RoslynWorkspace
Per-document Roslyn workspace. Accessed via host.GetDocument(documentId) or host.CreateWorkspace().
Services
| Namespace | Interface | Purpose |
|---|---|---|
Diagnostics |
IDiagnosticsUpdater |
Real-time diagnostic events |
Completion |
CompletionItemExtensions |
Glyph and description for completion items |
SignatureHelp |
ISignatureHelpProvider |
Method signature overload display |
QuickInfo |
IQuickInfoProvider |
Hover tooltip information |
BraceMatching |
IBraceMatchingService |
Matching brace highlighting |
CodeActions |
CodeActionExtensions |
Quick fix and refactoring actions |
Rename |
RenameHelper |
Symbol rename support |
Structure |
IBlockStructureService |
Code folding regions |
For a full initialization and editor integration sample, see the samples directory.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.CodeAnalysis.CSharp (>= 5.3.0)
- Microsoft.CodeAnalysis.CSharp.Features (>= 5.3.0)
- Microsoft.CodeAnalysis.CSharp.Scripting (>= 5.3.0)
- Microsoft.CodeAnalysis.CSharp.Workspaces (>= 5.3.0)
- Microsoft.VisualStudio.Threading (>= 17.14.15)
- Microsoft.VisualStudio.Validation (>= 17.8.8)
- System.Composition (>= 10.0.8)
- System.Linq.AsyncEnumerable (>= 10.0.8)
- System.Reflection.Metadata (>= 10.0.8)
- System.Reflection.MetadataLoadContext (>= 10.0.8)
- System.Text.Json (>= 10.0.8)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on RoslynPad.Roslyn:
| Package | Downloads |
|---|---|
|
RoslynPad.Editor.Windows
Provides a Roslyn-based code editor using AvalonEdit (WPF platform) with completion, diagnostics, and quick actions |
|
|
RoslynPad.Roslyn.Windows
Provides platform-specific (WPF) implementations for UI elements required by the RoslynPad.Roslyn package. |
|
|
Stride.Assets.Presentation
Package Description |
|
|
RoslynPad.Roslyn.Avalonia
Provides platform-specific (Avalonia) implementations for UI elements required by the RoslynPad.Roslyn package. |
|
|
RoslynPad.Editor.Avalonia
Provides a Roslyn-based code editor using AvaloniaEdit (Avalonia platform) with completion, diagnostics, and quick actions |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on RoslynPad.Roslyn:
| Repository | Stars |
|---|---|
|
stride3d/stride
Stride (formerly Xenko), a free and open-source cross-platform C# game engine.
|