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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RoslynPad.Roslyn" Version="5.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RoslynPad.Roslyn" Version="5.0.0" />
                    
Directory.Packages.props
<PackageReference Include="RoslynPad.Roslyn" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RoslynPad.Roslyn --version 5.0.0
                    
#r "nuget: RoslynPad.Roslyn, 5.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package RoslynPad.Roslyn@5.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=RoslynPad.Roslyn&version=5.0.0
                    
Install as a Cake Addin
#tool nuget:?package=RoslynPad.Roslyn&version=5.0.0
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.
Version Downloads Last Updated
5.0.0 387 5/21/2026
4.12.1 21,504 2/7/2025
4.12.0-1.final 2,950 9/29/2024
4.8.0 11,947 11/28/2023
4.4.0 10,139 12/7/2022
3.6.0 91,320 7/18/2020
2.4.0 16,799 11/2/2017
2.3.2.2 4,160 9/6/2017
2.3.2.1 2,151 9/5/2017
2.3.2 2,739 9/2/2017