Orleans.FSharp 5.0.1

dotnet add package Orleans.FSharp --version 5.0.1
                    
NuGet\Install-Package Orleans.FSharp -Version 5.0.1
                    
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="Orleans.FSharp" Version="5.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Orleans.FSharp" Version="5.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Orleans.FSharp" />
                    
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 Orleans.FSharp --version 5.0.1
                    
#r "nuget: Orleans.FSharp, 5.0.1"
                    
#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 Orleans.FSharp@5.0.1
                    
#: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=Orleans.FSharp&version=5.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Orleans.FSharp&version=5.0.1
                    
Install as a Cake Tool

Orleans.FSharp

Idiomatic, functional F# actors on Microsoft Orleans. The current authoring model uses typed API records, grainContract, grainFor, and FunctionalGrain.ref; it needs no application-owned C# grain interface or proxy project.

Quick example

open System.Threading.Tasks
open Orleans.FSharp

type CounterActor = private CounterActor of unit

[<NoEquality; NoComparison>]
type CounterApi =
    { increment: unit -> Task<int>
      value: unit -> Task<int> }

[<RequireQualifiedAccess>]
module CounterApi =
    let contract =
        grainContract<CounterActor, string, CounterApi> {
            grainType "counter"
            version 1
            stringKey
            readOnly (_.value)
        }

    let ref = FunctionalGrain.ref contract

let counterDefinition =
    grainFor CounterApi.contract {
        defaultState (fun () -> 0)

        handle (_.increment) (fun _ count () ->
            task {
                let next = count + 1
                return next, next
            })

        handleQuery (_.value) (fun _ count () -> task { return count })
    }

let callCounter (grainFactory: Orleans.IGrainFactory) =
    task {
        let counter = CounterApi.ref grainFactory "visits"
        let! next = counter.increment ()
        let! current = counter.value ()
        return next, current
    }

Register counterDefinition with ISiloBuilder.AddFunctionalGrain; callers use callCounter's typed API-record binding.

Current functional surface

  • grainContract<'Actor,'Key,'Api> { } declares stable identity, key encoding, versioning, and delivery policy.
  • grainFor contract { } binds immutable state transitions, persistence, lifecycle hooks, timers, reminders, streams, placement, and transactions.
  • journaledGrainFor contract { } binds a pure event fold and supports Orleans log-consistency providers, typed custom storage, and snapshot policies.
  • FunctionalGrain.ref returns the typed API record; FunctionalGrain.rawRef additionally exposes cancellable and server-streaming calls.
  • FunctionalObserver provides codegen-free typed push callbacks.

See the functional runtime guide, event-sourcing guide, and API reference.

Package Purpose
Orleans.FSharp.Runtime Silo/client configuration and functional-definition hosting
Orleans.FSharp.Abstractions Pre-generated transport proxies, pulled in transitively
Orleans.FSharp.Testing TestingHost, web-host, FsCheck, and log-capture helpers
Orleans.FSharp.Analyzers F# analyzer that reports async { } where task { } is expected

Legacy archive

The original authoring model is unsupported and is not part of the 5.x release line. Its source-only compatibility projects, examples, and migration mapping remain in the repository's Legacy archive to help existing applications migrate.

License

MIT

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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 (3)

Showing the top 3 NuGet packages that depend on Orleans.FSharp:

Package Downloads
Orleans.FSharp.Runtime

Silo and client hosting for functional Orleans.FSharp actors — registration, serialization, health checks, Dashboard, TLS, and production configuration.

Orleans.FSharp.Testing

Test utilities for Orleans.FSharp grains — TestHarness, GrainMock, GrainArbitrary (TypeShape-based FsCheck), FsCheckHelpers, and LogCapture.

Orleans.FSharp.EventSourcing

Declarative event sourcing for Orleans grains in F# — eventSourcedGrain {} CE with apply/handle and a JournaledGrain bridge.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.0.1 123 9/7/2026
5.0.0 116 9/7/2026
4.1.0 154 8/21/2026
4.0.2 150 8/20/2026
4.0.1 130 8/20/2026
4.0.0 137 8/19/2026
3.0.2 133 8/8/2026
3.0.1 183 6/29/2026
3.0.0 172 6/29/2026
2.0.0-alpha.1 105 4/28/2026
1.0.0 338 4/3/2026