Adding IceRPC to an existing project

IceRPC for C# is distributed as NuGet packages. To add IceRPC to an existing C# project, just add one or more IceRpc NuGet packages to this project.

If you plan on using IceRPC together with Slice, add the IceRpc.Slice and IceRpc.Slice.Tools packages to your project with the following commands:

dotnet add package IceRpc.Slice
dotnet add package IceRpc.Slice.Tools

Adding IceRpc.Slice automatically pulls its dependencies, including the IceRpc and ZeroC.Slice packages.

The Slice compiler included in IceRpc.Slice.Tools generates C# code that depends on the ZeroC.Slice and IceRpc.Slice packages. You need IceRpc.Slice.Tools only during development.

If you plan on using IceRPC together with Protobuf, add the IceRpc.Protobuf and IceRpc.Protobuf.Tools packages to your project with the following commands:

dotnet add package IceRpc.Protobuf
dotnet add package IceRpc.Protobuf.Tools

Adding IceRpc.Protobuf automatically pulls its dependencies, including the IceRpc and Google.Protobuf packages.

The protoc compiler and the protoc-gen-icerpc-csharp generator included in IceRpc.Protobuf.Tools generates C# code that depends on the Google.Protobuf and IceRpc.Protobuf packages. You need IceRpc.Protobuf.Tools only during development.

If you plan on using IceRPC with JSON, or some other serialization format, add the IceRpc package to your project with the following command:

dotnet add package IceRpc

Even though all the other packages are optional, it's likely you will want to add one or more of them to your project. For example, you can add the package IceRpc.Transports.Quic to use the QUIC transport with the following command:

dotnet add package IceRpc.Transports.Quic

The full list of IceRPC packages is available on the next page.

Was this page helpful?