Skip to content

Commit

Permalink
Upgrade target frameworks to netstandard 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
olsh committed Nov 20, 2018
1 parent 903419f commit 2f80865
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 22 deletions.
4 changes: 4 additions & 0 deletions Todoist.Net.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{32567012-95F
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{28A18847-32D8-4A08-A1BF-BC51E3FBAB96}"
ProjectSection(SolutionItems) = preProject
appveyor.yml = appveyor.yml
build.cake = build.cake
README.md = README.md
EndProjectSection
Expand Down Expand Up @@ -37,4 +38,7 @@ Global
{0D84413B-43C0-4F0E-92A6-669F2E9EA5CB} = {32567012-95F2-4535-A545-6A48FEAF0A32}
{6F7D284C-2790-41E6-BAB5-DB0524F630D7} = {32567012-95F2-4535-A545-6A48FEAF0A32}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B041B20E-5078-409B-A474-8004179914FC}
EndGlobalSection
EndGlobal
6 changes: 1 addition & 5 deletions src/Todoist.Net.Tests/Todoist.Net.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,4 @@
<ItemGroup>
<ProjectReference Include="..\Todoist.Net\Todoist.Net.csproj" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
<Reference Include="System.Net.Http" />
</ItemGroup>
</Project>
</Project>
8 changes: 0 additions & 8 deletions src/Todoist.Net/Exceptions/TodoistException.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
using System;
#if NETFW
using System.Runtime.Serialization;
using System.Security.Permissions;

#endif

namespace Todoist.Net.Exceptions
{
/// <summary>
/// Represents an errors that occur during requests to Todoist API.
/// </summary>
/// <seealso cref="System.Exception" />
#if NETFW
[Serializable]
#endif
public sealed class TodoistException : Exception
{
/// <summary>
Expand Down Expand Up @@ -80,7 +75,6 @@ public TodoistException(long code, string message, Exception inner)
/// <value>The raw error.</value>
public dynamic RawError { get; }

#if NETFW
[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
private TodoistException(SerializationInfo info, StreamingContext context)
: base(info, context)
Expand All @@ -102,7 +96,5 @@ public override void GetObjectData(SerializationInfo info, StreamingContext cont

base.GetObjectData(info, context);
}

#endif
}
}
14 changes: 5 additions & 9 deletions src/Todoist.Net/Todoist.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<Description>A Todoist API client for .NET</Description>
<VersionPrefix>1.4.1</VersionPrefix>
<VersionPrefix>1.4.2</VersionPrefix>
<Authors>Oleg Shevchenko</Authors>
<TargetFrameworks>netstandard1.1;net45</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Todoist.Net</AssemblyName>

Expand All @@ -15,23 +15,19 @@
<PackageLicenseUrl>https://raw.githubusercontent.com/olsh/todoist-net/master/LICENSE</PackageLicenseUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/olsh/todoist-net</RepositoryUrl>
<PackageIconUrl>http://raw.githubusercontent.com/olsh/todoist-net/master/images/todoist-net-nuget.png</PackageIconUrl>
<PackageIconUrl>https://raw.githubusercontent.com/olsh/todoist-net/master/images/todoist-net-nuget.png</PackageIconUrl>

<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-62925-02" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-63127-02" PrivateAssets="All" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' ">
<DefineConstants>NETFW</DefineConstants>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<PackageReference Include="Newtonsoft.Json" Version="6.0.8" />
<Reference Include="System.Net.Http" />
Expand Down

0 comments on commit 2f80865

Please sign in to comment.