瀏覽代碼

新增 net5.0 支持

Roc 5 年之前
父節點
當前提交
9bdcba0307

+ 1 - 1
global.json

@@ -1,6 +1,6 @@
 {
   "sdk": {
-    "version": "3.1.403",
+    "version": "5.0.100",
     "rollForward": "latestMinor"
   }
 }

+ 1 - 1
samples/WebApplicationSample/WebApplicationSample.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk.Web">
 
   <PropertyGroup>
-    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <TargetFramework>net5.0</TargetFramework>
     <UserSecretsId>a59ca38e-9b52-44fe-b3d2-8cb5a1641623</UserSecretsId>
     <SignAssembly>false</SignAssembly>
   </PropertyGroup>

+ 3 - 3
src/Essensoft.AspNetCore.Payment.Alipay/AlipayNotifyClient.cs

@@ -19,7 +19,7 @@ namespace Essensoft.AspNetCore.Payment.Alipay
 
         #region IAlipayNotifyClient Members
 
-#if NETCOREAPP3_1
+#if NETCOREAPP3_1 || NET5_0
         public Task<T> ExecuteAsync<T>(Microsoft.AspNetCore.Http.HttpRequest request, AlipayOptions options) where T : AlipayNotify
         {
             if (options == null)
@@ -46,7 +46,7 @@ namespace Essensoft.AspNetCore.Payment.Alipay
 
         #region IAlipayNotifyClient Members
 
-#if NETCOREAPP3_1
+#if NETCOREAPP3_1 || NET5_0
         public Task<T> CertificateExecuteAsync<T>(Microsoft.AspNetCore.Http.HttpRequest request, AlipayOptions options) where T : AlipayNotify
         {
             return ExecuteAsync<T>(request, options);
@@ -57,7 +57,7 @@ namespace Essensoft.AspNetCore.Payment.Alipay
 
         #region IAlipayNotifyClient Members
 
-#if NETCOREAPP3_1
+#if NETCOREAPP3_1 || NET5_0
         public IDictionary<string, string> GetParameters(Microsoft.AspNetCore.Http.HttpRequest request)
         {
             var parameters = new Dictionary<string, string>();

+ 1 - 1
src/Essensoft.AspNetCore.Payment.Alipay/AlipayNotifyResult.cs

@@ -1,4 +1,4 @@
-#if NETCOREAPP3_1
+#if NETCOREAPP3_1 || NET5_0
 
 using Microsoft.AspNetCore.Mvc;
 

+ 4 - 4
src/Essensoft.AspNetCore.Payment.Alipay/Essensoft.AspNetCore.Payment.Alipay.csproj

@@ -1,17 +1,17 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>netstandard2.1;netcoreapp3.1</TargetFrameworks>
+    <TargetFrameworks>netstandard2.1;netcoreapp3.1;net5.0</TargetFrameworks>
     <PackageId>Essensoft.AspNetCore.Payment.Alipay</PackageId>
     <PackageTags>Essensoft;Payment;Alipay;支付宝</PackageTags>
   </PropertyGroup>
 
   <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
-    <PackageReference Include="System.Text.Json" Version="4.7.2" />
-    <PackageReference Include="Microsoft.Extensions.Http" Version="3.1.9" />
+    <PackageReference Include="System.Text.Json" Version="5.0.0" />
+    <PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0" />
   </ItemGroup>
 
-  <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
+  <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' OR '$(TargetFramework)' == 'net5.0'">
     <FrameworkReference Include="Microsoft.AspNetCore.App" />
   </ItemGroup>
 

+ 1 - 1
src/Essensoft.AspNetCore.Payment.Alipay/IAlipayNotifyClient.cs

@@ -8,7 +8,7 @@ namespace Essensoft.AspNetCore.Payment.Alipay
     /// </summary>
     public interface IAlipayNotifyClient
     {
-#if NETCOREAPP3_1
+#if NETCOREAPP3_1 || NET5_0
         /// <summary>
         /// 执行 Alipay 通知请求解析。
         /// </summary>

+ 1 - 1
src/Essensoft.AspNetCore.Payment.Security/Essensoft.AspNetCore.Payment.Security.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFramework>netstandard2.1</TargetFramework>
+    <TargetFrameworks>netstandard2.1;net5.0</TargetFrameworks>
     <PackageId>Essensoft.AspNetCore.Payment.Security</PackageId>
     <PackageTags>Essensoft;Payment;Security</PackageTags>
   </PropertyGroup>

+ 4 - 4
src/Essensoft.AspNetCore.Payment.WeChatPay/Essensoft.AspNetCore.Payment.WeChatPay.csproj

@@ -1,17 +1,17 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>netstandard2.1;netcoreapp3.1</TargetFrameworks>
+    <TargetFrameworks>netstandard2.1;netcoreapp3.1;net5.0</TargetFrameworks>
     <PackageId>Essensoft.AspNetCore.Payment.WeChatPay</PackageId>
     <PackageTags>Essensoft;Payment;WeChatPay;微信支付</PackageTags>
   </PropertyGroup>
 
   <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
-    <PackageReference Include="System.Text.Json" Version="4.7.2" />
-    <PackageReference Include="Microsoft.Extensions.Http" Version="3.1.9" />
+    <PackageReference Include="System.Text.Json" Version="5.0.0" />
+    <PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0" />
   </ItemGroup>
 
-  <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
+  <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' OR '$(TargetFramework)' == 'net5.0'">
     <FrameworkReference Include="Microsoft.AspNetCore.App" />
   </ItemGroup>
   

+ 1 - 1
src/Essensoft.AspNetCore.Payment.WeChatPay/V2/IWeChatPayNotifyClient.cs

@@ -7,7 +7,7 @@ namespace Essensoft.AspNetCore.Payment.WeChatPay.V2
     /// </summary>
     public interface IWeChatPayNotifyClient
     {
-#if NETCOREAPP3_1
+#if NETCOREAPP3_1 || NET5_0
         /// <summary>
         /// 执行 WeChatPay V2 通知请求解析
         /// </summary>

+ 1 - 1
src/Essensoft.AspNetCore.Payment.WeChatPay/V2/WeChatPayNotifyClient.cs

@@ -21,7 +21,7 @@ namespace Essensoft.AspNetCore.Payment.WeChatPay.V2
 
         #region IWeChatPayNotifyClient Members
 
-#if NETCOREAPP3_1
+#if NETCOREAPP3_1 || NET5_0
         public async Task<T> ExecuteAsync<T>(Microsoft.AspNetCore.Http.HttpRequest request, WeChatPayOptions options) where T : WeChatPayNotify
         {
             if (request == null)

+ 1 - 1
src/Essensoft.AspNetCore.Payment.WeChatPay/V2/WeChatPayNotifyResult.cs

@@ -1,4 +1,4 @@
-#if NETCOREAPP3_1
+#if NETCOREAPP3_1 || NET5_0
 
 using Microsoft.AspNetCore.Mvc;
 

+ 1 - 1
src/Essensoft.AspNetCore.Payment.WeChatPay/V3/IWeChatPayNotifyClient.cs

@@ -7,7 +7,7 @@ namespace Essensoft.AspNetCore.Payment.WeChatPay.V3
     /// </summary>
     public interface IWeChatPayNotifyClient
     {
-#if NETCOREAPP3_1
+#if NETCOREAPP3_1 || NET5_0
         /// <summary>
         /// 执行 WeChatPay V3 通知请求解析
         /// </summary>

+ 1 - 1
src/Essensoft.AspNetCore.Payment.WeChatPay/V3/WeChatPayNotifyClient.cs

@@ -27,7 +27,7 @@ namespace Essensoft.AspNetCore.Payment.WeChatPay.V3
 
         #region IWeChatPayNotifyClient Members
 
-#if NETCOREAPP3_1
+#if NETCOREAPP3_1 || NET5_0
         public async Task<T> ExecuteAsync<T>(Microsoft.AspNetCore.Http.HttpRequest request, WeChatPayOptions options) where T : WeChatPayNotify
         {
             if (options == null)

+ 1 - 1
src/Essensoft.AspNetCore.Payment.WeChatPay/V3/WeChatPayNotifyResult.cs

@@ -1,4 +1,4 @@
-#if NETCOREAPP3_1
+#if NETCOREAPP3_1 || NET5_0
 
 using Microsoft.AspNetCore.Mvc;
 

+ 1 - 1
tests/Essensoft.AspNetCore.Payment.Alipay.Tests/Essensoft.AspNetCore.Payment.Alipay.Tests.csproj

@@ -6,7 +6,7 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
+    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
     <PackageReference Include="xunit" Version="2.4.1" />
     <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
       <PrivateAssets>all</PrivateAssets>