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
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ jobs:

- uses: actions/setup-dotnet@v6
with:
dotnet-version: '10.x'
dotnet-version: |
10.x
11.x

- name: Restore workloads
run: dotnet workload restore DSoft.Messaging/DSoft.MessageBus.csproj
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ jobs:

- uses: actions/setup-dotnet@v6
with:
dotnet-version: '10.x'
dotnet-version: |
10.x
11.x

- name: Version
id: version
Expand Down
6 changes: 3 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ DSoft.MessageBus is a cross-platform EventBus/messaging library (like `NSNotific

## Build & Test

Solution file is `MessageBus.slnx` (new XML solution format — requires recent .NET 10 SDK / VS).
Solution file is `MessageBus.slnx` (new XML solution format — requires recent .NET 11 SDK / VS).

```bash
dotnet restore MessageBus.slnx
dotnet build MessageBus.slnx --configuration Release
dotnet test UnitTest/UnitTest.csproj # tests target net10.0, MSTest
dotnet test UnitTest/UnitTest.csproj # tests target net10.0 and net11.0, MSTest
dotnet test UnitTest/UnitTest.csproj --filter "FullyQualifiedName~MessageBusTest.MethodName" # single test
```

Expand Down Expand Up @@ -41,7 +41,7 @@ Both routes hit the same `MessageBusService` logic.
### Platform-specific compilation
`DSoft.Messaging` uses **filename-suffix conventions** instead of one file per TFM — the `.csproj` includes files by suffix via `EnableDefaultCompileItems=false`:
- `*.shared.cs` — all targets
- `*.netstandard.cs` — netstandard/net8/net10/net472
- `*.netstandard.cs` — netstandard/net8/net10/net11/net472
- `*.wpf.cs` (windows7.0), `*.winui.cs` (windows10), `*.android.cs`, `*.ios.cs` (ios+maccatalyst), `*.mac.cs` (macos), `*.tvos.cs`

`ThreadControl` is the main example: `ThreadControl.shared.cs` defines the public API and calls `partial` members (`PlatformIsMainThread`, `PlatformBeginInvokeOnMainThread`) implemented per platform. When adding platform-specific code, add a new `*.<platform>.cs` partial rather than `#if`. (ThreadControl's `MainThread` logic is adapted from Xamarin.Essentials.)
Expand Down
18 changes: 10 additions & 8 deletions DSoft.Messaging/DSoft.MessageBus.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.1;net8.0;net10.0;net10.0-ios;net10.0-macos;net10.0-maccatalyst;net10.0-tvos;net10.0-android;</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net472;net8.0-windows7.0;net10.0-windows7.0;net10.0-windows10.0.19041;</TargetFrameworks>
<TargetFrameworks>netstandard2.1;net8.0;net10.0;net11.0;net10.0-ios;net11.0-ios;net10.0-macos;net11.0-macos;net10.0-maccatalyst;net11.0-maccatalyst;net10.0-tvos;net11.0-tvos;net10.0-android;net11.0-android;</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net472;net8.0-windows7.0;net10.0-windows7.0;net11.0-windows7.0;net10.0-windows10.0.19041;net11.0-windows10.0.19041;</TargetFrameworks>
<PackageId>DSoft.MessageBus</PackageId>
<AssemblyName>DSoft.MessageBus</AssemblyName>
<Company>DSoft Developments</Company>
Expand All @@ -21,12 +21,13 @@
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net11.0-android'">24.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'macos'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tvos'">14.0</SupportedOSPlatformVersion>
<NoWarn>$(NoWarn);NETSDK1206;CA1416;</NoWarn>
<PackageReleaseNotes>Updated to .NET 10 and latest dependencies
Removed .NET 9 targets (.NET 8 and .NET 10 LTS remain supported)
<PackageReleaseNotes>Added .NET 11 targets alongside .NET 10 and updated dependencies
.NET 8 and .NET 10 LTS remain supported
</PackageReleaseNotes>
</PropertyGroup>

Expand Down Expand Up @@ -59,7 +60,7 @@
<Compile Include="**\*.shared.*.cs" />
</ItemGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) Or $(TargetFramework) == 'net8.0' Or $(TargetFramework) == 'net10.0' Or $(TargetFramework) == 'net472'">
<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) Or $(TargetFramework) == 'net8.0' Or $(TargetFramework) == 'net10.0' Or $(TargetFramework) == 'net11.0' Or $(TargetFramework) == 'net472'">
<Compile Include="**\*.netstandard.cs" />
<Compile Include="**\*.netstandard.*.cs" />
</ItemGroup>
Expand All @@ -70,8 +71,8 @@
</ItemGroup>

<ItemGroup Condition=" $(TargetFramework.Contains('windows10')) ">
<PackageReference Include="Microsoft.WindowsAppSDK" Version="2.5.1" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.28000.2705" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="2.6.5" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.28000.2957" />

<Compile Include="**\*.winui.cs" />
<Compile Include="**\*.winui.*.cs" />
Expand Down Expand Up @@ -99,7 +100,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.12" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="11.0.0" Condition=" $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net10.0')) " />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.15" Condition=" !$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net10.0')) " />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ MessageBus is a cross platform EventBus system similar to `NSNoticationCenter` o
# Features

* Cross-platform
* .NETStandard 2.1, .NET Framework 4.7.2, .NET 8 and .NET 10 including iOS, tvOS, Android, Mac Catalyst, macOS and Windows with support for WPF and WinUI
* .NETStandard 2.1, .NET Framework 4.7.2, .NET 8, .NET 10 and .NET 11 including iOS, tvOS, Android, Mac Catalyst, macOS and Windows with support for WPF and WinUI
* Small footprint
* Simple API
* Create custom events to easily pass additional data
Expand Down
10 changes: 5 additions & 5 deletions UnitTest/UnitTest.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFrameworks>net10.0;net11.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<SignAssembly>False</SignAssembly>
Expand All @@ -15,10 +15,10 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" 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" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="11.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.12.0" />
<PackageReference Include="MSTest.TestAdapter" Version="4.5.3" />
<PackageReference Include="MSTest.TestFramework" Version="4.5.3" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions WPFSample/WPFSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net10.0-windows</TargetFramework>
<TargetFrameworks>net10.0-windows;net11.0-windows</TargetFrameworks>
<UseWPF>true</UseWPF>
<SignAssembly>False</SignAssembly>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="DSoft.System.Mvvm" Version="3.6.2606.131" />
<PackageReference Include="DSoft.System.Mvvm" Version="3.6.2610.1" />
</ItemGroup>

<ItemGroup>
Expand Down