This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch branch-1.11
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/branch-1.11 by this push:
     new ba88772  AVRO-3250: Support .NET 6.0 (#1394)
ba88772 is described below

commit ba887727eaff11935ac4665460c585c776570f13
Author: Zoltan Csizmadia <[email protected]>
AuthorDate: Mon Jan 10 05:54:29 2022 -0600

    AVRO-3250: Support .NET 6.0 (#1394)
    
    * Support .NET 6.0
    
    * Add .NET SDKs to C# gitflow
    
    * Use latest setup-dotnet action step to install multiple SDKs
    
    * Change gitflow step names
    
    Co-authored-by: Zoltan Csizmadia <[email protected]>
    (cherry picked from commit 7b8f20ce52b2a74c6cc168778b655177251a53f8)
---
 .github/workflows/codeql-csharp-analysis.yml       |  9 +++++++++
 .github/workflows/test-lang-csharp.yml             | 16 ++++++++++++++++
 .travis/before_install.sh                          |  1 +
 lang/csharp/README.md                              | 18 +++++++++---------
 lang/csharp/build.sh                               |  4 ++--
 lang/csharp/src/apache/codegen/Avro.codegen.csproj |  4 ++--
 lang/csharp/src/apache/perf/Avro.perf.csproj       |  4 ++--
 lang/csharp/src/apache/test/Avro.test.csproj       |  4 ++--
 lang/csharp/versions.props                         |  2 +-
 share/docker/Dockerfile                            |  2 +-
 10 files changed, 45 insertions(+), 19 deletions(-)

diff --git a/.github/workflows/codeql-csharp-analysis.yml 
b/.github/workflows/codeql-csharp-analysis.yml
index 3cbb0fd..f76d392 100644
--- a/.github/workflows/codeql-csharp-analysis.yml
+++ b/.github/workflows/codeql-csharp-analysis.yml
@@ -55,6 +55,15 @@ jobs:
         # a pull request then we can checkout the head.
         fetch-depth: 2
 
+    # Install .NET SDKs
+    - name: Install .NET SDKs
+      uses: actions/setup-dotnet@v1
+      with:
+        dotnet-version: |
+          3.1.x
+          5.0.x
+          6.0.x
+
     # Initializes the CodeQL tools for scanning.
     - name: Initialize CodeQL
       uses: github/codeql-action/init@v1
diff --git a/.github/workflows/test-lang-csharp.yml 
b/.github/workflows/test-lang-csharp.yml
index b195900..81fafce 100644
--- a/.github/workflows/test-lang-csharp.yml
+++ b/.github/workflows/test-lang-csharp.yml
@@ -34,6 +34,14 @@ jobs:
     steps:
       - uses: actions/checkout@v2
 
+      - name: Install .NET SDKs
+        uses: actions/setup-dotnet@v1
+        with:
+          dotnet-version: |
+            3.1.x
+            5.0.x
+            6.0.x
+
       - uses: actions/cache@v2
         with:
           path: ~/.nuget/packages
@@ -52,6 +60,14 @@ jobs:
     steps:
       - uses: actions/checkout@v2
 
+      - name: Install .NET SDKs
+        uses: actions/setup-dotnet@v1
+        with:
+          dotnet-version: |
+            3.1.x
+            5.0.x
+            6.0.x
+
       - name: Cache Local Maven Repository
         uses: actions/cache@v2
         with:
diff --git a/.travis/before_install.sh b/.travis/before_install.sh
index 08e9909..c4dc9e9 100755
--- a/.travis/before_install.sh
+++ b/.travis/before_install.sh
@@ -35,6 +35,7 @@ case "$TRAVIS_OS_NAME" in
     # Install all (latest) SDKs which are used by multi framework projects
     choco install dotnetcore-3.1-sdk     # .NET Core 3.1
     choco install dotnet-5.0-sdk         # .NET 5.0
+    choco install dotnet-sdk             # .NET 6.0
     ;;
 *)
     echo "Invalid PLATFORM"
diff --git a/lang/csharp/README.md b/lang/csharp/README.md
index f72fd73..90d94fe 100644
--- a/lang/csharp/README.md
+++ b/lang/csharp/README.md
@@ -17,15 +17,15 @@ Install-Package Apache.Avro
 
 ## Project Target Frameworks
 
-| Project         | Type       | .NET Framework 4.0 | .NET Standard 2.0  | 
.NET Standard 2.1 | .NET Core 3.1 | .NET 5.0  |
-|:---------------:|:----------:|:------------------:|:------------------:|:-----------------:|:-------------:|:---------:|
-| Avro.codegen    | Exe        |                    |                    |     
              | ✔️            |✔️        |
-| Avro.ipc        | Library    | ✔️                 | ✔️                |      
             |               |           |
-| Avro.ipc.test   | Unit Tests | ✔️                 |                    |     
              |               |           |
-| Avro.main       | Library    |                    | ✔️                 | ✔️  
             |               |           |
-| Avro.msbuild    | Library    | ✔️                | ✔️                 |      
             |               |           |
-| Avro.perf       | Exe        | ✔️                |                    |      
             |                |✔️        |
-| Avro.test       | Unit Tests | ✔️                |                    |      
             | ✔️            |✔️         |
+| Project         | Type       | .NET Framework 4.0 | .NET Standard 2.0  | 
.NET Standard 2.1 | .NET Core 3.1 | .NET 5.0  | .NET 6.0  |
+|:---------------:|:----------:|:------------------:|:------------------:|:-----------------:|:-------------:|:---------:|:---------:|
+| Avro.codegen    | Exe        |                    |                    |     
              | ✔️            |✔️        |✔️         |
+| Avro.ipc        | Library    | ✔️                 | ✔️                |      
             |               |           |           |
+| Avro.ipc.test   | Unit Tests | ✔️                 |                    |     
              |               |           |           |
+| Avro.main       | Library    |                    | ✔️                 | ✔️  
             |               |           |           |
+| Avro.msbuild    | Library    | ✔️                | ✔️                 |      
             |               |           |           |
+| Avro.perf       | Exe        | ✔️                |                    |      
             |                |✔️        |✔️         |
+| Avro.test       | Unit Tests | ✔️                |                    |      
             | ✔️            |✔️         |✔️        |
 
 ## Dependency package version strategy
 
diff --git a/lang/csharp/build.sh b/lang/csharp/build.sh
index 5e62ad2..6fe5cdf 100755
--- a/lang/csharp/build.sh
+++ b/lang/csharp/build.sh
@@ -42,7 +42,7 @@ do
 
     perf)
       pushd ./src/apache/perf/
