Skip to content

Latest commit

 

History

History
150 lines (100 loc) · 3.79 KB

BUILDING.md

File metadata and controls

150 lines (100 loc) · 3.79 KB

Building Ice for .NET

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.

Building on Windows

Windows Build Requirements

In order to build Ice for .NET from source, you need:

Compiling Ice for .NET on Windows

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

Authenticode Signatures

You can sign the Ice binaries with Authenticode by setting the following environment variables before building these assemblies:

  • SIGN_CERTIFICATE to your Authenticode certificate
  • SIGN_PASSWORD to the certificate password
  • SIGN_SHA1 the SHA1 has of the signing certificate

Authenticode can be generated only from Windows builds.

Building only the Test Suite

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.

Building on Linux or macOS

Linux and macOS Build Requirements

You need the .NET 8.0 SDK to build Ice for .NET from source.

Compiling Ice for .NET on Linux or macOS

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

Running the Tests

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.

NuGet Package

Creating NuGet Packages on Windows

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.

Creating NuGet Packages on Linux or macOS

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.