Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Build and test pull requests into master
# Build and test pull requests into master and Development
# (replaces azure-pipelines-mergetest.yml)
name: Build

on:
pull_request:
branches: [ master ]
branches: [ master, Development ]
workflow_dispatch:

env:
Expand All @@ -19,12 +19,14 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v7

- name: Install .NET SDK
uses: actions/setup-dotnet@v5
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
dotnet-version: |
10.x
11.x

- name: Restore packages
run: dotnet restore ${{ env.SOLUTION }}
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ jobs:
version: ${{ steps.version.outputs.version }}${{ env.RELEASE_SUFFIX }}

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v7

- name: Install .NET SDK
uses: actions/setup-dotnet@v5
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
dotnet-version: |
10.x
11.x

# Same scheme as the old Azure pipeline: {major}.{minor}.{yyMM}.{dd}{daily revision}
- name: Calculate version
Expand Down Expand Up @@ -117,9 +119,11 @@ jobs:
path: artifacts

- name: Install .NET SDK
uses: actions/setup-dotnet@v5
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
dotnet-version: |
10.x
11.x

- name: NuGet login (OIDC)
id: login
Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dotnet test UnitTester/UnitTester.csproj --filter "FullyQualifiedName~TestClassN

## Architecture

This is a multi-project .NET library (targets `net462`, `net9.0`, `net10.0`) providing base classes for consuming ASP.NET Core REST APIs and gRPC services. All library projects share build settings from `Directory.Build.props` (NuGet packaging, signing via `DSoft.snk`, SourceLink on Release).
This is a multi-project .NET library (targets `net462`, `net9.0`, `net10.0` and `net11.0`; build with the .NET 10 and .NET 11 SDKs) providing base classes for consuming ASP.NET Core REST APIs and gRPC services. All library projects share build settings from `Directory.Build.props` (NuGet packaging, signing via `DSoft.snk`, SourceLink on Release).

### Package Dependency Graph

Expand Down Expand Up @@ -74,7 +74,7 @@ All responses extend `ResponseBase` (`Success: bool`, `Message: string`). Concre

### Testing

Tests live in `UnitTester/` (MSTest, targets `net10.0`). Integration tests use `Microsoft.AspNetCore.Mvc.Testing` (`WebApplicationFactory`). The `SampleWebApp` project is the system under test; `SampleApiClient` contains the client implementation used in tests. Pass a custom `HttpMessageHandler` from the test factory into `RestApiClientOptions` or `GrpcClientOptions` to intercept HTTP traffic without a real server.
Tests live in `UnitTester/` (MSTest, targets `net10.0` and `net11.0`). Integration tests use `Microsoft.AspNetCore.Mvc.Testing` (`WebApplicationFactory`). The `SampleWebApp` project is the system under test; `SampleApiClient` contains the client implementation used in tests. Pass a custom `HttpMessageHandler` from the test factory into `RestApiClientOptions` or `GrpcClientOptions` to intercept HTTP traffic without a real server.

### Key Interfaces for Extension

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Options" Version="10.0.12" />
<PackageReference Include="System.Text.Json" Version="10.0.12" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net11.0' ">
<PackageReference Include="Microsoft.Extensions.Options" Version="11.0.0" />
<PackageReference Include="System.Text.Json" Version="11.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != 'net11.0' ">
<PackageReference Include="Microsoft.Extensions.Options" Version="10.0.12" />
<PackageReference Include="System.Text.Json" Version="10.0.12" />
</ItemGroup>


</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@
</None>
</ItemGroup>

<ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net11.0' ">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="11.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != 'net11.0' ">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.12" />
</ItemGroup>


<ItemGroup>
<ProjectReference Include="..\DSoft.Portable.WebClient.Grpc\DSoft.Portable.WebClient.Grpc.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@
<ItemGroup>
<PackageReference Include="Grpc.Net.Client" Version="2.84.0" />
<PackageReference Include="Grpc.Net.Client.Web" Version="2.84.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net11.0' ">
<PackageReference Include="Microsoft.Extensions.Options" Version="11.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != 'net11.0' ">
<PackageReference Include="Microsoft.Extensions.Options" Version="10.0.12" />
</ItemGroup>


</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@
<PackageReference Include="System.Text.Json" Version="10.0.12" />
</ItemGroup>

<ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net11.0' ">
<PackageReference Include="Microsoft.Extensions.Http" Version="11.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="11.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != 'net11.0' ">
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.12" />
<PackageReference Include="Microsoft.Extensions.Options" Version="10.0.12" />
</ItemGroup>


</Project>
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<TargetFrameworks>net462;net9.0;net10.0;</TargetFrameworks>
<TargetFrameworks>net462;net9.0;net10.0;net11.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
Expand Down Expand Up @@ -38,7 +38,7 @@
</PropertyGroup>

<ItemGroup Condition=" '$(Configuration)'=='Release'">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.401" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="11.0.100" PrivateAssets="All" />
</ItemGroup>

<PropertyGroup Condition="'$(TF_BUILD)' == 'true' Or '$(GITHUB_ACTIONS)' == 'true'">
Expand Down
13 changes: 9 additions & 4 deletions SampleApiClient/SampleApiClient.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net10.0</TargetFrameworks>
<TargetFrameworks>net10.0;net11.0</TargetFrameworks>
<SignAssembly>false</SignAssembly>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Options" Version="10.0.12" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net11.0' ">
<PackageReference Include="Microsoft.Extensions.Options" Version="11.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != 'net11.0' ">
<PackageReference Include="Microsoft.Extensions.Options" Version="10.0.12" />
</ItemGroup>


<ItemGroup>
<ProjectReference Include="..\RpcSample\RpcSample.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion SampleWebApp/SampleWebApp.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net10.0</TargetFrameworks>
<TargetFrameworks>net10.0;net11.0</TargetFrameworks>
<SignAssembly>false</SignAssembly>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
Expand Down
4 changes: 2 additions & 2 deletions TestHarness/TestHarness.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFrameworks>net10.0-windows</TargetFrameworks>
<TargetFrameworks>net10.0-windows;net11.0-windows</TargetFrameworks>
<UseWPF>true</UseWPF>
<SignAssembly>false</SignAssembly>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
Expand All @@ -21,7 +21,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="DSoft.System.Mvvm.Ui.Wpf" Version="3.6.2606.131" />
<PackageReference Include="DSoft.System.Mvvm.Ui.Wpf" Version="3.6.2611.2" />
</ItemGroup>

<ItemGroup>
Expand Down
12 changes: 10 additions & 2 deletions UnitTester/UnitTester.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net10.0</TargetFrameworks>
<TargetFrameworks>net10.0;net11.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<SignAssembly>false</SignAssembly>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
Expand All @@ -11,7 +11,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.12" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.10.1" />
<PackageReference Include="MSTest.TestAdapter" Version="4.4.1" />
<PackageReference Include="MSTest.TestFramework" Version="4.4.1" />
Expand All @@ -23,6 +22,15 @@
<PackageReference Include="NuGet.Protocol" Version="7.9.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net11.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="11.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != 'net11.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.12" />
</ItemGroup>


<ItemGroup>
<ProjectReference Include="..\DSoft.Portable.WebClient.Rest\DSoft.Portable.WebClient.Rest.csproj" />
<ProjectReference Include="..\SampleApiClient\SampleApiClient.csproj" />
Expand Down