This page describes how to build Ice for .NET from source and package the resulting binaries. As an alternative, you can download and install the zeroc.ice.net NuGet package.
In order to build Ice for .NET from source, you need:
- Visual Studio 2022 with .NET 8.0 SDK.
Open a Visual Studio command prompt and change to the csharp
subdirectory:
cd csharp
To build all Ice assemblies and the associated test suite, run:
msbuild msbuild\ice.proj
Depending on your Visual Studio environment, you may need to specify the platform. For example:
msbuild msbuild\ice.proj /p:Platform=x64
Upon completion, the Ice assemblies for .NET 8.0 are placed in the lib\net8.0
folder.
You can skip the build of the test suite with the BuildDist
target:
msbuild msbuild\ice.proj /t:BuildDist
You can sign the Ice binaries with Authenticode by setting the following environment variables before building these assemblies:
SIGN_CERTIFICATE
to your Authenticode certificateSIGN_PASSWORD
to the certificate passwordSIGN_SHA1
the SHA1 has of the signing certificate
Authenticode can be generated only from Windows builds.
You can build only the test suite with this command:
msbuild msbuild\ice.proj /p:ICE_BIN_DIST=all
This build retrieves and installs the zeroc.ice.net
NuGet package if
necessary.
You need the .NET 8.0 SDK to build Ice for .NET from source.
Open a command prompt and change to the csharp
directory:
cd csharp
Then run:
dotnet msbuild msbuild/ice.proj
Upon completion, the Ice assemblies are placed in the lib/net8.0
directory.
You can skip the build of the test suite with the BuildDist
target:
dotnet msbuild msbuild/ice.proj /t:BuildDist
Python is required to run the test suite. Additionally, the Glacier2 tests
require the Python module passlib
, which you can install with the command:
pip install passlib
To run the tests, open a command window and change to the top-level directory. At the command prompt, execute:
python allTests.py
If everything worked out, you should see lots of ok
messages. In case of a
failure, the tests abort with failed
.
To create a NuGet package, open a Visual Studio command prompt and run the following command:
msbuild msbuild\ice.proj /t:NuGetPack
This creates the zeroc.ice.net
Nuget package in the msbuild\zeroc.ice.net
directory.
To create a NuGet package, open a command prompt and run the following command:
dotnet msbuild msbuild/ice.proj /t:NuGetPack
This creates the zeroc.ice.net
Nuget package in the msbuild/zeroc.ice.net
directory.