summaryrefslogtreecommitdiff
path: root/wrappers/csharp/README.md
blob: d4d1d9741d54aeb57dc499c7c40361502b5a3850 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# C# wrapper

## Requirements

You will need to install the [.NET SDK](https://dotnet.microsoft.com/download), which includes the `dotnet` tool. The
wrapper targets .NET Standard 2.0, so which means that at least .NET Core 2.0 is required (.NET 5+ is also fine). For
the tests, .NET 5 or newer is required.

## Build & test

First build the shared Go library. Next:

Build `EduVpnCommon`:

```shell
make
```

Build as nupkg, including eduvpn_verify library:

```shell
make pack
```

The wrapper targets .NET Standard 2.0, which means that it can be referenced by projects using either .NET Framework
4.6.1+, .NET Core 2.0+, or .NET 5+.

Currently, directly referencing the project may not work (with `System.BadImageFormatException`) if you have multiple
dynamic libraries compiled in the `exports` folder. If you instead add the `.nupkg`, e.g. with one of the
methods [here](https://stackoverflow.com/q/43400069) or [here](https://stackoverflow.com/q/10240029), it automatically
copies the correct library.

Test:

```shell
make test
```