lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [lucenenet] 06/13: Lucene.Net.Tests._J-S: Added System.Runtime.InteropServices.RuntimeInformation for net451 target only
Date Sat, 26 Oct 2019 18:52:01 GMT
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 55503dd20ff3bd03ac5b6227ecc11cc24bac8d92
Author: Shad Storhaug <shad@shadstorhaug.com>
AuthorDate: Sat Oct 26 00:56:27 2019 +0700

    Lucene.Net.Tests._J-S: Added System.Runtime.InteropServices.RuntimeInformation for net451
target only
---
 build/Dependencies.props                               | 1 +
 src/Lucene.Net.Tests._J-S/Lucene.Net.Tests._J-S.csproj | 8 +++++++-
 src/Lucene.Net.Tests/Support/IO/TestFileSupport.cs     | 3 ++-
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/build/Dependencies.props b/build/Dependencies.props
index 625e6a7..1cb92e6 100644
--- a/build/Dependencies.props
+++ b/build/Dependencies.props
@@ -69,6 +69,7 @@
     <SystemReflectionEmitPackageVersion>4.3.0</SystemReflectionEmitPackageVersion>
     <SystemReflectionEmitILGenerationPackageVersion>4.3.0</SystemReflectionEmitILGenerationPackageVersion>
     <SystemReflectionTypeExtensionsPackageVersion>4.3.0</SystemReflectionTypeExtensionsPackageVersion>
+    <SystemRuntimeInteropServicesRuntimeInformationPackageVersion>4.3.0</SystemRuntimeInteropServicesRuntimeInformationPackageVersion>
     <SystemTextEncodingCodePagesPackageVersion>4.3.0</SystemTextEncodingCodePagesPackageVersion>
     <SystemThreadingThreadPackageVersion>4.3.0</SystemThreadingThreadPackageVersion>
     <SystemThreadingThreadPoolPackageVersion>4.3.0</SystemThreadingThreadPoolPackageVersion>
diff --git a/src/Lucene.Net.Tests._J-S/Lucene.Net.Tests._J-S.csproj b/src/Lucene.Net.Tests._J-S/Lucene.Net.Tests._J-S.csproj
index 449e134..4c7236c 100644
--- a/src/Lucene.Net.Tests._J-S/Lucene.Net.Tests._J-S.csproj
+++ b/src/Lucene.Net.Tests._J-S/Lucene.Net.Tests._J-S.csproj
@@ -50,7 +50,7 @@
     <ProjectReference Include="..\Lucene.Net.QueryParser\Lucene.Net.QueryParser.csproj"
/>
     <ProjectReference Include="..\Lucene.Net.TestFramework.NUnit\Lucene.Net.TestFramework.NUnit.csproj"
/>
   </ItemGroup>
-  
+
   <Import Project="$(SolutionDir)build/TestReferences.Common.targets" />
   
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
@@ -59,6 +59,8 @@
   </PropertyGroup>
   
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
+
+  <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
     <DefineConstants>$(DefineConstants);NETSTANDARD;NETSTANDARD1_6</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
@@ -71,6 +73,10 @@
   <ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
     <Compile Remove="..\Lucene.Net.Tests\Support\TestCase.cs" />
   </ItemGroup>
+
+  <ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
+    <PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="$(SystemRuntimeInteropServicesRuntimeInformationPackageVersion)"
/>
+  </ItemGroup>
   
   <ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
     <Reference Include="System" />
diff --git a/src/Lucene.Net.Tests/Support/IO/TestFileSupport.cs b/src/Lucene.Net.Tests/Support/IO/TestFileSupport.cs
index b5ce877..244f848 100644
--- a/src/Lucene.Net.Tests/Support/IO/TestFileSupport.cs
+++ b/src/Lucene.Net.Tests/Support/IO/TestFileSupport.cs
@@ -4,6 +4,7 @@ using NUnit.Framework;
 using System;
 using System.Globalization;
 using System.IO;
+using System.Runtime.InteropServices;
 
 namespace Lucene.Net.Support.IO
 {
@@ -26,7 +27,7 @@ namespace Lucene.Net.Support.IO
 
     public class TestFileSupport : LuceneTestCase
     {
-        private static String platformId = System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription.Replace('.',
'-');
+        private static String platformId = RuntimeInformation.FrameworkDescription.Replace('.',
'-');
 
         /** Location to store tests in */
         private DirectoryInfo tempDirectory;


Mime
View raw message