Skip to content

Commit aa15931

Browse files
committed
Update .NET SDKs to LTS versions
1 parent d37dcf9 commit aa15931

File tree

16 files changed

+21
-21
lines changed

16 files changed

+21
-21
lines changed

appveyor.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ dotnet restore
3838
dotnet build -c %configuration% || goto error
3939

4040
echo Testing C#
41-
dotnet test -c %configuration% -f netcoreapp2.1 Google.Protobuf.Test\Google.Protobuf.Test.csproj || goto error
41+
dotnet test -c %configuration% -f netcoreapp3.1 Google.Protobuf.Test\Google.Protobuf.Test.csproj || goto error
4242
dotnet test -c %configuration% -f net451 Google.Protobuf.Test\Google.Protobuf.Test.csproj || goto error
4343

4444
goto :EOF

conformance/Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ conformance-java-lite: javac_middleman_lite
316316
conformance-csharp: $(other_language_protoc_outputs)
317317
@echo "Writing shortcut script conformance-csharp..."
318318
@echo '#! /bin/sh' > conformance-csharp
319-
@echo 'dotnet ../csharp/src/Google.Protobuf.Conformance/bin/Release/netcoreapp2.1/Google.Protobuf.Conformance.dll "$$@"' >> conformance-csharp
319+
@echo 'dotnet ../csharp/src/Google.Protobuf.Conformance/bin/Release/netcoreapp3.1/Google.Protobuf.Conformance.dll "$$@"' >> conformance-csharp
320320
@chmod +x conformance-csharp
321321

322322
conformance-php:

csharp/buildall.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ dotnet restore $SRC/Google.Protobuf.sln
1010
dotnet build -c $CONFIG $SRC/Google.Protobuf.sln
1111

1212
echo Running tests.
13-
# Only test netcoreapp2.1, which uses the .NET Core runtime.
13+
# Only test netcoreapp3.1, which uses the .NET Core runtime.
1414
# If we want to test the .NET 4.5 version separately, we could
1515
# run Mono explicitly. However, we don't have any differences between
1616
# the .NET 4.5 and netstandard2.1 assemblies.
17-
dotnet test -c $CONFIG -f netcoreapp2.1 $SRC/Google.Protobuf.Test/Google.Protobuf.Test.csproj
17+
dotnet test -c $CONFIG -f netcoreapp3.1 $SRC/Google.Protobuf.Test/Google.Protobuf.Test.csproj

csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net451;netcoreapp2.1</TargetFrameworks>
5+
<TargetFrameworks>net451;netcoreapp3.1</TargetFrameworks>
66
<AssemblyOriginatorKeyFile>../../keys/Google.Protobuf.snk</AssemblyOriginatorKeyFile>
77
<SignAssembly>true</SignAssembly>
88
<IsPackable>False</IsPackable>

csharp/compatibility_tests/v3.0.0/test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function run_test() {
2222
dotnet restore src/Google.Protobuf.Test/Google.Protobuf.Test.csproj
2323
dotnet build -c Release src/Google.Protobuf/Google.Protobuf.csproj
2424
dotnet build -c Release src/Google.Protobuf.Test/Google.Protobuf.Test.csproj
25-
dotnet run -c Release -f netcoreapp2.1 -p src/Google.Protobuf.Test/Google.Protobuf.Test.csproj
25+
dotnet run -c Release -f netcoreapp3.1 -p src/Google.Protobuf.Test/Google.Protobuf.Test.csproj
2626
}
2727

2828
set -ex

csharp/install_dotnet_sdk.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ Invoke-WebRequest -Uri $InstallScriptUrl -OutFile $InstallScriptPath
1616

1717
# The SDK versions to install should be kept in sync with versions
1818
# installed by kokoro/linux/dockerfile/test/csharp/Dockerfile
19-
&$InstallScriptPath -Version 2.1.802
20-
&$InstallScriptPath -Version 5.0.102
19+
&$InstallScriptPath -Version 3.1.415
20+
&$InstallScriptPath -Version 6.0.100

csharp/src/AddressBook/AddressBook.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.1</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<OutputType>Exe</OutputType>
66
<StartupObject>Google.Protobuf.Examples.AddressBook.Program</StartupObject>
77
<IsPackable>False</IsPackable>

