diff --git a/.github/workflows/publish-beta.yml b/.github/workflows/publish-beta.yml index 82cbe1b..f7e8193 100644 --- a/.github/workflows/publish-beta.yml +++ b/.github/workflows/publish-beta.yml @@ -14,11 +14,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Setup .NET - uses: actions/setup-dotnet@v2 + - uses: actions/checkout@v4 + - name: Setup dotNET + uses: actions/setup-dotnet@v4 with: - dotnet-version: 6.0.x + dotnet-version: 9.x - name: Restore run: | dotnet restore NewLife.Meter/NewLife.HttpMeter.csproj diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d48e28a..3cb09d4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,11 +11,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Setup .NET - uses: actions/setup-dotnet@v2 + - uses: actions/checkout@v4 + - name: Setup dotNET + uses: actions/setup-dotnet@v4 with: - dotnet-version: 6.0.x + dotnet-version: 9.x - name: Restore run: | dotnet restore NewLife.Meter/NewLife.HttpMeter.csproj diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 260b6e5..e2150e5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,11 +13,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Setup .NET - uses: actions/setup-dotnet@v2 + - uses: actions/checkout@v4 + - name: Setup dotNET + uses: actions/setup-dotnet@v4 with: - dotnet-version: 6.0.x + dotnet-version: 9.x - name: Build run: | dotnet build -c Release diff --git a/HttpMeter/HttpMeter.csproj b/HttpMeter/HttpMeter.csproj index 34e7c6b..eb5c1df 100644 --- a/HttpMeter/HttpMeter.csproj +++ b/HttpMeter/HttpMeter.csproj @@ -2,12 +2,12 @@ Exe - net7.0 + net8.0 Http压力测试 Http压力测试工具 新生命开发团队 - ©2002-2022 NewLife - 1.1 + ©2002-2024 NewLife + 1.2 $([System.DateTime]::Now.ToString(`yyyy.MMdd`)) $(VersionPrefix).$(VersionSuffix) $(Version) diff --git a/NewLife.Meter/MeterWorker.cs b/NewLife.Meter/MeterWorker.cs index 78207a2..df37d7b 100644 --- a/NewLife.Meter/MeterWorker.cs +++ b/NewLife.Meter/MeterWorker.cs @@ -1,8 +1,12 @@ using System.Diagnostics; +using System.Net.Http; using System.Net.Http.Headers; using System.Text; using NewLife.Http; using NewLife.Log; +#if !NET45 +using TaskEx = System.Threading.Tasks.Task; +#endif namespace NewLife.HttpMeter; @@ -107,7 +111,7 @@ protected virtual Task InitAsync() _content = File.ReadAllText(cfg.File.GetFullPath()); } - return Task.CompletedTask; + return TaskEx.CompletedTask; } /// 处理单次请求 diff --git a/NewLife.Meter/NewLife.HttpMeter.csproj b/NewLife.Meter/NewLife.HttpMeter.csproj index ff04576..1a40c70 100644 --- a/NewLife.Meter/NewLife.HttpMeter.csproj +++ b/NewLife.Meter/NewLife.HttpMeter.csproj @@ -1,11 +1,11 @@  - net461;netstandard2.0;netstandard2.1 + net45;net461;netstandard2.0;netstandard2.1 Http压力测试组件 高性能Http压力测试套装 新生命开发团队 - ©2002-2022 新生命开发团队 - 1.1 + ©2002-2024 新生命开发团队 + 1.2 $([System.DateTime]::Now.ToString(`yyyy.MMdd`)) $(VersionPrefix).$(VersionSuffix) $(Version) @@ -36,14 +36,14 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/XUnitTest/XUnitTest.csproj b/XUnitTest/XUnitTest.csproj index 2c0ccff..d340a88 100644 --- a/XUnitTest/XUnitTest.csproj +++ b/XUnitTest/XUnitTest.csproj @@ -1,19 +1,19 @@  - net7.0 + net8.0 ..\Bin\UnitTest false - - - - - - + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive