Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
Add .Net Standard 2.0 target
Browse files Browse the repository at this point in the history
Adds .NetStandard 2.0 target, tests and packaging
  • Loading branch information
reisenberger committed May 3, 2018
1 parent ebd83bd commit 52407e7
Show file tree
Hide file tree
Showing 10 changed files with 98 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
1 change: 1 addition & 0 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ var snkFile = srcDir + File(keyName);

var projectToNugetFolderMap = new Dictionary<string, string[]>() {
{ "NetStandard11", new [] {"netstandard1.1"} },
{ "NetStandard20", new [] {"netstandard2.0"} },
};

// Gitversion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<DefaultLanguage>en-US</DefaultLanguage>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<RootNamespace>PolicyExtensions</RootNamespace>
<RootNamespace>Polly.Extensions.Http</RootNamespace>
<TargetFramework>netstandard1.1</TargetFramework>
<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputType>Library</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<OutputTypeEx>library</OutputTypeEx>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
<DefineConstants>TRACE;DEBUG;NETCOREAPP2_0</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE;RELEASE;NETCOREAPP2_0</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<PackageReference Include="Polly" Version="6.0.0-v6alpha0001" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Polly.Extensions.Http.NetStandard20\Polly.Extensions.Http.NetStandard20.csproj" />
</ItemGroup>
<Import Project="..\Polly.Extensions.Http.SharedSpecs\Polly.Extensions.Http.SharedSpecs.projitems" Label="Shared" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[assembly: Xunit.CollectionBehavior(DisableTestParallelization = false)]
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Polly.Extensions.Http</AssemblyName>
<AssemblyOriginatorKeyFile></AssemblyOriginatorKeyFile>
<DefineConstants>TRACE;PORTABLE</DefineConstants>
<DefaultLanguage>en-US</DefaultLanguage>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<RootNamespace>Polly.Extensions.Http</RootNamespace>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
</PropertyGroup>
<ItemGroup>
<NuSpecFile Include="$(SolutionDir)Polly.Extensions.Http.nuspec">
<Visible>False</Visible>
</NuSpecFile>
</ItemGroup>
<ItemGroup>
<Compile Include="..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Polly" Version="6.0.0-v6alpha0001" />
</ItemGroup>
<Import Project="..\Polly.Extensions.Http.Shared\Polly.Extensions.Http.Shared.projitems" Label="Shared" />
</Project>
11 changes: 11 additions & 0 deletions src/Polly.Extensions.Http.NetStandard20/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -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")]
4 changes: 4 additions & 0 deletions src/Polly.Extensions.Http.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
---------------------
Expand Down Expand Up @@ -43,6 +44,9 @@
<dependency id="Polly" version="6.0.0-v6alpha0001" />
<dependency id="NETStandard.Library" version="1.6.1" />
</group>
<group targetFramework="netstandard2.0">
<dependency id="Polly" version="6.0.0-v6alpha0001" />
</group>
</dependencies>
</metadata>
<files>
Expand Down
12 changes: 12 additions & 0 deletions src/Polly.Extensions.Http.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 52407e7

Please sign in to comment.