Skip to content

Commit e0d49d7

Browse files
committed
Add netstandard2.0 target and update/fix 1.3 packaging
1 parent fe550e9 commit e0d49d7

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

BencodeNET/BencodeNET.csproj

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net45;netstandard1.3</TargetFrameworks>
5-
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
4+
<TargetFrameworks>net45;netstandard1.3;netstandard2.0</TargetFrameworks>
65
<GenerateDocumentationFile>True</GenerateDocumentationFile>
76
</PropertyGroup>
87

@@ -18,7 +17,7 @@
1817
<Company />
1918
<Product>BencodeNET</Product>
2019
<Description>A library for encoding and decoding bencode (e.g. torrent files)</Description>
21-
<PackageLicenseUrl>https://github.com/Krusen/BencodeNET/blob/master/LICENSE.md</PackageLicenseUrl>
20+
<PackageLicenseExpression>Unlicense</PackageLicenseExpression>
2221
<PackageProjectUrl>https://github.com/Krusen/BencodeNET</PackageProjectUrl>
2322
<PackageIconUrl>https://raw.githubusercontent.com/Krusen/BencodeNET/master/Assets/icon.png</PackageIconUrl>
2423
<RepositoryUrl>https://github.com/Krusen/BencodeNET</RepositoryUrl>
@@ -30,13 +29,10 @@
3029
<IncludeSymbols>True</IncludeSymbols>
3130
</PropertyGroup>
3231

33-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
34-
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
35-
</PropertyGroup>
36-
3732
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
38-
<PackageReference Include="System.Reflection" Version="4.1.0" />
39-
<PackageReference Include="System.Security.Cryptography.Algorithms" Version="4.2.0" />
33+
<PackageReference Update="NETStandard.Library" PrivateAssets="all" />
34+
<PackageReference Include="System.Reflection" Version="4.3.0" />
35+
<PackageReference Include="System.Security.Cryptography.Algorithms" Version="4.3.0" />
4036
</ItemGroup>
4137

4238
</Project>

BencodeNET/UtilityExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Linq;
44
using System.Text;
55

6-
#if NETSTANDARD
6+
#if NETSTANDARD1_3
77
using System;
88
using System.Reflection;
99
#endif
@@ -37,7 +37,7 @@ public static IEnumerable<T> Flatten<T>(this IEnumerable<IEnumerable<T>> source)
3737
return source.SelectMany(x => x);
3838
}
3939

40-
#if NETSTANDARD
40+
#if NETSTANDARD1_3
4141
public static bool IsAssignableFrom(this Type type, Type otherType)
4242
{
4343
return type.GetTypeInfo().IsAssignableFrom(otherType.GetTypeInfo());

0 commit comments

Comments
 (0)