xref: /aosp_15_r20/external/protobuf/csharp/buildall.sh (revision 1b3f573f81763fcece89efc2b6a5209149e44ab8)
1#!/bin/bash
2
3CONFIG=Release
4SRC=$(dirname $0)/src
5
6set -ex
7
8echo Building relevant projects.
9dotnet restore $SRC/Google.Protobuf.sln
10dotnet build -c $CONFIG $SRC/Google.Protobuf.sln
11
12echo Running tests.
13# Only test netcoreapp3.1, which uses the .NET Core runtime.
14# If we want to test the .NET 4.5 version separately, we could
15# run Mono explicitly. However, we don't have any differences between
16# the .NET 4.5 and netstandard2.1 assemblies.
17dotnet test -c $CONFIG -f netcoreapp3.1 $SRC/Google.Protobuf.Test/Google.Protobuf.Test.csproj
18