Microsoft.Orleans.Sdk 9.2.0-preview2

Prefix Reserved
This is a prerelease version of Microsoft.Orleans.Sdk.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Microsoft.Orleans.Sdk --version 9.2.0-preview2
                    
NuGet\Install-Package Microsoft.Orleans.Sdk -Version 9.2.0-preview2
                    
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="Microsoft.Orleans.Sdk" Version="9.2.0-preview2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.Orleans.Sdk" Version="9.2.0-preview2" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.Orleans.Sdk" />
                    
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 Microsoft.Orleans.Sdk --version 9.2.0-preview2
                    
#r "nuget: Microsoft.Orleans.Sdk, 9.2.0-preview2"
                    
#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.
#addin nuget:?package=Microsoft.Orleans.Sdk&version=9.2.0-preview2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Microsoft.Orleans.Sdk&version=9.2.0-preview2&prerelease
                    
Install as a Cake Tool

Microsoft Orleans SDK

Introduction

Microsoft Orleans SDK is a metapackage that includes all the necessary components to build Orleans applications. It provides both client and server functionality, making it easy to get started with Orleans without having to reference individual packages.

Getting Started

To use this package, install it via NuGet:

dotnet add package Microsoft.Orleans.Sdk

Example - Creating a Grain Interface and Implementation

// Define a grain interface
public interface IHelloGrain : IGrainWithStringKey
{
    Task<string> SayHello(string greeting);
}

// Implement the grain interface
public class HelloGrain : Grain, IHelloGrain
{
    public Task<string> SayHello(string greeting)
    {
        return Task.FromResult($"Hello, {greeting}!");
    }
}

Example - Configuring an Orleans Application

using Microsoft.Extensions.Hosting;
using Orleans.Configuration;
using Orleans.Hosting;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Threading.Tasks;
namespace ExampleGrains;

// Create the host
var builder = Host.CreateApplicationBuilder(args)
    .UseOrleans(siloBuilder =>
    {
        siloBuilder
            .UseLocalhostClustering();
    });

// Start the host
var host = builder.Build();
await host.StartAsync();

// Get a reference to a grain and call it
var client = host.Services.GetRequiredService<IClusterClient>();
var grain = client.GetGrain<IHelloGrain>("user123");
var response = await grain.SayHello("World");

// Print the result
Console.WriteLine($"Grain response: {response}");

// Keep the host running until the application is shut down
await host.WaitForShutdownAsync();

Documentation

For more comprehensive documentation, please refer to:

Feedback & Contributing

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages (97)

Showing the top 5 NuGet packages that depend on Microsoft.Orleans.Sdk:

Package Downloads
Microsoft.Orleans.Client

Collection of Microsoft Orleans libraries and files needed on the client.

Microsoft.Orleans.Server

Collection of Microsoft Orleans libraries and files needed on the server.

OrleansDashboard

A developer dashboard for Microsoft Orleans

OrleansDashboard.Core

A developer dashboard for Microsoft Orleans

Microsoft.Orleans.Reminders

Reminders library for Microsoft Orleans used on the server.

GitHub repositories (13)

Showing the top 13 popular GitHub repositories that depend on Microsoft.Orleans.Sdk:

Repository Stars
dotnet/aspire
Tools, templates, and packages to accelerate building observable, production-ready apps
dotnet/samples
Sample code referenced by the .NET documentation
Dotnet-Boxed/Templates
.NET project templates with batteries included, providing the minimum amount of code required to get you going faster.
OrleansContrib/OrleansDashboard
:bar_chart: A developer dashboard for Microsoft Orleans
dotnet/dotnet
Home of .NET's Virtual Monolithic Repository which includes all the code needed to build the .NET SDK.
OrleansContrib/Orleankka
Functional API for Microsoft Orleans http://orleanscontrib.github.io/Orleankka
RayTale/Vertex
Vertex is a distributed, ultimately consistent, event traceable cross platform framework based on Orleans, which is used to build high-performance, high throughput, low latency, scalable distributed applications
microsoft/project-oagents
Experimental AI Agents Framework
OrleansContrib/Orleans.Clustering.Kubernetes
Orleans Membership provider for Kubernetes
OrleansContrib/Orleans.Sagas
A distributed saga implementation for Orleans
PiotrJustyna/road-to-orleans
This repository illustrates the road to orleans with practical, real-life examples. From most basic, to more advanced techniques.
shinyorg/templates
dotnet CLI & Visual Studio Templates
OrleansContrib/Orleans.Providers.MongoDB
A MongoDb implementation of the Orleans Providers: Membership, Storage and Reminders.
Version Downloads Last Updated
9.2.0-preview3 568 6/10/2025
9.2.0-preview2 386 6/4/2025
9.2.0-preview1 17,183 4/4/2025
9.1.2 320,734 2/13/2025
9.0.1 244,123 11/23/2024
9.0.0 22,957 11/14/2024
8.2.0 864,491 7/12/2024
8.2.0-preview1 5,116 5/22/2024
8.1.0 472,670 4/17/2024
8.1.0-preview3 4,582 3/11/2024
8.1.0-preview2 1,269 2/23/2024
8.1.0-preview1 1,837 2/13/2024
8.0.0 492,256 1/5/2024
8.0.0-rc2 2,087 12/20/2023
8.0.0-rc1 1,573 12/4/2023
7.2.7 6,591 10/15/2024
7.2.6 78,321 3/9/2024
7.2.5 19,493 2/22/2024
7.2.4 367,666 12/2/2023
7.2.3 144,466 11/3/2023
7.2.2 83,268 10/16/2023
7.2.1 562,626 7/11/2023
7.2.0 277,962 7/7/2023
7.1.2 266,427 4/19/2023
7.1.1 114,442 3/23/2023
7.1.0 275,653 2/1/2023
7.0.0 262,799 11/8/2022
7.0.0-rc2 1,838 10/19/2022
4.0.0-preview2 21,144 8/4/2022
4.0.0-preview1 10,336 2/10/2022