3 min read
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.
IceRPC and Slice packages
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.Slicedotnet 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.
IceRPC and Protobuf packages
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.Protobufdotnet 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.
IceRPC only
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
Adding optional packages
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.