Skip to content

Commit 7a465a2

Browse files
committed
Add more target frameworks
1 parent b37bff4 commit 7a465a2

File tree

3 files changed

+53
-3
lines changed

3 files changed

+53
-3
lines changed

src/iTextSharp.LGPLv2.Core/.editorconfig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ dotnet_diagnostic.CA1310.severity = error
2828
# CA1311: Specify a culture or use an invariant version
2929
dotnet_diagnostic.CA1311.severity = error
3030

31+
# CA1510: Use 'ArgumentNullException. ThrowIfNull' instead of explicitly throwing a new exception instance
32+
dotnet_diagnostic.CA1510.severity = suggestion
33+
34+
# CA1512: Use 'ArgumentOutOfRangeException. ThrowIfNegativeOrZero' instead of explicitly throwing a new exception instance
35+
dotnet_diagnostic.CA1512.severity = suggestion
36+
37+
# CA1513: Use 'ObjectDisposedException. ThrowIf' instead of explicitly throwing a new exception instance
38+
dotnet_diagnostic.CA1513.severity = suggestion
39+
3140
# CA1820: Test for empty strings using string length
3241
dotnet_diagnostic.CA1820.severity = error
3342

@@ -79,6 +88,9 @@ dotnet_diagnostic.CA1044.severity = suggestion
7988
# CA1805: Member X is explicitly initialized to its default value
8089
dotnet_diagnostic.CA1805.severity = suggestion
8190

91+
# CA1845: Use span-based 'string. Concat' and 'AsSpan' instead of 'Substring'
92+
dotnet_diagnostic.CA1845.severity = suggestion
93+
8294
# CA1708: Names of 'Members' should differ by more than case
8395
dotnet_diagnostic.CA1708.severity = suggestion
8496

@@ -88,6 +100,9 @@ dotnet_diagnostic.CA1001.severity = suggestion
88100
# CA1823: Unused field X
89101
dotnet_diagnostic.CA1823.severity = suggestion
90102

103+
# CA1846: Prefer 'AsSpan' over 'Substring' when span-based overloads are available
104+
dotnet_diagnostic.CA1846.severity = suggestion
105+
91106
# CA1024: Use properties where appropriate
92107
dotnet_diagnostic.CA1024.severity = suggestion
93108

@@ -97,6 +112,9 @@ dotnet_diagnostic.CA1036.severity = suggestion
97112
# CA1814: initialize uses a multidimensional array of int[*,*]. Replace it with a jagged array if possible.
98113
dotnet_diagnostic.CA1814.severity = suggestion
99114

115+
# CA1850: Prefer static 'System. Security. Cryptography. SHA1.HashData' method over 'ComputeHash'
116+
dotnet_diagnostic.CA1850.severity = suggestion
117+
100118
# CA2000: Use recommended dispose pattern to ensure that object created
101119
dotnet_diagnostic.CA2000.severity = suggestion
102120

@@ -139,6 +157,9 @@ dotnet_diagnostic.CA1508.severity = suggestion
139157
# CA1040: Avoid empty interfaces
140158
dotnet_diagnostic.CA1040.severity = suggestion
141159

160+
# CA2249: Use 'string. Contains' instead of 'string. IndexOf' to improve readability
161+
dotnet_diagnostic.CA2249.severity = suggestion
162+
142163
# CA5351: Create uses a broken cryptographic algorithm MD5
143164
dotnet_diagnostic.CA5351.severity = suggestion
144165

@@ -175,5 +196,8 @@ dotnet_diagnostic.IDE0004.severity = warning
175196
# Use readonly Modifier
176197
dotnet_diagnostic.IDE0044.severity = warning
177198

199+
# SYSLIB0014: Method 'System.Net.WebRequest.Create(Uri)' is obsolete: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.'
200+
dotnet_diagnostic.SYSLIB0014.severity = suggestion
201+
178202
# force file scoped namespaces
179203
csharp_style_namespace_declarations = file_scoped:error
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
dotnet watch build
1+
dotnet build
22
pause

src/iTextSharp.LGPLv2.Core/iTextSharp.LGPLv2.Core.csproj

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<Description>iTextSharp.LGPLv2.Core is an unofficial port of the last LGPL version of the iTextSharp (V4.1.6) to .NET Core.</Description>
4-
<VersionPrefix>3.4.25</VersionPrefix>
4+
<VersionPrefix>3.4.26</VersionPrefix>
55
<LangVersion>latest</LangVersion>
66
<Authors>Vahid Nasiri</Authors>
7-
<TargetFrameworks>netstandard2.0;net462;</TargetFrameworks>
7+
<TargetFrameworks>net9.0;net8.0;net7.0;net6.0;netstandard2.0;net462;</TargetFrameworks>
88
<NoWarn>$(NoWarn);1591</NoWarn>
99
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1010
<AssemblyName>iTextSharp.LGPLv2.Core</AssemblyName>
@@ -67,13 +67,39 @@
6767
<PackageReference Include="BouncyCastle.Cryptography" Version="2.5.0"/>
6868
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
6969
</ItemGroup>
70+
7071
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
7172
<PackageReference Include="System.Text.Encoding.CodePages" Version="9.0.0"/>
7273
</ItemGroup>
7374
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
7475
<DefineConstants>NETSTANDARD2_0</DefineConstants>
7576
</PropertyGroup>
77+
7678
<PropertyGroup Condition="'$(TargetFramework)' == 'net462'">
7779
<DefineConstants>NET40</DefineConstants>
7880
</PropertyGroup>
81+
82+
<PropertyGroup Condition="('$(TargetFramework)' == 'net6.0')">
83+
<DefineConstants>NET_6</DefineConstants>
84+
</PropertyGroup>
85+
<ItemGroup Condition="('$(TargetFramework)' == 'net6.0')">
86+
</ItemGroup>
87+
88+
<PropertyGroup Condition="('$(TargetFramework)' == 'net7.0')">
89+
<DefineConstants>NET_7</DefineConstants>
90+
</PropertyGroup>
91+
<ItemGroup Condition="('$(TargetFramework)' == 'net7.0')">
92+
</ItemGroup>
93+
94+
<PropertyGroup Condition="('$(TargetFramework)' == 'net8.0')">
95+
<DefineConstants>NET_8</DefineConstants>
96+
</PropertyGroup>
97+
<ItemGroup Condition="('$(TargetFramework)' == 'net8.0')">
98+
</ItemGroup>
99+
100+
<PropertyGroup Condition="('$(TargetFramework)' == 'net9.0')">
101+
<DefineConstants>NET_9</DefineConstants>
102+
</PropertyGroup>
103+
<ItemGroup Condition="('$(TargetFramework)' == 'net9.0')">
104+
</ItemGroup>
79105
</Project>

0 commit comments

Comments
 (0)