-      dotnet run --configuration Release --framework net5.0
+      dotnet run --configuration Release --framework net6.0
       ;;
 
     dist)
@@ -70,7 +70,7 @@ do
       ;;
 
     interop-data-generate)
-      dotnet run --project src/apache/test/Avro.test.csproj --framework net5.0 
../../share/test/schemas/interop.avsc ../../build/interop/data
+      dotnet run --project src/apache/test/Avro.test.csproj --framework net6.0 
../../share/test/schemas/interop.avsc ../../build/interop/data
       ;;
 
     interop-data-test)
diff --git a/lang/csharp/src/apache/codegen/Avro.codegen.csproj 
b/lang/csharp/src/apache/codegen/Avro.codegen.csproj
index 5fa56cd..d9598c0 100644
--- a/lang/csharp/src/apache/codegen/Avro.codegen.csproj
+++ b/lang/csharp/src/apache/codegen/Avro.codegen.csproj
@@ -22,12 +22,12 @@
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <!--
-    Support .NET Core 3.1 (LTS) and .NET 5.0 (latest)
+    Support .NET Core 3.1 (LTS), .NET 5.0, .NET 6.0 (LTS)
     When installing with 'dotnet tool install', the proper/supported framwork 
will be selected,
     unless framework is explicitly specified with 'dotnet tool install'
     https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-tool-install
     -->
-    <TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
+    <TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
     <AssemblyName>avrogen</AssemblyName>
     <RootNamespace>Avro.codegen</RootNamespace>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
