diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fcc1e7..7dbb935 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## 2.0.0-v2alpha - Publish as strong-named package only (discontinue non-strong-named versions) +- Add .NetStandard 2.0 target ## 1.0.3 - RTM version diff --git a/README.md b/README.md index 2f52f14..cce5669 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Polly.Extensions.Http is an extensions package containing opinionated convenience methods for configuring [Polly](https://github.com/App-vNext/Polly) policies to handle transient faults typical of calls through HttpClient. -Polly.Extensions.Http targets .NET Standard 1.1. +Polly.Extensions.Http targets .NET Standard 1.1 and .NET Standard 2.0. [Polly](https://github.com/App-vNext/Polly) is a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner. diff --git a/build.cake b/build.cake index 2037618..c94a056 100644 --- a/build.cake +++ b/build.cake @@ -46,6 +46,7 @@ var snkFile = srcDir + File(keyName); var projectToNugetFolderMap = new Dictionary() { { "NetStandard11", new [] {"netstandard1.1"} }, + { "NetStandard20", new [] {"netstandard2.0"} }, }; // Gitversion diff --git a/src/Polly.Extensions.Http.NetStandard11/Polly.Extensions.Http.NetStandard11.csproj b/src/Polly.Extensions.Http.NetStandard11/Polly.Extensions.Http.NetStandard11.csproj index 74aa304..e2cfc1a 100644 --- a/src/Polly.Extensions.Http.NetStandard11/Polly.Extensions.Http.NetStandard11.csproj +++ b/src/Polly.Extensions.Http.NetStandard11/Polly.Extensions.Http.NetStandard11.csproj @@ -6,7 +6,7 @@ en-US false true - PolicyExtensions + Polly.Extensions.Http netstandard1.1 1.6.1 diff --git a/src/Polly.Extensions.Http.NetStandard20.Specs/Polly.Extensions.Http.NetStandard20.Specs.csproj b/src/Polly.Extensions.Http.NetStandard20.Specs/Polly.Extensions.Http.NetStandard20.Specs.csproj new file mode 100644 index 0000000..f08b6b8 --- /dev/null +++ b/src/Polly.Extensions.Http.NetStandard20.Specs/Polly.Extensions.Http.NetStandard20.Specs.csproj @@ -0,0 +1,33 @@ + + + false + Library + netcoreapp2.0 + library + + + full + TRACE;DEBUG;NETCOREAPP2_0 + + + pdbonly + true + TRACE;RELEASE;NETCOREAPP2_0 + + + + + + + + + + + Properties\GlobalAssemblyInfo.cs + + + + + + + diff --git a/src/Polly.Extensions.Http.NetStandard20.Specs/Properties/AssemblyInfo.cs b/src/Polly.Extensions.Http.NetStandard20.Specs/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..e76dbc8 --- /dev/null +++ b/src/Polly.Extensions.Http.NetStandard20.Specs/Properties/AssemblyInfo.cs @@ -0,0 +1 @@ +[assembly: Xunit.CollectionBehavior(DisableTestParallelization = false)] \ No newline at end of file diff --git a/src/Polly.Extensions.Http.NetStandard20/Polly.Extensions.Http.NetStandard20.csproj b/src/Polly.Extensions.Http.NetStandard20/Polly.Extensions.Http.NetStandard20.csproj new file mode 100644 index 0000000..2a79975 --- /dev/null +++ b/src/Polly.Extensions.Http.NetStandard20/Polly.Extensions.Http.NetStandard20.csproj @@ -0,0 +1,33 @@ + + + Polly.Extensions.Http + + TRACE;PORTABLE + en-US + false + true + Polly.Extensions.Http + netstandard2.0 + + + full + + + pdbonly + true + + + + False + + + + + Properties\GlobalAssemblyInfo.cs + + + + + + + \ No newline at end of file diff --git a/src/Polly.Extensions.Http.NetStandard20/Properties/AssemblyInfo.cs b/src/Polly.Extensions.Http.NetStandard20/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4a3be2e --- /dev/null +++ b/src/Polly.Extensions.Http.NetStandard20/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +using System; +using System.Reflection; +using System.Runtime.CompilerServices; + +[assembly: AssemblyTitle("Polly.Extensions.Http")] +[assembly: AssemblyInformationalVersion("2.0.0.0")] +[assembly: AssemblyFileVersion("2.0.0.0")] +[assembly: AssemblyVersion("2.0.0.0")] +[assembly: CLSCompliant(true)] + +[assembly: InternalsVisibleTo("Polly.Extensions.Http.NetStandard20.Specs")] \ No newline at end of file diff --git a/src/Polly.Extensions.Http.nuspec b/src/Polly.Extensions.Http.nuspec index 2c10307..8818f68 100644 --- a/src/Polly.Extensions.Http.nuspec +++ b/src/Polly.Extensions.Http.nuspec @@ -16,6 +16,7 @@ 2.0.0-v2alpha --------------------- - Publish as strong-named package only (discontinue non-strong-named versions) + - Add .NetStandard 2.0 target 1.0.3 --------------------- @@ -43,6 +44,9 @@ + + + diff --git a/src/Polly.Extensions.Http.sln b/src/Polly.Extensions.Http.sln index b94ff73..412814c 100644 --- a/src/Polly.Extensions.Http.sln +++ b/src/Polly.Extensions.Http.sln @@ -17,6 +17,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly.Extensions.Http.NetSt EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Polly.Extensions.Http.NetStandard11.Specs", "Polly.Extensions.Http.NetStandard11.Specs\Polly.Extensions.Http.NetStandard11.Specs.csproj", "{615C92EC-5921-40F4-A690-C66B1587C08E}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Polly.Extensions.Http.NetStandard20", "Polly.Extensions.Http.NetStandard20\Polly.Extensions.Http.NetStandard20.csproj", "{D8108479-6F4B-45CB-9E49-D45D1DC18F10}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Polly.Extensions.Http.NetStandard20.Specs", "Polly.Extensions.Http.NetStandard20.Specs\Polly.Extensions.Http.NetStandard20.Specs.csproj", "{435D99EB-3689-4EA0-96FE-2FA17930322D}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution Polly.Extensions.Http.Shared\Polly.Extensions.Http.Shared.projitems*{23fa87f9-c77d-4c67-a0b0-2901de51b3ff}*SharedItemsImports = 13 @@ -36,6 +40,14 @@ Global {615C92EC-5921-40F4-A690-C66B1587C08E}.Debug|Any CPU.Build.0 = Debug|Any CPU {615C92EC-5921-40F4-A690-C66B1587C08E}.Release|Any CPU.ActiveCfg = Release|Any CPU {615C92EC-5921-40F4-A690-C66B1587C08E}.Release|Any CPU.Build.0 = Release|Any CPU + {D8108479-6F4B-45CB-9E49-D45D1DC18F10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D8108479-6F4B-45CB-9E49-D45D1DC18F10}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D8108479-6F4B-45CB-9E49-D45D1DC18F10}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D8108479-6F4B-45CB-9E49-D45D1DC18F10}.Release|Any CPU.Build.0 = Release|Any CPU + {435D99EB-3689-4EA0-96FE-2FA17930322D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {435D99EB-3689-4EA0-96FE-2FA17930322D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {435D99EB-3689-4EA0-96FE-2FA17930322D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {435D99EB-3689-4EA0-96FE-2FA17930322D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE