Skip to content

Commit a6d1309

Browse files
committed
Add Suppot for .net 5 so we can remove Microsoft.Extensions.DependencyModel 1.1.0
1 parent 64292e1 commit a6d1309

File tree

11 files changed

+50
-22
lines changed

11 files changed

+50
-22
lines changed

itext.tests/itext.io.tests/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
[assembly: AssemblyFileVersion("7.1.15.0")]
2020
[assembly: AssemblyInformationalVersion("7.1.15-SNAPSHOT")]
2121

22-
#if !NETSTANDARD2_0
22+
#if !NETSTANDARD2_0 && !NET5_0
2323
[assembly: NUnit.Framework.Timeout(300000)]
2424
#endif

itext.tests/itext.io.tests/itext.io.tests.netstandard.csproj

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<WarningLevel>4</WarningLevel>
66
</PropertyGroup>
77
<PropertyGroup>
8-
<TargetFrameworks>netcoreapp2.0;net40</TargetFrameworks>
8+
<TargetFrameworks>net5.0;netcoreapp2.0;net40</TargetFrameworks>
99
</PropertyGroup>
1010
<PropertyGroup Condition=" '$(TargetFramework)' == 'net40' ">
1111
<OutputType>library</OutputType>
@@ -52,6 +52,14 @@
5252
<Version>4.3.0</Version>
5353
</PackageReference>
5454
</ItemGroup>
55+
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
56+
<PackageReference Include="Microsoft.NET.Test.Sdk">
57+
<Version>15.0.0</Version>
58+
</PackageReference>
59+
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation">
60+
<Version>4.3.0</Version>
61+
</PackageReference>
62+
</ItemGroup>
5563
<ItemGroup>
5664
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
5765
</ItemGroup>

itext/itext.io/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@
3535

3636
[assembly: Guid("39631ecb-1d39-4eb2-b775-37bd34cbf5a4")]
3737

38-
[assembly: AssemblyVersion("7.1.15.0")]
39-
[assembly: AssemblyFileVersion("7.1.15.0")]
40-
[assembly: AssemblyInformationalVersion("7.1.15-SNAPSHOT")]
38+
[assembly: AssemblyVersion("7.2.0.0")]
39+
[assembly: AssemblyFileVersion("7.2.0.0")]
40+
[assembly: AssemblyInformationalVersion("7.2.0-SNAPSHOT")]

itext/itext.io/itext.io.netstandard.csproj

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
1+
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
22
<PropertyGroup Label="Configuration">
33
<SignAssembly>True</SignAssembly>
44
<DelaySign>False</DelaySign>
55
<DocumentationFile>$(TargetDir)bin\$(Configuration)\$(TargetFramework)\itext.io.xml</DocumentationFile>
66
<WarningLevel>4</WarningLevel>
77
</PropertyGroup>
88
<PropertyGroup>
9-
<TargetFrameworks>netstandard2.0;net40</TargetFrameworks>
9+
<TargetFrameworks>net5.0;netstandard2.0;net40</TargetFrameworks>
1010
</PropertyGroup>
1111
<PropertyGroup>
1212
<OutputType>library</OutputType>
@@ -81,9 +81,16 @@
8181
<PackageReference Include="System.Globalization.Extensions" Version="4.3.0" />
8282
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
8383
<PackageReference Include="System.Diagnostics.Process" Version="4.3.0" />
84-
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="1.1.0" />
85-
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.3.0" />
84+
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="1.1.9" />
85+
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0" />
8686
</ItemGroup>
87+
<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
88+
<PackageReference Include="System.Globalization.Extensions" Version="4.3.0" />
89+
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
90+
<PackageReference Include="System.Diagnostics.Process" Version="4.3.0" />
91+
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="5.0.0" />
92+
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0" />
93+
</ItemGroup>
8794
<ItemGroup>
8895
<PackageReference Include="Common.Logging" Version="3.4.1" />
8996
</ItemGroup>

itext/itext.io/itext/io/IOExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public static T[] ToArray<T>(this ICollection<T> col) {
197197
}
198198

199199
public static Assembly GetAssembly(this Type type) {
200-
#if !NETSTANDARD2_0
200+
#if !NETSTANDARD2_0 && !NET5_0
201201
return type.Assembly;
202202
#else
203203
return type.GetTypeInfo().Assembly;

itext/itext.io/itext/io/image/DrawingImageFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !NETSTANDARD2_0
1+
#if !NETSTANDARD2_0 && !NET5_0
22
/*
33
44
This file is part of the iText (R) project.

itext/itext.io/itext/io/image/ImageDataFactory.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public static ImageData Create(int width, int height, int components, int bpc, b
164164
return image;
165165
}
166166

167-
#if !NETSTANDARD2_0
167+
#if !NETSTANDARD2_0 && !NET5_0
168168
/// <summary>Gets an instance of an Image from a java.awt.Image</summary>
169169
/// <param name="image">the java.awt.Image to convert</param>
170170
/// <param name="color">if different from <c>null</c> the transparency pixels are replaced by this color</param>
@@ -174,7 +174,7 @@ public static ImageData Create(System.Drawing.Image image, Color? color) {
174174
}
175175
#endif // !NETSTANDARD2_0
176176

177-
#if !NETSTANDARD2_0
177+
#if !NETSTANDARD2_0 && !NET5_0
178178
/// <summary>Gets an instance of an Image from a java.awt.Image.</summary>
179179
/// <param name="image">the <c>java.awt.Image</c> to convert</param>
180180
/// <param name="color">if different from <c>null</c> the transparency pixels are replaced by this color</param>

itext/itext.io/itext/io/util/AssemblyLoadContextUtil.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ source product.
4848

4949
namespace iText.IO.Util
5050
{
51-
#if NETSTANDARD2_0
51+
#if NETSTANDARD2_0 || NET5_0
5252
/// <summary>This file is a helper class for internal usage only.</summary>
5353
/// <remarks>
5454
/// This file is a helper class for internal usage only.

itext/itext.io/itext/io/util/EncodingUtil.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ namespace iText.IO.Util {
5454
public static class EncodingUtil {
5555

5656
static EncodingUtil() {
57-
#if NETSTANDARD2_0
57+
#if NETSTANDARD2_0 || NET5_0
5858
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
5959
#endif
6060
}

itext/itext.io/itext/io/util/IntHashtable.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ namespace iText.IO.Util {
5858
/// <author>Bruno Lowagie (change Objects as keys into int values)</author>
5959
/// <author>Paulo Soares (added extra methods)</author>
6060
public class IntHashtable
61-
#if !NETSTANDARD2_0
61+
#if !NETSTANDARD2_0 && !NET5_0
6262
: ICloneable
6363
#endif
6464
{

0 commit comments

Comments
 (0)