IceRpc.Ice 0.6.0

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

IceRPC + Ice integration

The IceRPC framework provides extensive interop support for the Ice RPC framework through:

  • an implementation of the ice protocol, provided by the IceRpc NuGet package
  • integration code between the IceRPC core APIs and code generated by Ice's Slice compiler (this package)

With IceRPC, you can use the ice and icerpc protocols to send requests and responses with payloads encoded in the serialization format of your choice. You typically use Ice's IDL (Ice Slice) and its associated encoding (the Ice encoding) with the ice protocol, to communicate with Ice-based applications. Nevertheless, this package is protocol-agnostic, and allows you to use Ice Slice and the Ice encoding with the icerpc protocol as well.

Package | Source code | Documentation | Examples | API reference

Sample Code

// Contract written in Ice's Slice language and saved in a `.ice` file.

module VisitorCenter
{
    /// Represents a simple greeter.
    interface Greeter
    {
        /// Creates a personalized greeting.
        /// @param name The name of the person to greet.
        /// @return The greeting.
        string greet(string name);
    }
}
// Client application

using IceRpc;
using VisitorCenter;

// Use the ice protocol for compatibility with ZeroC Ice. We use the default port for the
// ice protocol, 4061.
await using var connection = new ClientConnection(new Uri("ice://localhost"));

// The service address URI includes the protocol to use (ice).
var greeter = new GreeterProxy(connection, new Uri("ice:/greeter"));

string greeting = await greeter.GreetAsync(Environment.UserName);

Console.WriteLine(greeting);

await connection.ShutdownAsync();
// Server application

using IceRpc;
using IceRpc.Features;
using VisitorCenter;

// Use the ice protocol for compatibility with ZeroC Ice.
await using var server = new Server(new Chatbot(), new Uri("ice://[::0]"));

// Start accepting requests on the default port for the ice protocol, 4061.
server.Listen();

// Wait until the console receives a Ctrl+C.
await CancelKeyPressed;
await server.ShutdownAsync();

// IGreeterService is an interface generated by slice2cs (Ice's Slice compiler for C#).
// The [Service] attribute instructs the Service Generator to implement IDispatcher by
// routing "greet" requests to the GreetAsync method.
[Service]
internal partial class Chatbot : IGreeterService
{
    public ValueTask<string> GreetAsync(
        string name,
        IFeatureCollection features,
        CancellationToken cancellationToken)
    {
        Console.WriteLine($"Dispatching greet request {{ name = '{name}' }}");
        return new($"Hello, {name}!");
    }
}
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 (1)

Showing the top 1 NuGet packages that depend on IceRpc.Ice:

Package Downloads
IceRpc.Locator

Locator interceptor for IceRPC

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.6.0 36 6/5/2026