csharp/src/Google.Protobuf.Benchmarks/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace Google.Protobuf.Benchmarks
3636
{
3737
class Program
3838
{
39-
// typical usage: dotnet run -c Release -f netcoreapp2.1
39+
// typical usage: dotnet run -c Release -f netcoreapp3.1
4040
// (this can profile both .net core and .net framework; for some reason
4141
// if you start from "-f net461", it goes horribly wrong)
4242
public static void Main(string[] args)

csharp/src/Google.Protobuf.Conformance/Google.Protobuf.Conformance.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.1</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<OutputType>Exe</OutputType>
66
<IsPackable>False</IsPackable>
77
</PropertyGroup>

csharp/src/Google.Protobuf.JsonDump/Google.Protobuf.JsonDump.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.1</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<OutputType>Exe</OutputType>
66
<IsPackable>False</IsPackable>
77
</PropertyGroup>

csharp/src/Google.Protobuf.Test/Collections/RepeatedFieldTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ public void NaNValuesComparedBitwise()
840840
var list2 = new RepeatedField<double> { SampleNaNs.Regular, SampleNaNs.PayloadFlipped };
841841
var list3 = new RepeatedField<double> { SampleNaNs.Regular, SampleNaNs.SignallingFlipped };
842842

843-
// All SampleNaNs have the same hashcode under certain targets (e.g. netcoreapp2.1)
843+
// All SampleNaNs have the same hashcode under certain targets (e.g. netcoreapp3.1)
844844
EqualityTester.AssertInequality(list1, list2, checkHashcode: false);
845845
EqualityTester.AssertEquality(list1, list3);
846846
Assert.True(list1.Contains(SampleNaNs.SignallingFlipped));

csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net451;netcoreapp2.1;net50</TargetFrameworks>
4+
<TargetFrameworks>net451;netcoreapp3.1;net60</TargetFrameworks>
55
<AssemblyOriginatorKeyFile>../../keys/Google.Protobuf.snk</AssemblyOriginatorKeyFile>
66
<SignAssembly>true</SignAssembly>
77
<IsPackable>False</IsPackable>

csharp/src/Google.Protobuf/Google.Protobuf.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<Description>C# runtime library for Protocol Buffers - Google's data interchange format.</Description>
@@ -43,7 +43,7 @@
4343

4444
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
4545
<PackageReference Include="System.Memory" Version="4.5.3"/>
46-
<!-- Needed for netcoreapp2.1 to work correctly. .NET is not able to load the assembly without this -->
46+
<!-- Needed for netcoreapp3.1 to work correctly. .NET is not able to load the assembly without this -->
4747
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.5.2"/>
4848
</ItemGroup>
4949

global.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "5.0.102",
3+
"version": "6.0.100",
44
"rollForward": "latestMinor"
55
}
66
}

kokoro/linux/aarch64/test_csharp_aarch64.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fi
1515
# First, build protobuf C# tests under x86_64 docker image
1616
# Tests are built "dotnet publish" because we want all the dependencies to the copied to the destination directory
1717
# (we want to avoid references to ~/.nuget that won't be available in the subsequent docker run)
18-
CSHARP_BUILD_COMMAND="dotnet publish -c Release -f net50 csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj"
18+
CSHARP_BUILD_COMMAND="dotnet publish -c Release -f net60 csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj"
1919
docker run $DOCKER_TTY_ARGS --rm --user "$(id -u):$(id -g)" -e "HOME=/home/fake-user" -e "DOTNET_CLI_TELEMETRY_OPTOUT=true" -e "DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true" -v "$(mktemp -d):/home/fake-user" -v "$(pwd)":/work -w /work mcr.microsoft.com/dotnet/sdk:5.0.202-buster-slim bash -c "$CSHARP_BUILD_COMMAND"
2020

2121
# Use an actual aarch64 docker image to run protobuf C# tests with an emulator. "dotnet vstest" allows
@@ -25,5 +25,5 @@ docker run $DOCKER_TTY_ARGS --rm --user "$(id -u):$(id -g)" -e "HOME=/home/fake-
2525
# running under current user's UID and GID. To be able to do that, we need to provide a home directory for the user
2626
# otherwise the UID would be homeless under the docker container and pip install wouldn't work. For simplicity,
2727
# we just run map the user's home to a throwaway temporary directory
28-
CSHARP_TEST_COMMAND="dotnet vstest csharp/src/Google.Protobuf.Test/bin/Release/net50/publish/Google.Protobuf.Test.dll"
28+
CSHARP_TEST_COMMAND="dotnet vstest csharp/src/Google.Protobuf.Test/bin/Release/net60/publish/Google.Protobuf.Test.dll"
2929
docker run $DOCKER_TTY_ARGS --rm --user "$(id -u):$(id -g)" -e "HOME=/home/fake-user" -e "DOTNET_CLI_TELEMETRY_OPTOUT=true" -e "DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true" -v "$(mktemp -d):/home/fake-user" -v "$(pwd)":/work -w /work mcr.microsoft.com/dotnet/sdk:5.0.202-buster-slim-arm64v8 bash -c "$CSHARP_TEST_COMMAND"

kokoro/linux/dockerfile/test/csharp/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ RUN apt-get update && apt-get install -y libunwind8 libicu63 && apt-get clean
3232
# Install dotnet SDK via install script
3333
RUN wget -q https://dot.net/v1/dotnet-install.sh && \
3434
chmod u+x dotnet-install.sh && \
35-
./dotnet-install.sh --version 2.1.802 && \
36-
./dotnet-install.sh --version 5.0.102 && \
35+
./dotnet-install.sh --version 3.1.415 && \
36+
./dotnet-install.sh --version 6.0.100 && \
3737
ln -s /root/.dotnet/dotnet /usr/local/bin
3838

3939
RUN wget -q www.nuget.org/NuGet.exe -O /usr/local/bin/nuget.exe

0 commit comments

Comments
 (0)