Using the IceRPC .NET project templates

The easiest way to create a new project configured for IceRPC is by using a .NET project template. You can install the IceRPC project templates with the following dotnet new command:

dotnet new install IceRpc.Templates
Template nameDescription
icerpc-protobuf-client
A project template for creating an IceRPC + Protobuf client console application.
icerpc-protobuf-server
A project template for creating an IceRPC + Protobuf server console application.
icerpc-protobuf-di-client
A project template for creating an IceRPC + Protobuf client console application using Microsoft's DI container.
icerpc-protobuf-di-server
A project template for creating an IceRPC + Protobuf server console application using Microsoft's DI container.
icerpc-slice-client
A project template for creating an IceRPC + Slice client console application.
icerpc-slice-server
A project template for creating an IceRPC + Slice server console application.
icerpc-slice-di-client
A project template for creating an IceRPC + Slice client console application using Microsoft's DI container.
icerpc-slice-di-server
A project template for creating an IceRPC + Slice server console application using Microsoft's DI container.
icerpc-ice-client
A project template for creating an IceRPC + Ice client console application (for interop with Ice).
icerpc-ice-server
A project template for creating an IceRPC + Ice server console application (for interop with Ice).
icerpc-ice-di-client
A project template for creating an IceRPC + Ice client console application using Microsoft's DI container.
icerpc-ice-di-server
A project template for creating an IceRPC + Ice server console application using Microsoft's DI container.

You use the IceRPC templates with the standard dotnet new <template> command. The following options are available (note: --transport is supported by the IceRPC templates for Protobuf and Slice):

--no-restore If specified, skips the automatic restore of the project on create.
Type: bool
Default: false
-tr, --transport <quic|tcp> The transport to use for IceRPC connections.
Type: choice
quic Use the QUIC transport
tcp Use the TCP transport
Default: quic

For example, you can create a new project named MyProtobufClient for an IceRPC + Protobuf client application that uses the QUIC transport with the following command:

dotnet new icerpc-protobuf-client -o MyProtobufClient --transport quic

The IceRPC templates for Ice use the ice protocol over the tcp transport.

Was this page helpful?

CookiesYour privacy
This website uses cookies to analyze traffic and improve your experience.
By clicking "Accept," you consent to the use of these cookies. You can learn more about our cookies policy in our Privacy Policy.