Skip to content

Commit

Permalink
Adding netcoreapp3.1 as a target framework (#509)
Browse files Browse the repository at this point in the history
* Adding netcoreapp3.0 and netcoreapp3.1 as a target framework

* Expanding NETSTANDARD check to include ASP.NET Core targets

* End of life netcoreapp3.0 changes and using NETCOREAPP3_1 instead of USE_ASPNETCORE where possible
  • Loading branch information
APIWT committed Sep 30, 2020
1 parent 2f5298b commit 942fc3a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/WireMock.Net.StandAlone/WireMock.Net.StandAlone.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Description>Lightweight StandAlone Http Mocking Server for .Net.</Description>
<AssemblyTitle>WireMock.Net.StandAlone</AssemblyTitle>
<Authors>Stef Heyenrath</Authors>
<TargetFrameworks>net451;net452;net46;net461;netstandard1.3;netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks>net451;net452;net46;net461;netstandard1.3;netstandard2.0;netstandard2.1;netcoreapp3.1</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>WireMock.Net.StandAlone</AssemblyName>
<PackageId>WireMock.Net.StandAlone</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion src/WireMock.Net/Http/HttpClientHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal static class HttpClientHelper
{
public static HttpClient CreateHttpClient(IProxyAndRecordSettings settings)
{
#if NETSTANDARD
#if NETSTANDARD || NETCOREAPP3_1
var handler = new HttpClientHandler
{
CheckCertificateRevocationList = false,
Expand Down
2 changes: 1 addition & 1 deletion src/WireMock.Net/Matchers/CSharpCodeMatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ private bool IsMatch(dynamic input, string pattern)
throw new WireMockException("CSharpCodeMatcher: Problem calling method 'IsMatch' in WireMock.CodeHelper", ex);
}

#elif (NETSTANDARD2_0 || NETSTANDARD2_1)
#elif (NETSTANDARD2_0 || NETSTANDARD2_1 || NETCOREAPP3_1)
dynamic script;
try
{
Expand Down
10 changes: 8 additions & 2 deletions src/WireMock.Net/WireMock.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Description>Lightweight Http Mocking Server for .Net, inspired by WireMock from the Java landscape.</Description>
<AssemblyTitle>WireMock.Net</AssemblyTitle>
<Authors>Stef Heyenrath</Authors>
<TargetFrameworks>net451;net452;net46;net461;netstandard1.3;netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks>net451;net452;net46;net461;netstandard1.3;netstandard2.0;netstandard2.1;netcoreapp3.1</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>WireMock.Net</AssemblyName>
<PackageId>WireMock.Net</PackageId>
Expand Down Expand Up @@ -42,7 +42,7 @@
<DefineConstants>NETSTANDARD;USE_ASPNETCORE</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1' or '$(TargetFramework)' == 'netcoreapp2.2'">
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1' or '$(TargetFramework)' == 'netcoreapp2.2' or '$(TargetFramework)' == 'netcoreapp3.1'">
<DefineConstants>USE_ASPNETCORE</DefineConstants>
</PropertyGroup>

Expand Down Expand Up @@ -135,6 +135,12 @@
<PackageReference Include="CS-Script.Core" Version="1.3.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<!-- https://github.com/WireMock-Net/WireMock.Net/issues/448 -->
<PackageReference Include="CS-Script.Core" Version="1.4.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj" />
</ItemGroup>
Expand Down

0 comments on commit 942fc3a

Please sign in to comment.