Building Ice Applications for .NET

This page provides important information for .NET developers.

On this page:

Building Ice Applications for .NET with Visual Studio

Install the following software and then refer to the Ice Builder for Visual Studio instructions:

  1. The Ice Builder for Visual Studio extension
  2. The zeroc.ice.net NuGet package described later on this page
  3. With Visual Studio 2019, 2022, or 2026.

Building Ice Applications for .NET with the .NET 8.0 SDK or .NET 10.0 SDK

Install the following software and then refer to the Ice Builder for MSBuild instructions:

  1. The .NET 8.0 SDK or the .NET 10.0 SDK for your operating system

  2. The zeroc.ice.net NuGet package described later on this page


On Windows, you can use Ice Builder for Visual Studio to configure Ice Builder for MSBuild.

Programming Language

You can use any .NET programming language with Ice, however, the preferred programming language for Ice .NET applications is C# since:

  • the only Slice language mapping for .NET is Slice to C#
  • the only Slice compiler for .NET, slice2cs, generates C# code
  • Ice for .NET is itself written in C#

zeroc.ice.net NuGet Package

The Ice for .NET (zeroc.ice.net) NuGet package is organized as follows:

Folder
Contents
lib\netstandard2.0Assemblies for .NET Standard 2.0

tools\windows-x64

slice2cs  compiler

tools\linux-x64 

tools\linux-arm64 

tools\macos-arm64 

tools\net472

iceboxnet.exe app for .NET Framework 4.7.2

tools\net8.0
iceboxnet.dll app for .NET 8.0
buildMSBuild support files
sliceSlice files


Adding zeroc.ice.net to a Visual Studio or MSBuild project imports props files from the build folder into that project.

The props file defines the following properties:

Name
Value
Description
IceVersion3.7Ice string version
IceIntVersion30711Ice version as a numeric value
IceVersionMM3.7Major Minor version
IceSoVersion37Version used in dynamic libraries
IceNugetPackageVersion3.7.11NuGet package numeric version
IceHome$(MSBuildThisFileDirectory)..\..Full path to the package root folder
IceToolsPath$(IceHome)\toolsFull path to the tools folder

These properties are used by Ice Builder, and you can also use them in custom build steps.

Compression with bzip2

Ice for .NET supports the optional compression of Ice requests and responses using the bzip2 native library. You can use the bzip2 system library on Linux and macOS. On Windows, use the bzip2.dll  included in the C++ NuGet package.

Using the Sample Programs

Sample programs are available at the ice-demos GitHub repository. You can browse this repository to see build and usage instructions for all supported programming languages. You can clone this repository with:

git clone -b 3.7 https://github.com/zeroc-ice/ice-demos.git
cd ice-demos