Skip to content

V11.0.0/double digits#157

Closed
gimlichael wants to merge 8 commits intomainfrom
v11.0.0/double-digits
Closed

V11.0.0/double digits#157
gimlichael wants to merge 8 commits intomainfrom
v11.0.0/double-digits

Conversation

@gimlichael
Copy link
Member

This pull request is a major update that moves the build, test, and benchmark matrix forward to .NET 11, removes .NET 9 support, and completes the split of foundational APIs into the Cuemon.Kernel assembly. It also updates central package management to use .NET 11 preview packages where applicable, and removes the compatibility bridge that previously forwarded kernel types from Cuemon.Core. The solution structure has been reorganized to group core libraries under a dedicated folder.

.NET 11 migration and build matrix update:

  • All projects, test, and benchmark definitions now target net11.0 in addition to net10.0, with net9.0 removed from all target framework lists (Directory.Build.props, AGENTS.md, src/*.csproj, CHANGELOG.md). (Ffe7db85L1R1, [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • CI pipeline and workflow steps updated to include .NET preview builds and tools, ensuring compatibility with .NET 11 (.github/workflows/ci-pipeline.yml). [1] [2] [3] [4] [5] [6]

Central package management and dependency updates:

  • Directory.Packages.props updated to use .NET 11 preview package versions for net11.0 and netstandard2.0, and to remove .NET 9-specific package groups.

Assembly boundary and solution structure changes:

  • Solution organization now groups Cuemon.Core and Cuemon.Kernel under /src/corelibs/, reflecting the completed kernel split (Cuemon.slnx). [1] [2]
  • All [TypeForwardedTo] attributes removed from Cuemon.Core, eliminating the compatibility bridge and requiring direct references to Cuemon.Kernel for foundational APIs (src/Cuemon.Core/Properties/AssemblyInfo.cs).

Codebase compatibility and conditional compilation updates:

  • Conditional compilation updated from NET9_0_OR_GREATER to NET10_0_OR_GREATER where appropriate, aligning with the new minimum supported .NET version (src/Cuemon.Core/Reflection/AssemblyContext.cs, AGENTS.md). [1] [2]

These changes collectively mark the transition to .NET 11, finalize the kernel split, and remove legacy compatibility shims.

@gimlichael gimlichael self-assigned this Mar 14, 2026
Copilot AI review requested due to automatic review settings March 14, 2026 03:57
@qodo-code-review
Copy link

Review Summary by Qodo

Upgrade to .NET 11 and complete Cuemon.Kernel assembly split

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Upgrade target frameworks to .NET 11 and remove .NET 9 support
• Remove TypeForwardedTo compatibility bridge from Cuemon.Core
• Move date and range primitives to Cuemon.Kernel assembly
• Update preprocessor directives from NET9_0_OR_GREATER to NET10_0_OR_GREATER
• Reorganize solution structure with dedicated corelibs folder
• Enable .NET preview SDK in CI pipeline and update package versions
Diagram
flowchart LR
  A["Target Frameworks<br/>net9.0 → net11.0"] --> B["Remove TypeForwardedTo<br/>from Cuemon.Core"]
  B --> C["Move Primitives<br/>to Cuemon.Kernel"]
  C --> D["Update Preprocessor<br/>Directives"]
  D --> E["Reorganize Solution<br/>Structure"]
  E --> F["Enable Preview SDK<br/>in CI"]
Loading

Grey Divider

File Changes

1. src/Cuemon.Core/Properties/AssemblyInfo.cs Breaking change +0/-80

Remove TypeForwardedTo compatibility shim

src/Cuemon.Core/Properties/AssemblyInfo.cs


2. src/Cuemon.Core/Reflection/AssemblyContext.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

src/Cuemon.Core/Reflection/AssemblyContext.cs


3. src/Cuemon.Core/Runtime/Dependency.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

src/Cuemon.Core/Runtime/Dependency.cs


View more (74)
4. src/Cuemon.Core/Runtime/FileWatcher.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

src/Cuemon.Core/Runtime/FileWatcher.cs


5. src/Cuemon.Core/Runtime/Watcher.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

src/Cuemon.Core/Runtime/Watcher.cs


6. src/Cuemon.Core/StringFactory.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

src/Cuemon.Core/StringFactory.cs


7. src/Cuemon.Data/DatabaseWatcher.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

src/Cuemon.Data/DatabaseWatcher.cs


8. src/Cuemon.Extensions.IO/StreamExtensions.cs ✨ Enhancement +2/-2

Update preprocessor directives to NET10_0_OR_GREATER

src/Cuemon.Extensions.IO/StreamExtensions.cs


9. src/Cuemon.Extensions.Net/Http/SlimHttpClientFactory.cs ✨ Enhancement +3/-3

Update preprocessor directives to NET10_0_OR_GREATER

src/Cuemon.Extensions.Net/Http/SlimHttpClientFactory.cs


10. src/Cuemon.Extensions.Runtime.Caching/CacheEnumerableExtensions.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

src/Cuemon.Extensions.Runtime.Caching/CacheEnumerableExtensions.cs


11. src/Cuemon.Extensions.Text.Json/Converters/StringEnumConverter.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

src/Cuemon.Extensions.Text.Json/Converters/StringEnumConverter.cs


12. src/Cuemon.Extensions.Text.Json/Converters/StringFlagsEnumConverter.cs ✨ Enhancement +2/-2

Update preprocessor directives to NET10_0_OR_GREATER

src/Cuemon.Extensions.Text.Json/Converters/StringFlagsEnumConverter.cs


13. src/Cuemon.Extensions.Text.Json/Formatters/JsonFormatter.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

src/Cuemon.Extensions.Text.Json/Formatters/JsonFormatter.cs


14. src/Cuemon.Extensions.Text.Json/Formatters/JsonFormatterOptions.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

src/Cuemon.Extensions.Text.Json/Formatters/JsonFormatterOptions.cs


15. src/Cuemon.IO/BufferWriterOptions.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

src/Cuemon.IO/BufferWriterOptions.cs


16. src/Cuemon.IO/Extensions/StreamDecoratorExtensions.cs ✨ Enhancement +3/-3

Update preprocessor directives to NET10_0_OR_GREATER

src/Cuemon.IO/Extensions/StreamDecoratorExtensions.cs


17. src/Cuemon.IO/StreamFactory.cs ✨ Enhancement +2/-2

Update preprocessor directives to NET10_0_OR_GREATER

src/Cuemon.IO/StreamFactory.cs


18. src/Cuemon.Kernel/Convertible.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

src/Cuemon.Kernel/Convertible.cs


19. src/Cuemon.Kernel/DateSpan.cs ✨ Enhancement +3/-4

Remove FowlerNollVo64 dependency and use constants

src/Cuemon.Kernel/DateSpan.cs


20. src/Cuemon.Kernel/DateTimeRange.cs Formatting +2/-2

Fix file ending newline formatting

src/Cuemon.Kernel/DateTimeRange.cs


21. src/Cuemon.Kernel/Disposable.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

src/Cuemon.Kernel/Disposable.cs


22. src/Cuemon.Kernel/TimeRange.cs ✨ Enhancement +4/-7

Simplify constructor with optional duration parameter

src/Cuemon.Kernel/TimeRange.cs


23. src/Cuemon.Resilience/Transient.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

src/Cuemon.Resilience/Transient.cs


24. src/Cuemon.Xml/Serialization/Formatters/XmlFormatterOptions.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

src/Cuemon.Xml/Serialization/Formatters/XmlFormatterOptions.cs


25. test/Cuemon.Core.Tests/Assets/ClampOptions.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

test/Cuemon.Core.Tests/Assets/ClampOptions.cs


26. test/Cuemon.Core.Tests/Assets/UnmanagedDisposable.cs ✨ Enhancement +2/-2

Update preprocessor directives to NET10_0_OR_GREATER

test/Cuemon.Core.Tests/Assets/UnmanagedDisposable.cs


27. test/Cuemon.Core.Tests/Reflection/AssemblyContextOptionsTest.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

test/Cuemon.Core.Tests/Reflection/AssemblyContextOptionsTest.cs


28. test/Cuemon.Core.Tests/Text/ParserFactoryTest.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

test/Cuemon.Core.Tests/Text/ParserFactoryTest.cs


29. test/Cuemon.Extensions.DependencyInjection.Tests/ServiceCollectionExtensionsTest.cs ✨ Enhancement +2/-2

Update preprocessor directives to NET10_0_OR_GREATER

test/Cuemon.Extensions.DependencyInjection.Tests/ServiceCollectionExtensionsTest.cs


30. test/Cuemon.Extensions.Hosting.Tests/HostEnvironmentExtensionsTest.cs ✨ Enhancement +2/-2

Update preprocessor directives to NET10_0_OR_GREATER

test/Cuemon.Extensions.Hosting.Tests/HostEnvironmentExtensionsTest.cs


31. test/Cuemon.Extensions.IO.Tests/StreamExtensionsTest.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

test/Cuemon.Extensions.IO.Tests/StreamExtensionsTest.cs


32. test/Cuemon.Extensions.IO.Tests/TextReaderExtensionsTest.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

test/Cuemon.Extensions.IO.Tests/TextReaderExtensionsTest.cs


33. test/Cuemon.Extensions.Reflection.Tests/TypeExtensionsTest.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

test/Cuemon.Extensions.Reflection.Tests/TypeExtensionsTest.cs


34. test/Cuemon.Extensions.Threading.Tests/Tasks/TaskExtensionsTest.cs ✨ Enhancement +4/-4

Update preprocessor directives to NET10_0_OR_GREATER

test/Cuemon.Extensions.Threading.Tests/Tasks/TaskExtensionsTest.cs


35. test/Cuemon.IO.Tests/StreamDecoratorExtensionsTest.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

test/Cuemon.IO.Tests/StreamDecoratorExtensionsTest.cs


36. test/Cuemon.Kernel.Tests/DateSpanTest.cs 🧪 Tests +249/-3

Add comprehensive DateSpan test coverage

test/Cuemon.Kernel.Tests/DateSpanTest.cs


37. test/Cuemon.Kernel.Tests/RangeTest.cs 🧪 Tests +104/-0

Add new Range and TimeRange test suite

test/Cuemon.Kernel.Tests/RangeTest.cs


38. test/Cuemon.Security.Cryptography.Tests/UnkeyedHashFactoryTest.cs ✨ Enhancement +1/-1

Update preprocessor directive to NET10_0_OR_GREATER

test/Cuemon.Security.Cryptography.Tests/UnkeyedHashFactoryTest.cs


39. .github/workflows/ci-pipeline.yml ⚙️ Configuration changes +7/-1

Enable preview SDK in CI pipeline workflows

.github/workflows/ci-pipeline.yml


40. AGENTS.md 📝 Documentation +4/-4

Update toolchain documentation for .NET 11

AGENTS.md


41. CHANGELOG.md 📝 Documentation +23/-0

Add 11.0.0 release notes with breaking changes

CHANGELOG.md


42. Cuemon.slnx ⚙️ Configuration changes +4/-2

Reorganize solution with corelibs folder

Cuemon.slnx


43. Directory.Build.props ⚙️ Configuration changes +4/-4

Update target frameworks to include net11.0

Directory.Build.props


44. Directory.Packages.props Dependencies +17/-17

Update package versions for .NET 11 preview

Directory.Packages.props


45. src/Cuemon.AspNetCore.App/Cuemon.AspNetCore.App.csproj ⚙️ Configuration changes +1/-1

Update target frameworks to net11.0

src/Cuemon.AspNetCore.App/Cuemon.AspNetCore.App.csproj


46. src/Cuemon.AspNetCore.Authentication/Cuemon.AspNetCore.Authentication.csproj ⚙️ Configuration changes +1/-1

Update target frameworks to net11.0

src/Cuemon.AspNetCore.Authentication/Cuemon.AspNetCore.Authentication.csproj


47. src/Cuemon.AspNetCore.Mvc/Cuemon.AspNetCore.Mvc.csproj ⚙️ Configuration changes +1/-1

Update target frameworks to net11.0

src/Cuemon.AspNetCore.Mvc/Cuemon.AspNetCore.Mvc.csproj


48. src/Cuemon.AspNetCore.Razor.TagHelpers/Cuemon.AspNetCore.Razor.TagHelpers.csproj ⚙️ Configuration changes +1/-1

Update target frameworks to net11.0

src/Cuemon.AspNetCore.Razor.TagHelpers/Cuemon.AspNetCore.Razor.TagHelpers.csproj


49. src/Cuemon.AspNetCore/Cuemon.AspNetCore.csproj ⚙️ Configuration changes +1/-1

Update target frameworks to net11.0

src/Cuemon.AspNetCore/Cuemon.AspNetCore.csproj


50. src/Cuemon.Extensions.AspNetCore.Authentication/Cuemon.Extensions.AspNetCore.Authentication.csproj ⚙️ Configuration changes +1/-1

Update target frameworks to net11.0

src/Cuemon.Extensions.AspNetCore.Authentication/Cuemon.Extensions.AspNetCore.Authentication.csproj


51. src/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.csproj ⚙️ Configuration changes +1/-1

Update target frameworks to net11.0

src/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.csproj


52. src/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.csproj ⚙️ Configuration changes +1/-1

Update target frameworks to net11.0

src/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.csproj


53. src/Cuemon.Extensions.AspNetCore.Mvc.RazorPages/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.csproj ⚙️ Configuration changes +1/-1

Update target frameworks to net11.0

src/Cuemon.Extensions.AspNetCore.Mvc.RazorPages/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.csproj


54. src/Cuemon.Extensions.AspNetCore.Mvc/Cuemon.Extensions.AspNetCore.Mvc.csproj ⚙️ Configuration changes +1/-1

Update target frameworks to net11.0

src/Cuemon.Extensions.AspNetCore.Mvc/Cuemon.Extensions.AspNetCore.Mvc.csproj


55. src/Cuemon.Extensions.AspNetCore.Text.Json/Cuemon.Extensions.AspNetCore.Text.Json.csproj ⚙️ Configuration changes +1/-1

Update target frameworks to net11.0

src/Cuemon.Extensions.AspNetCore.Text.Json/Cuemon.Extensions.AspNetCore.Text.Json.csproj


56. src/Cuemon.Extensions.AspNetCore.Xml/Cuemon.Extensions.AspNetCore.Xml.csproj ⚙️ Configuration changes +1/-1

Update target frameworks to net11.0

src/Cuemon.Extensions.AspNetCore.Xml/Cuemon.Extensions.AspNetCore.Xml.csproj


57. src/Cuemon.Extensions.AspNetCore/Cuemon.Extensions.AspNetCore.csproj ⚙️ Configuration changes +1/-1

Update target frameworks to net11.0

src/Cuemon.Extensions.AspNetCore/Cuemon.Extensions.AspNetCore.csproj


58. src/Cuemon.Extensions.IO/Cuemon.Extensions.IO.csproj ⚙️ Configuration changes +1/-1

Update target frameworks to net11.0

src/Cuemon.Extensions.IO/Cuemon.Extensions.IO.csproj


59. src/Cuemon.IO/Cuemon.IO.csproj ⚙️ Configuration changes +1/-1

Update target frameworks to net11.0

src/Cuemon.IO/Cuemon.IO.csproj


60. test/Cuemon.AspNetCore.Authentication.Tests/Cuemon.AspNetCore.Authentication.Tests.csproj ⚙️ Configuration changes +1/-1

Update target frameworks to net11.0

test/Cuemon.AspNetCore.Authentication.Tests/Cuemon.AspNetCore.Authentication.Tests.csproj


61. test/Cuemon.AspNetCore.FunctionalTests/Cuemon.AspNetCore.FunctionalTests.csproj ⚙️ Configuration changes +1/-1

Update target frameworks to net11.0

test/Cuemon.AspNetCore.FunctionalTests/Cuemon.AspNetCore.FunctionalTests.csproj


62. test/Cuemon.AspNetCore.Mvc.FunctionalTests/Cuemon.AspNetCore.Mvc.FunctionalTests.csproj ⚙️ Configuration changes +1/-1

Update target frameworks to net11.0

test/Cuemon.AspNetCore.Mvc.FunctionalTests/Cuemon.AspNetCore.Mvc.FunctionalTests.csproj


63. test/Cuemon.AspNetCore.Mvc.Tests/Cuemon.AspNetCore.Mvc.Tests.csproj ⚙️ Configuration changes +1/-1

Update target frameworks to net11.0

test/Cuemon.AspNetCore.Mvc.Tests/Cuemon.AspNetCore.Mvc.Tests.csproj


64. test/Cuemon.AspNetCore.Razor.TagHelpers.Tests/Cuemon.AspNetCore.Razor.TagHelpers.Tests.csproj ⚙️ Configuration changes +1/-1

Update target frameworks to net11.0

test/Cuemon.AspNetCore.Razor.TagHelpers.Tests/Cuemon.AspNetCore.Razor.TagHelpers.Tests.csproj


65. test/Cuemon.AspNetCore.Tests/Cuemon.AspNetCore.Tests.csproj ⚙️ Configuration changes +1/-1

Update target frameworks to net11.0

test/Cuemon.AspNetCore.Tests/Cuemon.AspNetCore.Tests.csproj


66. test/Cuemon.Extensions.AspNetCore.Authentication.Tests/Cuemon.Extensions.AspNetCore.Authentication.Tests.csproj 📦 Other +1/-1

Update target frameworks to net11.0

test/Cuemon.Extensions.AspNetCore.Authentication.Tests/Cuemon.Extensions.AspNetCore.Authentication.Tests.csproj


67. src/Cuemon.Kernel/Range.cs Additional files +0/-0

...

src/Cuemon.Kernel/Range.cs


68. src/Cuemon.Kernel/TimeUnit.cs Additional files +0/-0

...

src/Cuemon.Kernel/TimeUnit.cs


69. test/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.Tests/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.Tests.csproj Additional files +1/-1

...

test/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.Tests/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.Tests.csproj


70. test/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.Tests/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.Tests.csproj Additional files +1/-1

...

test/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.Tests/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.Tests.csproj


71. test/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.Tests/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.Tests.csproj Additional files +1/-1

...

test/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.Tests/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.Tests.csproj


72. test/Cuemon.Extensions.AspNetCore.Mvc.Tests/Cuemon.Extensions.AspNetCore.Mvc.Tests.csproj Additional files +1/-1

...

test/Cuemon.Extensions.AspNetCore.Mvc.Tests/Cuemon.Extensions.AspNetCore.Mvc.Tests.csproj


73. test/Cuemon.Extensions.AspNetCore.Tests/Cuemon.Extensions.AspNetCore.Tests.csproj Additional files +1/-1

...

test/Cuemon.Extensions.AspNetCore.Tests/Cuemon.Extensions.AspNetCore.Tests.csproj


74. test/Cuemon.Extensions.DependencyInjection.Tests/Cuemon.Extensions.DependencyInjection.Tests.csproj Additional files +1/-1

...

test/Cuemon.Extensions.DependencyInjection.Tests/Cuemon.Extensions.DependencyInjection.Tests.csproj


75. test/Cuemon.Extensions.Text.Json.Tests/Cuemon.Extensions.Text.Json.Tests.csproj Additional files +1/-1

...

test/Cuemon.Extensions.Text.Json.Tests/Cuemon.Extensions.Text.Json.Tests.csproj


76. test/Cuemon.Runtime.Caching.Tests/Cuemon.Runtime.Caching.Tests.csproj Additional files +1/-1

...

test/Cuemon.Runtime.Caching.Tests/Cuemon.Runtime.Caching.Tests.csproj


77. testenvironments.json Additional files +18/-18

...

testenvironments.json


Grey Divider

Qodo Logo

@qodo-code-review
Copy link

qodo-code-review bot commented Mar 14, 2026

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (1) 📎 Requirement gaps (0)

Grey Divider


Action required

1. New RangeTest uses block namespace 📘 Rule violation ✓ Correctness
Description
The new C# test file RangeTest.cs declares a block-scoped namespace (namespace Cuemon { ... })
instead of a file-scoped namespace. This violates the requirement that new C# files must use
file-scoped namespaces.
Code

test/Cuemon.Kernel.Tests/RangeTest.cs[R6-12]

+namespace Cuemon
+{
+    public class RangeTest : Test
+    {
+        public RangeTest(ITestOutputHelper output) : base(output)
+        {
+        }
Evidence
PR Compliance ID 91343 requires new C# files to use a single file-scoped namespace declaration
(namespace X;). The added RangeTest.cs uses a block-scoped namespace with braces, which is
explicitly listed as failure criteria.

Rule 91343: Use file-scoped namespaces in new C# files
test/Cuemon.Kernel.Tests/RangeTest.cs[6-12]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new C# file `test/Cuemon.Kernel.Tests/RangeTest.cs` uses a block-scoped namespace (`namespace Cuemon { ... }`) but new C# files must use file-scoped namespaces.

## Issue Context
This repository targets modern C# and the compliance checklist requires file-scoped namespaces for new/fully rewritten C# files.

## Fix Focus Areas
- test/Cuemon.Kernel.Tests/RangeTest.cs[6-104]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. TimeRange ctor binary break 🐞 Bug ⛯ Reliability
Description
TimeRange no longer provides a public .ctor(TimeSpan, TimeSpan); it was replaced with
.ctor(TimeSpan, TimeSpan, Func<TimeSpan>) using an optional parameter. Any existing compiled
consumer binaries calling the old 2-argument constructor will throw MissingMethodException at
runtime after upgrading.
Code

src/Cuemon.Kernel/TimeRange.cs[R16-18]

+        /// <param name="duration">A function delegate that returns the duration of the time range. If not provided, the duration is calculated as the difference between <paramref name="end"/> and <paramref name="start"/>.</param>
+        public TimeRange(TimeSpan start, TimeSpan end, Func<TimeSpan> duration = null) : base(start, end, duration ?? (() => end.Subtract(start)))
        {
Evidence
The current TimeRange implementation only defines a 3-parameter constructor (with an optional
duration), meaning the CLR-visible 2-parameter constructor signature is absent; optional
parameters do not preserve the old overload at the IL level.

src/Cuemon.Kernel/TimeRange.cs[11-19]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`TimeRange` removed the public 2-parameter constructor and replaced it with a 3-parameter constructor that uses an optional parameter. Optional parameters do **not** preserve the old constructor signature, so previously compiled consumers will fail at runtime.

### Issue Context
This is a public API in a library; even in a major release, this kind of break is easy to avoid while keeping the new functionality.

### Fix Focus Areas
- src/Cuemon.Kernel/TimeRange.cs[11-19]

### Suggested change
- Add back:
 - `public TimeRange(TimeSpan start, TimeSpan end) : this(start, end, null) { }`
- Keep the new capability via:
 - `public TimeRange(TimeSpan start, TimeSpan end, Func&lt;TimeSpan&gt; duration) : base(start, end, duration ?? (() =&gt; end.Subtract(start))) { }`
- Avoid an optional parameter on the public constructor to reduce future API traps (optional params are baked into call sites).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@gimlichael gimlichael closed this Mar 14, 2026
Comment on lines +6 to +12
namespace Cuemon
{
public class RangeTest : Test
{
public RangeTest(ITestOutputHelper output) : base(output)
{
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. New rangetest uses block namespace 📘 Rule violation ✓ Correctness

The new C# test file RangeTest.cs declares a block-scoped namespace (namespace Cuemon { ... })
instead of a file-scoped namespace. This violates the requirement that new C# files must use
file-scoped namespaces.
Agent Prompt
## Issue description
The new C# file `test/Cuemon.Kernel.Tests/RangeTest.cs` uses a block-scoped namespace (`namespace Cuemon { ... }`) but new C# files must use file-scoped namespaces.

## Issue Context
This repository targets modern C# and the compliance checklist requires file-scoped namespaces for new/fully rewritten C# files.

## Fix Focus Areas
- test/Cuemon.Kernel.Tests/RangeTest.cs[6-104]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +16 to 18
/// <param name="duration">A function delegate that returns the duration of the time range. If not provided, the duration is calculated as the difference between <paramref name="end"/> and <paramref name="start"/>.</param>
public TimeRange(TimeSpan start, TimeSpan end, Func<TimeSpan> duration = null) : base(start, end, duration ?? (() => end.Subtract(start)))
{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

2. Timerange ctor binary break 🐞 Bug ⛯ Reliability

TimeRange no longer provides a public .ctor(TimeSpan, TimeSpan); it was replaced with
.ctor(TimeSpan, TimeSpan, Func<TimeSpan>) using an optional parameter. Any existing compiled
consumer binaries calling the old 2-argument constructor will throw MissingMethodException at
runtime after upgrading.
Agent Prompt
### Issue description
`TimeRange` removed the public 2-parameter constructor and replaced it with a 3-parameter constructor that uses an optional parameter. Optional parameters do **not** preserve the old constructor signature, so previously compiled consumers will fail at runtime.

### Issue Context
This is a public API in a library; even in a major release, this kind of break is easy to avoid while keeping the new functionality.

### Fix Focus Areas
- src/Cuemon.Kernel/TimeRange.cs[11-19]

### Suggested change
- Add back:
  - `public TimeRange(TimeSpan start, TimeSpan end) : this(start, end, null) { }`
- Keep the new capability via:
  - `public TimeRange(TimeSpan start, TimeSpan end, Func<TimeSpan> duration) : base(start, end, duration ?? (() => end.Subtract(start))) { }`
- Avoid an optional parameter on the public constructor to reduce future API traps (optional params are baked into call sites).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates the solution forward to .NET 11 (adds net11.0, removes net9.0) while continuing the kernel split work by updating conditional compilation and dependencies, and adjusting CI/test environments accordingly.

Changes:

  • Updated build/test/benchmark TFMs across projects to include net11.0 and drop net9.0.
  • Updated conditional compilation guards from NET9_0_OR_GREATER to NET10_0_OR_GREATER and refreshed CI/test environment configurations for preview tooling.
  • Updated central package versions (including preview packages) and expanded/added test coverage for range/date primitives.

Reviewed changes

Copilot reviewed 75 out of 77 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
testenvironments.json Drops net9 Docker runner; adds net11 runner and re-formats JSON.
test/Cuemon.Security.Cryptography.Tests/UnkeyedHashFactoryTest.cs Updates TFM guard to NET10_0_OR_GREATER.
test/Cuemon.Runtime.Caching.Tests/Cuemon.Runtime.Caching.Tests.csproj Updates test TFMs to net11.0;net10.0.
test/Cuemon.Kernel.Tests/RangeTest.cs Adds new tests for Range<>, DateTimeRange, and TimeRange.
test/Cuemon.IO.Tests/StreamDecoratorExtensionsTest.cs Updates TFM guard to NET10_0_OR_GREATER.
test/Cuemon.Extensions.Threading.Tests/Tasks/TaskExtensionsTest.cs Updates TFM guards to NET10_0_OR_GREATER.
test/Cuemon.Extensions.Text.Json.Tests/Cuemon.Extensions.Text.Json.Tests.csproj Updates test TFMs to net11.0;net10.0.
test/Cuemon.Extensions.Reflection.Tests/TypeExtensionsTest.cs Updates TFM guard to NET10_0_OR_GREATER.
test/Cuemon.Extensions.IO.Tests/TextReaderExtensionsTest.cs Updates TFM guard to NET10_0_OR_GREATER.
test/Cuemon.Extensions.IO.Tests/StreamExtensionsTest.cs Updates TFM guard to NET10_0_OR_GREATER.
test/Cuemon.Extensions.Hosting.Tests/HostEnvironmentExtensionsTest.cs Updates TFM guards to NET10_0_OR_GREATER.
test/Cuemon.Extensions.DependencyInjection.Tests/ServiceCollectionExtensionsTest.cs Updates TFM guards to NET10_0_OR_GREATER.
test/Cuemon.Extensions.DependencyInjection.Tests/Cuemon.Extensions.DependencyInjection.Tests.csproj Updates conditional ItemGroup to include net10/net11 instead of net9/net10.
test/Cuemon.Extensions.AspNetCore.Tests/Cuemon.Extensions.AspNetCore.Tests.csproj Updates test TFMs to net11.0;net10.0.
test/Cuemon.Extensions.AspNetCore.Mvc.Tests/Cuemon.Extensions.AspNetCore.Mvc.Tests.csproj Updates test TFMs to net11.0;net10.0.
test/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.Tests/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.Tests.csproj Updates test TFMs to net11.0;net10.0.
test/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.Tests/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.Tests.csproj Updates test TFMs to net11.0;net10.0.
test/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.Tests/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.Tests.csproj Updates test TFMs to net11.0;net10.0.
test/Cuemon.Extensions.AspNetCore.Authentication.Tests/Cuemon.Extensions.AspNetCore.Authentication.Tests.csproj Updates test TFMs to net11.0;net10.0.
test/Cuemon.Core.Tests/Text/ParserFactoryTest.cs Updates TFM guard to NET10_0_OR_GREATER.
test/Cuemon.Core.Tests/Reflection/AssemblyContextOptionsTest.cs Updates TFM guard to NET10_0_OR_GREATER.
test/Cuemon.Core.Tests/DateSpanTest.cs Adds extensive new DateSpan tests and alters existing test data setup.
test/Cuemon.Core.Tests/Assets/UnmanagedDisposable.cs Updates TFM guards to NET10_0_OR_GREATER.
test/Cuemon.Core.Tests/Assets/ClampOptions.cs Updates TFM guard to NET10_0_OR_GREATER.
test/Cuemon.AspNetCore.Tests/Cuemon.AspNetCore.Tests.csproj Updates test TFMs to net11.0;net10.0.
test/Cuemon.AspNetCore.Razor.TagHelpers.Tests/Cuemon.AspNetCore.Razor.TagHelpers.Tests.csproj Updates test TFMs to net11.0;net10.0.
test/Cuemon.AspNetCore.Mvc.Tests/Cuemon.AspNetCore.Mvc.Tests.csproj Updates test TFMs to net11.0;net10.0.
test/Cuemon.AspNetCore.Mvc.FunctionalTests/Cuemon.AspNetCore.Mvc.FunctionalTests.csproj Updates test TFMs to net11.0;net10.0.
test/Cuemon.AspNetCore.FunctionalTests/Cuemon.AspNetCore.FunctionalTests.csproj Updates test TFMs to net11.0;net10.0.
test/Cuemon.AspNetCore.Authentication.Tests/Cuemon.AspNetCore.Authentication.Tests.csproj Updates test TFMs to net11.0;net10.0.
src/Cuemon.Xml/Serialization/Formatters/XmlFormatterOptions.cs Updates lock implementation guard to NET10_0_OR_GREATER.
src/Cuemon.Resilience/Transient.cs Updates lock implementation guard to NET10_0_OR_GREATER.
src/Cuemon.Kernel/Disposable.cs Updates lock implementation guard to NET10_0_OR_GREATER.
src/Cuemon.Kernel/Convertible.cs Updates conditional compilation to NET10_0_OR_GREATER.
src/Cuemon.IO/StreamFactory.cs Updates conditional compilation to NET10_0_OR_GREATER.
src/Cuemon.IO/Extensions/StreamDecoratorExtensions.cs Updates conditional compilation to NET10_0_OR_GREATER.
src/Cuemon.IO/Cuemon.IO.csproj Adds net11.0 to TFMs and removes net9.0.
src/Cuemon.IO/BufferWriterOptions.cs Updates conditional compilation to NET10_0_OR_GREATER.
src/Cuemon.Extensions.Text.Json/Formatters/JsonFormatterOptions.cs Updates lock implementation guard to NET10_0_OR_GREATER.
src/Cuemon.Extensions.Text.Json/Formatters/JsonFormatter.cs Updates conditional compilation to NET10_0_OR_GREATER.
src/Cuemon.Extensions.Text.Json/Converters/StringFlagsEnumConverter.cs Updates conditional compilation to NET10_0_OR_GREATER.
src/Cuemon.Extensions.Text.Json/Converters/StringEnumConverter.cs Updates conditional compilation to NET10_0_OR_GREATER.
src/Cuemon.Extensions.Runtime.Caching/CacheEnumerableExtensions.cs Updates lock implementation guard to NET10_0_OR_GREATER.
src/Cuemon.Extensions.Net/Http/SlimHttpClientFactory.cs Updates conditional compilation to NET10_0_OR_GREATER.
src/Cuemon.Extensions.IO/StreamExtensions.cs Updates conditional compilation to NET10_0_OR_GREATER.
src/Cuemon.Extensions.IO/Cuemon.Extensions.IO.csproj Adds net11.0 to TFMs and removes net9.0.
src/Cuemon.Extensions.AspNetCore/Cuemon.Extensions.AspNetCore.csproj Adds net11.0 to TFMs and removes net9.0.
src/Cuemon.Extensions.AspNetCore.Xml/Cuemon.Extensions.AspNetCore.Xml.csproj Adds net11.0 to TFMs and removes net9.0.
src/Cuemon.Extensions.AspNetCore.Text.Json/Cuemon.Extensions.AspNetCore.Text.Json.csproj Adds net11.0 to TFMs and removes net9.0.
src/Cuemon.Extensions.AspNetCore.Mvc/Cuemon.Extensions.AspNetCore.Mvc.csproj Adds net11.0 to TFMs and removes net9.0.
src/Cuemon.Extensions.AspNetCore.Mvc.RazorPages/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.csproj Adds net11.0 to TFMs and removes net9.0.
src/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.csproj Adds net11.0 to TFMs and removes net9.0.
src/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.csproj Adds net11.0 to TFMs and removes net9.0.
src/Cuemon.Extensions.AspNetCore.Authentication/Cuemon.Extensions.AspNetCore.Authentication.csproj Adds net11.0 to TFMs and removes net9.0.
src/Cuemon.Data/DatabaseWatcher.cs Updates lock implementation guard to NET10_0_OR_GREATER.
src/Cuemon.Core/TimeRange.cs Changes TimeRange constructor signature to allow optional duration resolver.
src/Cuemon.Core/StringFactory.cs Updates conditional compilation to NET10_0_OR_GREATER.
src/Cuemon.Core/Runtime/Watcher.cs Updates lock implementation guard to NET10_0_OR_GREATER.
src/Cuemon.Core/Runtime/FileWatcher.cs Updates lock implementation guard to NET10_0_OR_GREATER.
src/Cuemon.Core/Runtime/Dependency.cs Updates lock implementation guard to NET10_0_OR_GREATER.
src/Cuemon.Core/Reflection/AssemblyContext.cs Updates conditional compilation to NET10_0_OR_GREATER.
src/Cuemon.Core/Properties/AssemblyInfo.cs Removes [TypeForwardedTo] compatibility bridge and related imports.
src/Cuemon.Core/DateTimeRange.cs Formatting/BOM update while keeping type in Cuemon.Core.
src/Cuemon.Core/DateSpan.cs Replaces FNV constants with literals and removes a dependency import.
src/Cuemon.AspNetCore/Cuemon.AspNetCore.csproj Adds net11.0 to TFMs and removes net9.0.
src/Cuemon.AspNetCore.Razor.TagHelpers/Cuemon.AspNetCore.Razor.TagHelpers.csproj Adds net11.0 to TFMs and removes net9.0.
src/Cuemon.AspNetCore.Mvc/Cuemon.AspNetCore.Mvc.csproj Adds net11.0 to TFMs and removes net9.0.
src/Cuemon.AspNetCore.Authentication/Cuemon.AspNetCore.Authentication.csproj Adds net11.0 to TFMs and removes net9.0.
src/Cuemon.AspNetCore.App/Cuemon.AspNetCore.App.csproj Adds net11.0 to TFMs and removes net9.0.
Directory.Packages.props Updates central package versions (including preview lines) and conditions.
Directory.Build.props Updates default TFMs to include net11.0 and remove net9.0.
Cuemon.slnx Re-organizes solution structure under /src/corelibs/.
CHANGELOG.md Adds 11.0.0 release notes describing .NET 11 and kernel split changes.
AGENTS.md Updates documented TFMs and conditional compilation guidance.
.github/workflows/ci-pipeline.yml Enables preview .NET usage across CI jobs/steps.

Comment on lines +44 to 53
<ItemGroup Condition="$(TargetFramework.StartsWith('net11')) OR $(TargetFramework.StartsWith('netstandard2'))">
<PackageVersion Include="Microsoft.Data.Sqlite" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="11.0.0-preview.2.26159.112" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('net10')) OR $(TargetFramework.StartsWith('net11'))">
<PackageVersion Include="Microsoft.Data.SqlClient" Version="7.0.0-preview4.26064.3" />
</ItemGroup>
Comment on lines +20 to +23
- Solution, source, test, and benchmark target frameworks now include `net11.0`; `net9.0` has been removed from the supported matrix.
- Central package management was updated to align `net11.0` and `netstandard2.0` builds with .NET 11 preview package versions, while `net10.0` remains on the .NET 10 package line where applicable.
- `DateSpan`, `DateTimeRange`, `Range`, `TimeRange`, and `TimeUnit` source files now live in `Cuemon.Kernel` as part of the completed kernel split.
- `BufferWriterOptions` was updated to follow the new `NET10_0_OR_GREATER` conditional path.
Validator.ThrowIfNull(value);
#if NET9_0_OR_GREATER
#if NET10_0_OR_GREATER
return Convert.ToHexString(value).Replace("-", "").ToLowerInvariant();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants