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

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit 8d43130f6923b677d292dc037dcbf285760a9c9b
Author: Shad Storhaug <[email protected]>
AuthorDate: Wed Nov 11 14:06:21 2020 +0700

    Added test target for .NET 5
---
 Directory.Build.targets   | 14 +++++++-------
 TestTargetFramework.props |  5 +++--
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/Directory.Build.targets b/Directory.Build.targets
index f0c8e3f..d62cfbb 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -27,8 +27,8 @@
 
   </PropertyGroup>
   
-  <!-- Features in .NET Standard and .NET Core only (no .NET Framework 
support) -->
-  <PropertyGroup Condition=" $(TargetFramework.StartsWith('netstandard')) Or 
$(TargetFramework.StartsWith('netcoreapp')) ">
+  <!-- Features in .NET Standard, .NET Core, and .NET 5 only (no .NET 
Framework support) -->
+  <PropertyGroup Condition=" $(TargetFramework.StartsWith('netstandard')) Or 
$(TargetFramework.StartsWith('netcoreapp')) Or '$(TargetFramework)' == 'net5.0' 
">
     
     <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
     <DefineConstants>$(DefineConstants);FEATURE_ARRAYEMPTY</DefineConstants>
@@ -39,7 +39,7 @@
   </PropertyGroup>
 
   <!-- Features in .NET Standard 2.1 only -->
-  <PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' Or 
$(TargetFramework.StartsWith('netcoreapp3.')) ">
+  <PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' Or 
$(TargetFramework.StartsWith('netcoreapp3.')) Or '$(TargetFramework)' == 
'net5.0' ">
 
     
<DefineConstants>$(DefineConstants);FEATURE_CONDITIONALWEAKTABLE_ENUMERATOR</DefineConstants>
     
<DefineConstants>$(DefineConstants);FEATURE_CONDITIONALWEAKTABLE_ADDORUPDATE</DefineConstants>
@@ -47,15 +47,15 @@
     
   </PropertyGroup>
 
-  <!-- Features in .NET Standard 2.x, .NET Core 2.x, and .NET Core 3.x -->
-  <PropertyGroup Condition=" $(TargetFramework.StartsWith('netstandard2.')) Or 
$(TargetFramework.StartsWith('netcoreapp2.')) Or 
$(TargetFramework.StartsWith('netcoreapp3.')) ">
+  <!-- Features in .NET Standard 2.x, .NET Core 2.x, .NET Core 3.x, and .NET 5 
-->
+  <PropertyGroup Condition=" $(TargetFramework.StartsWith('netstandard2.')) Or 
$(TargetFramework.StartsWith('netcoreapp2.')) Or 
$(TargetFramework.StartsWith('netcoreapp3.')) Or '$(TargetFramework)' == 
'net5.0' ">
 
     
<DefineConstants>$(DefineConstants);FEATURE_ICONFIGURATIONROOT_PROVIDERS</DefineConstants>
 
   </PropertyGroup>
 
-    <!-- Features in .NET Framework 4.5+, .NET Standard 2.x, .NET Core 2.x, 
and .NET Core 3.x -->
-  <PropertyGroup Condition=" $(TargetFramework.StartsWith('net4')) Or 
$(TargetFramework.StartsWith('netstandard2.')) Or 
$(TargetFramework.StartsWith('netcoreapp2.')) Or 
$(TargetFramework.StartsWith('netcoreapp3.')) ">
+  <!-- Features in .NET Framework 4.5+, .NET Standard 2.x, .NET Core 2.x, .NET 
Core 3.x, and .NET 5  -->
+  <PropertyGroup Condition=" $(TargetFramework.StartsWith('net4')) Or 
$(TargetFramework.StartsWith('netstandard2.')) Or 
$(TargetFramework.StartsWith('netcoreapp2.')) Or 
$(TargetFramework.StartsWith('netcoreapp3.')) Or '$(TargetFramework)' == 
'net5.0' ">
 
     
<DefineConstants>$(DefineConstants);FEATURE_APPDOMAIN_BASEDIRECTORY</DefineConstants>
     
<DefineConstants>$(DefineConstants);FEATURE_APPDOMAIN_GETASSEMBLIES</DefineConstants>
diff --git a/TestTargetFramework.props b/TestTargetFramework.props
index 7347dd0..d2149aa 100644
--- a/TestTargetFramework.props
+++ b/TestTargetFramework.props
@@ -28,12 +28,13 @@
     this setting only affects the test projects. -->
     <!--<TargetFramework>net48</TargetFramework>-->
     <!--<TargetFramework>netcoreapp2.1</TargetFramework>-->
-    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <!--<TargetFramework>netcoreapp3.1</TargetFramework>-->
+    <TargetFramework>net5.0</TargetFramework>
 
     <!-- Allow the build script to pass in the test frameworks to build for.
       This overrides the above TargetFramework setting. 
       LUCENENET TODO: Due to a parsing bug, we cannot pass a string with a ; 
to dotnet msbuild, so passing true as a workaround -->
-    <TargetFrameworks Condition=" '$(TestFrameworks)' == 'true' 
">netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
+    <TargetFrameworks Condition=" '$(TestFrameworks)' == 'true' 
">net5.0;netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
     <TargetFrameworks Condition=" '$(TestFrameworks)' == 'true' AND 
$([MSBuild]::IsOsPlatform('Windows')) 
">$(TargetFrameworks);net48</TargetFrameworks>
     <TargetFramework Condition=" '$(TargetFrameworks)' != '' 
"></TargetFramework>
   </PropertyGroup>

Reply via email to