Drop netstandard1.x and netcoreapp1.x

This commit is contained in:
Frederik Carlier
2019-06-12 20:42:23 +02:00
parent 7f98f27448
commit c51328af91
3 changed files with 2 additions and 38 deletions

View File

@@ -25,9 +25,7 @@
// SOFTWARE. // SOFTWARE.
using System; using System;
#if NET45
using System.Runtime.Serialization; using System.Runtime.Serialization;
#endif
namespace Claunia.PropertyList namespace Claunia.PropertyList
{ {
@@ -62,11 +60,9 @@ namespace Claunia.PropertyList
/// </param> /// </param>
public PropertyListException(string message, Exception inner) : base(message, inner) { } public PropertyListException(string message, Exception inner) : base(message, inner) { }
#if !NETCORE
protected PropertyListException(SerializationInfo info, StreamingContext context) protected PropertyListException(SerializationInfo info, StreamingContext context)
: base(info, context) : base(info, context)
{ {
} }
#endif
} }
} }

View File

@@ -247,16 +247,8 @@ namespace Claunia.PropertyList
/// <exception cref="IOException">When an error occurs during the writing process.</exception> /// <exception cref="IOException">When an error occurs during the writing process.</exception>
public static void SaveAsXml(NSObject root, Stream outStream) public static void SaveAsXml(NSObject root, Stream outStream)
{ {
#if NET40
// The StreamWriter constructor which takes a "leaveOpen" parameter is
// not available on .NET 4.0
StreamWriter w = new StreamWriter(outStream, Encoding.UTF8);
w.Write(root.ToXmlPropertyList());
w.Close();
#else
using(StreamWriter w = new StreamWriter(outStream, Encoding.UTF8, 1024, true)) using(StreamWriter w = new StreamWriter(outStream, Encoding.UTF8, 1024, true))
w.Write(root.ToXmlPropertyList()); w.Write(root.ToXmlPropertyList());
#endif
} }
/// <summary> /// <summary>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp1.0;netstandard1.3;netstandard1.4;netstandard1.6;netcoreapp2.0;netstandard2.0;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1</TargetFrameworks> <TargetFrameworks>net45;netcoreapp2.0;netstandard2.0;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1</TargetFrameworks>
<VersionPrefix>2.1</VersionPrefix> <VersionPrefix>2.1</VersionPrefix>
<Authors>Natalia Portillo</Authors> <Authors>Natalia Portillo</Authors>
<Company>Claunia.com</Company> <Company>Claunia.com</Company>
@@ -46,31 +46,7 @@ Use invariant culture to format NSDate.</PackageReleaseNotes>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19367-01" PrivateAssets="All" /> <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
<Reference Include="System" />
<Reference Include="System.Numerics" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard1.')) Or $(TargetFramework.StartsWith('netcoreapp1.'))">
<PackageReference Include="System.Diagnostics.Debug" Version="4.3.0" />
<PackageReference Include="System.Linq" Version="4.3.0" />
<PackageReference Include="System.Globalization" Version="4.3.0" />
<PackageReference Include="System.IO.FileSystem" Version="4.3.0" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.0" />
<PackageReference Include="System.Threading" Version="4.3.0" />
<PackageReference Include="System.Resources.ResourceManager" Version="4.3.0" />
<PackageReference Include="System.Reflection" Version="4.3.0" />
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.3.0" />
<PackageReference Include="System.Runtime.Extensions" Version="4.3.0" />
<PackageReference Include="System.Runtime.Serialization.Formatters" Version="4.3.0" />
<PackageReference Include="System.Xml.XmlDocument" Version="4.3.0" />
<PackageReference Include="System.Xml.XmlSerializer" Version="4.3.0" />
<PackageReference Include="System.Runtime.Numerics" Version="4.3.0" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp2.1'"> <ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp2.1'">