diff --git a/lang/csharp/src/apache/perf/Avro.perf.csproj 
b/lang/csharp/src/apache/perf/Avro.perf.csproj
index 00b94aa..efd92e2 100644
--- a/lang/csharp/src/apache/perf/Avro.perf.csproj
+++ b/lang/csharp/src/apache/perf/Avro.perf.csproj
@@ -18,8 +18,8 @@
 
   <PropertyGroup>
     <OutputType>Exe</OutputType>
-    <TargetFrameworks 
Condition="'$(OS)'!='Windows_NT'">net5.0</TargetFrameworks>
-    <TargetFrameworks 
Condition="'$(OS)'=='Windows_NT'">net461;net5.0</TargetFrameworks>
+    <TargetFrameworks 
Condition="'$(OS)'!='Windows_NT'">net6.0</TargetFrameworks>
+    <TargetFrameworks 
Condition="'$(OS)'=='Windows_NT'">net461;net6.0</TargetFrameworks>
     <AssemblyName>Avro.perf</AssemblyName>
     <RootNamespace>Avro.perf</RootNamespace>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
diff --git a/lang/csharp/src/apache/test/Avro.test.csproj 
b/lang/csharp/src/apache/test/Avro.test.csproj
index f3420ce..223c7f7 100644
--- a/lang/csharp/src/apache/test/Avro.test.csproj
+++ b/lang/csharp/src/apache/test/Avro.test.csproj
@@ -19,8 +19,8 @@
   <Import Project="../../../versions.props" />
 
   <PropertyGroup>
-    <TargetFrameworks 
Condition="'$(OS)'!='Windows_NT'">netcoreapp3.1;net5.0</TargetFrameworks>
-    <TargetFrameworks 
Condition="'$(OS)'=='Windows_NT'">net461;netcoreapp3.1;net5.0</TargetFrameworks>
+    <TargetFrameworks 
Condition="'$(OS)'!='Windows_NT'">netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
+    <TargetFrameworks 
Condition="'$(OS)'=='Windows_NT'">net461;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
     <RootNamespace>Avro.test</RootNamespace>
     <AssemblyName>Avro.test</AssemblyName>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
diff --git a/lang/csharp/versions.props b/lang/csharp/versions.props
index 26f76e4..6c69d03 100644
--- a/lang/csharp/versions.props
+++ b/lang/csharp/versions.props
@@ -54,7 +54,7 @@
   <PropertyGroup Label="Build, Test, Code Analysis Package Versions">
     <MicrosoftBuildFrameworkVersion>16.8.0</MicrosoftBuildFrameworkVersion>
     
<MicrosoftBuildUtilitiesCoreVersion>16.8.0</MicrosoftBuildUtilitiesCoreVersion>
-    
<MicrosoftCodeAnalysisNetAnalyzersVersion>5.0.3</MicrosoftCodeAnalysisNetAnalyzersVersion>
+    
<MicrosoftCodeAnalysisNetAnalyzersVersion>6.0.0</MicrosoftCodeAnalysisNetAnalyzersVersion>
     <MicrosoftNETTestSdkVersion>16.11.0</MicrosoftNETTestSdkVersion>
     <NUnitVersion>3.13.2</NUnitVersion>
     <NUnitConsoleRunnerVersion>3.13.2</NUnitConsoleRunnerVersion>
diff --git a/share/docker/Dockerfile b/share/docker/Dockerfile
index 7b8ce55..a2526f0 100644
--- a/share/docker/Dockerfile
+++ b/share/docker/Dockerfile
@@ -178,7 +178,7 @@ RUN wget 
https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-p
  && dpkg -i packages-microsoft-prod.deb \
  && rm packages-microsoft-prod.deb \
  && apt-get update \
- && apt-get -qqy install --no-install-recommends dotnet-sdk-3.1 dotnet-sdk-5.0 
\
+ && apt-get -qqy install --no-install-recommends dotnet-sdk-3.1 dotnet-sdk-5.0 
dotnet-sdk-6.0 \
  && apt-get -qqy clean
 
 # Install Ruby

Reply via email to