From 942fc3a3859b48c9ffade54545f4c4ee7a07a86d Mon Sep 17 00:00:00 2001
From: Anthony Iacono <45397889+APIWT@users.noreply.github.com>
Date: Wed, 30 Sep 2020 12:11:32 -0400
Subject: [PATCH] Adding netcoreapp3.1 as a target framework (#509)
* 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
---
.../WireMock.Net.StandAlone.csproj | 2 +-
src/WireMock.Net/Http/HttpClientHelper.cs | 2 +-
src/WireMock.Net/Matchers/CSharpCodeMatcher.cs | 2 +-
src/WireMock.Net/WireMock.Net.csproj | 10 ++++++++--
4 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/WireMock.Net.StandAlone/WireMock.Net.StandAlone.csproj b/src/WireMock.Net.StandAlone/WireMock.Net.StandAlone.csproj
index 664a896d..daee0e5a 100644
--- a/src/WireMock.Net.StandAlone/WireMock.Net.StandAlone.csproj
+++ b/src/WireMock.Net.StandAlone/WireMock.Net.StandAlone.csproj
@@ -3,7 +3,7 @@
Lightweight StandAlone Http Mocking Server for .Net.
WireMock.Net.StandAlone
Stef Heyenrath
- net451;net452;net46;net461;netstandard1.3;netstandard2.0;netstandard2.1
+ net451;net452;net46;net461;netstandard1.3;netstandard2.0;netstandard2.1;netcoreapp3.1
true
WireMock.Net.StandAlone
WireMock.Net.StandAlone
diff --git a/src/WireMock.Net/Http/HttpClientHelper.cs b/src/WireMock.Net/Http/HttpClientHelper.cs
index b606bb60..1eb163e4 100644
--- a/src/WireMock.Net/Http/HttpClientHelper.cs
+++ b/src/WireMock.Net/Http/HttpClientHelper.cs
@@ -13,7 +13,7 @@ namespace WireMock.Http
{
public static HttpClient CreateHttpClient(IProxyAndRecordSettings settings)
{
-#if NETSTANDARD
+#if NETSTANDARD || NETCOREAPP3_1
var handler = new HttpClientHandler
{
CheckCertificateRevocationList = false,
diff --git a/src/WireMock.Net/Matchers/CSharpCodeMatcher.cs b/src/WireMock.Net/Matchers/CSharpCodeMatcher.cs
index 8be93248..8252abdb 100644
--- a/src/WireMock.Net/Matchers/CSharpCodeMatcher.cs
+++ b/src/WireMock.Net/Matchers/CSharpCodeMatcher.cs
@@ -151,7 +151,7 @@ namespace WireMock.Matchers
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
{
diff --git a/src/WireMock.Net/WireMock.Net.csproj b/src/WireMock.Net/WireMock.Net.csproj
index 7f4f0a8a..5f835b6e 100644
--- a/src/WireMock.Net/WireMock.Net.csproj
+++ b/src/WireMock.Net/WireMock.Net.csproj
@@ -3,7 +3,7 @@
Lightweight Http Mocking Server for .Net, inspired by WireMock from the Java landscape.
WireMock.Net
Stef Heyenrath
- net451;net452;net46;net461;netstandard1.3;netstandard2.0;netstandard2.1
+ net451;net452;net46;net461;netstandard1.3;netstandard2.0;netstandard2.1;netcoreapp3.1
true
WireMock.Net
WireMock.Net
@@ -42,7 +42,7 @@
NETSTANDARD;USE_ASPNETCORE
-
+
USE_ASPNETCORE
@@ -135,6 +135,12 @@
+
+
+
+
+
+