You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2022/03/29 10:30:20 UTC
[avro] branch branch-1.11 updated: AVRO-3469: Add .NET 7.0 prerelease support (#1621)
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 ec47e23 AVRO-3469: Add .NET 7.0 prerelease support (#1621)
ec47e23 is described below
commit ec47e23c7e64f828706b518f2af4503c141f36d4
Author: Zoltan Csizmadia <zc...@gmail.com>
AuthorDate: Tue Mar 29 03:10:06 2022 -0500
AVRO-3469: Add .NET 7.0 prerelease support (#1621)
* Add .NET 7.0 prerelease support
* Fix comments
* Fix comments #2
Co-authored-by: Zoltan Csizmadia <Cs...@valassis.com>
(cherry picked from commit 47ed66f609f079d5ffa13405d1132ce1194e9fbc)
---
.github/workflows/test-lang-csharp.yml | 13 +++++++++++++
lang/csharp/common.props | 4 +++-
lang/csharp/versions.props | 4 +++-
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/test-lang-csharp.yml b/.github/workflows/test-lang-csharp.yml
index 0492335..b436f27 100644
--- a/.github/workflows/test-lang-csharp.yml
+++ b/.github/workflows/test-lang-csharp.yml
@@ -63,6 +63,19 @@ jobs:
- name: Test
run: ./build.sh test
+ # Build and test against .NET 7
+ # .NET 7 is not released yet, however this is a good way to test if the project is ready for the release
+ # Once .NET 7 is officially released, this can be removed and 7.0.x can be used instead above
+ - name: Install .NET SDK 7.0 (pre-release)
+ uses: actions/setup-dotnet@v1
+ with:
+ include-prerelease: true
+ dotnet-version: |
+ 7.0.x
+
+ - name: Test .NET 7.0 (pre-release)
+ run: ./build.sh test
+
interop:
runs-on: ubuntu-latest
steps:
diff --git a/lang/csharp/common.props b/lang/csharp/common.props
index ed87387..72a79fd 100644
--- a/lang/csharp/common.props
+++ b/lang/csharp/common.props
@@ -37,7 +37,9 @@
<PropertyGroup Label="Target Frameworks">
<!-- Exe -->
- <DefaultExeTargetFrameworks>netcoreapp3.1;net5.0;net6.0</DefaultExeTargetFrameworks>
+ <!-- NOTE: .NET 7 is still in preview state, use it only if it is available to make sure the project is ready for it. When .NET 7 SDK is released preview, update this -->
+ <DefaultExeTargetFrameworks Condition="'$(NETCoreAppMaximumVersion)' != '7.0' or '$(_NETCoreSdkIsPreview)' == 'false'">netcoreapp3.1;net5.0;net6.0</DefaultExeTargetFrameworks>
+ <DefaultExeTargetFrameworks Condition="'$(NETCoreAppMaximumVersion)' == '7.0' and '$(_NETCoreSdkIsPreview)' == 'true'">net7.0</DefaultExeTargetFrameworks>
<!-- Library -->
<DefaultLibraryTargetFrameworks>netstandard2.0;netstandard2.1</DefaultLibraryTargetFrameworks>
<!-- Unit Tests -->
diff --git a/lang/csharp/versions.props b/lang/csharp/versions.props
index aea7edb..cf4643d 100644
--- a/lang/csharp/versions.props
+++ b/lang/csharp/versions.props
@@ -60,7 +60,9 @@
<MicrosoftCodeAnalysisVersion>4.1.0</MicrosoftCodeAnalysisVersion>
<MicrosoftCodeAnalysisCSharpVersion>4.1.0</MicrosoftCodeAnalysisCSharpVersion>
<MicrosoftCodeAnalysisCSharpCodeStyleVersion>4.1.0</MicrosoftCodeAnalysisCSharpCodeStyleVersion>
- <MicrosoftCodeAnalysisNetAnalyzersVersion>6.0.0</MicrosoftCodeAnalysisNetAnalyzersVersion>
+ <!-- When .NET 7 SDK is released or the package is is not in preview, update this version -->
+ <MicrosoftCodeAnalysisNetAnalyzersVersion Condition="'$(TargetFramework)' != 'net7.0'">6.0.0</MicrosoftCodeAnalysisNetAnalyzersVersion>
+ <MicrosoftCodeAnalysisNetAnalyzersVersion Condition="'$(TargetFramework)' == 'net7.0'">7.0.0-preview*</MicrosoftCodeAnalysisNetAnalyzersVersion>
<MicrosoftNETTestSdkVersion>17.1.0</MicrosoftNETTestSdkVersion>
<NUnitVersion>3.13.2</NUnitVersion>
<NUnitConsoleRunnerVersion>3.15.0</NUnitConsoleRunnerVersion>