Browse Source

Merge pull request #1884 from Bond-009/netcore3.0

Move to netcore3.0
Vasily 5 years ago
parent
commit
0ccbc2f374

+ 1 - 1
Emby.Naming/Emby.Naming.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFramework>netstandard2.0</TargetFramework>
+    <TargetFramework>netstandard2.1</TargetFramework>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
   </PropertyGroup>
 

+ 0 - 31
Emby.Naming/Extensions/StringExtensions.cs

@@ -1,31 +0,0 @@
-using System;
-using System.Text;
-
-namespace Emby.Naming.Extensions
-{
-    public static class StringExtensions
-    {
-        // TODO: @bond remove this when moving to netstandard2.1
-        public static string Replace(this string str, string oldValue, string newValue, StringComparison comparison)
-        {
-            var sb = new StringBuilder();
-
-            var previousIndex = 0;
-            var index = str.IndexOf(oldValue, comparison);
-
-            while (index != -1)
-            {
-                sb.Append(str.Substring(previousIndex, index - previousIndex));
-                sb.Append(newValue);
-                index += oldValue.Length;
-
-                previousIndex = index;
-                index = str.IndexOf(oldValue, index, comparison);
-            }
-
-            sb.Append(str.Substring(previousIndex));
-
-            return sb.ToString();
-        }
-    }
-}

+ 0 - 2
Emby.Naming/TV/SeasonPathParser.cs

@@ -2,8 +2,6 @@ using System;
 using System.Globalization;
 using System.IO;
 using System.Linq;
-using Emby.Naming.Common;
-using Emby.Naming.Extensions;
 
 namespace Emby.Naming.TV
 {

+ 1 - 2
Emby.Server.Implementations/Data/SqliteExtensions.cs

@@ -34,8 +34,7 @@ namespace Emby.Server.Implementations.Data
 
         public static Guid ReadGuidFromBlob(this IResultSetValue result)
         {
-            // TODO: Remove ToArray when upgrading to netstandard2.1
-            return new Guid(result.ToBlob().ToArray());
+            return new Guid(result.ToBlob());
         }
 
         public static string ToDateTimeParamValue(this DateTime dateValue)

+ 1 - 1
Emby.Server.Implementations/Emby.Server.Implementations.csproj

@@ -42,7 +42,7 @@
   </ItemGroup>
 
   <PropertyGroup>
-    <TargetFramework>netstandard2.0</TargetFramework>
+    <TargetFramework>netstandard2.1</TargetFramework>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
   </PropertyGroup>

+ 1 - 1
Jellyfin.Server/Jellyfin.Server.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <AssemblyName>jellyfin</AssemblyName>
     <OutputType>Exe</OutputType>
-    <TargetFramework>netcoreapp2.1</TargetFramework>
+    <TargetFramework>netcoreapp3.0</TargetFramework>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
   </PropertyGroup>

+ 2 - 2
tests/Jellyfin.Common.Tests/Jellyfin.Common.Tests.csproj

@@ -1,12 +1,12 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFramework>netcoreapp2.2</TargetFramework>
+    <TargetFramework>netcoreapp3.0</TargetFramework>
     <IsPackable>false</IsPackable>
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
+    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
     <PackageReference Include="xunit" Version="2.4.1" />
     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
     <PackageReference Include="coverlet.collector" Version="1.1.0" />

+ 2 - 2
tests/Jellyfin.MediaEncoding.Tests/Jellyfin.MediaEncoding.Tests.csproj

@@ -1,12 +1,12 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFramework>netcoreapp2.2</TargetFramework>
+    <TargetFramework>netcoreapp3.0</TargetFramework>
     <IsPackable>false</IsPackable>
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
+    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
     <PackageReference Include="xunit" Version="2.4.1" />
     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
     <PackageReference Include="coverlet.collector" Version="1.1.0" />