Skip to content

Update test SDKs, tooling packages,#563

Merged
Daniel-Svensson merged 12 commits intoOpenRIAServices:mainfrom
Daniel-Svensson:feature/nuget_update
Apr 8, 2026
Merged

Update test SDKs, tooling packages,#563
Daniel-Svensson merged 12 commits intoOpenRIAServices:mainfrom
Daniel-Svensson:feature/nuget_update

Conversation

@Daniel-Svensson
Copy link
Copy Markdown
Member

@Daniel-Svensson Daniel-Svensson commented Apr 7, 2026

  • Fix runtime test failure on net472 when running with VS 2026
  • Update system.commandline to stable release for faster code generation
  • Upgraded Microsoft.NET.Test.Sdk to 18.4.0 across all test projects.

Summary by CodeRabbit

  • Chores
    • Updated test and build dependencies to newer compatible versions across projects.
  • Refactor
    • Simplified CLI wiring and argument handling for the code-generation tooling (behavior preserved).
  • Bug Fixes
    • Prevented unintended inheritance by sealing an internal logger.
  • Tests
    • Upgraded test SDK and coverage tooling versions used by test projects.

Upgraded Microsoft.NET.Test.Sdk to 18.4.0 across all test projects. Updated Microsoft.Build.Locator, System.CommandLine, coverlet.collector, and System.Management
@Daniel-Svensson Daniel-Svensson enabled auto-merge (squash) April 7, 2026 17:09
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Updated many test project NuGet versions (primarily Microsoft.NET.Test.Sdk 18.0.1 → 18.4.0), bumped selected build/test-related packages, removed two binder classes from the CodeGenTask, refactored CLI wiring in Program.cs, and marked one logger class as sealed.

Changes

Cohort / File(s) Summary
Test SDK bumps
src/OpenRiaServices.Client/Test/Client.External.Test/OpenRiaServices.Client.External.Test.csproj, src/OpenRiaServices.Client/Test/Client.Test/OpenRiaServices.Client.Test.csproj, src/OpenRiaServices.Client/Test/Client.Vb.Test/OpenRiaServices.Client.Vb.Test.csproj, src/OpenRiaServices.Hosting.AspNetCore/Test/OpenRiaServices.Hosting.AspNetCore.Test/OpenRiaServices.Hosting.AspNetCore.Test.csproj, src/OpenRiaServices.Hosting.Local/Test/OpenRiaServices.Hosting.Local.Test.csproj, src/OpenRiaServices.Hosting.Wcf.Endpoint/Test/OpenRiaServices.Hosting.Wcf.Endpoint.Test.csproj, src/OpenRiaServices.Hosting.Wcf/Test/OpenRiaServices.Hosting.Wcf.Test.csproj, src/OpenRiaServices.Server.Authentication.AspNetMembership/Test/OpenRiaServices.Server.Authentication.AspNetMembership.Test.csproj, src/OpenRiaServices.Server.UnitTesting/Test/OpenRiaServices.Server.UnitTesting.Test.csproj, src/OpenRiaServices.Server/Test/OpenRiaServices.Server.Test.csproj, src/Test/OpenRiaservices.EndToEnd.AspNetCore.Test/OpenRiaservices.EndToEnd.AspNetCore.Test.csproj, src/Test/OpenRiaservices.EndToEnd.Wcf.Test/OpenRiaservices.EndToEnd.Wcf.Test.csproj, src/VisualStudio/Tools/Test/OpenRiaServices.VisualStudio.DomainServices.Tools.Test.csproj
Updated Microsoft.NET.Test.Sdk from 18.0.118.4.0.
Coverlet + Test SDK
src/OpenRiaServices.Server.EntityFrameworkCore/Test/.../OpenRiaServices.Server.EntityFrameworkCore.Test.csproj
Updated Microsoft.NET.Test.Sdk (18.0.1 → 18.4.0) and coverlet.collector (6.0.2 → 8.0.1).
Build & metadata package updates
src/OpenRiaServices.Tools.TextTemplate/Test/OpenRiaServices.Tools.TextTemplate.Test.csproj, src/OpenRiaServices.Tools/Test/OpenRiaServices.Tools.Test.csproj
Bumped Microsoft.Build* packages to 17.11.48, System.Reflection.MetadataLoadContext 9.0.0 → 10.0.5, added System.Collections.Immutable 10.0.5, and Microsoft.NET.Test.Sdk → 18.4.0.
Tools.CodeGenTask package
src/OpenRiaServices.Tools.CodeGenTask/OpenRiaServices.Tools.CodeGenTask.csproj
Updated System.CommandLine from 2.0.0-beta4.22272.12.0.5.
CodeGenTask CLI refactor
src/OpenRiaServices.Tools.CodeGenTask/Program.cs
Rewrote CLI wiring to use rootCommand.SetAction(parseResult => ...), construct options directly from parseResult, removed reliance on binder classes and changed how generatedFileName option is handled.
Binder removals
src/OpenRiaServices.Tools.CodeGenTask/SharedCodeServiceParametersBinder.cs, src/OpenRiaServices.Tools.CodeGenTask/ClientCodeGenerationOptionsBinder.cs
Deleted both binder classes (removed BinderBase implementations that hydrated parameter/option objects from BindingContext).
Logger modifier
src/OpenRiaServices.Tools.CodeGenTask/ConsoleLogger.cs
Made ConsoleLogger sealed (was non-sealed).
Hosting project package cleanup
src/OpenRiaServices.Hosting.AspNetCore/Framework/OpenRiaServices.Hosting.AspNetCore.csproj
Removed conditional PackageReference to System.Collections.Immutable (8.0.0) for non-net8.0 targets.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through packages, nudged versions up high,
Binded no more, let the CLI fly.
A sealed little logger, a tidy project tree,
I nibbled old binders — now options are free. 🥕

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Update test SDKs, tooling packages' is incomplete and truncated. It lacks specificity about the actual changes (e.g., version numbers, scope) and does not fully capture the scope of work including CLI refactoring changes to Program.cs and removal of binder classes. Expand the title to be more descriptive and complete, such as: 'Update test SDKs and tooling packages, refactor CLI option binding' or 'Upgrade Microsoft.NET.Test.Sdk to 18.4.0 and refactor CLI binding'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/OpenRiaServices.Tools.CodeGenTask/Properties/launchSettings.json`:
- Around line 5-6: The committed launch profile contains machine-specific
absolute paths in the launchSettings.json keys "commandLineArgs" and
"workingDirectory"; replace these with portable values (remove the hardcoded
temp and user paths), e.g. clear commandLineArgs or use a relative path or
environment-variable placeholder, and change workingDirectory to a
project-relative token (or omit it) so the profile no longer contains a local
username or temp file path; alternatively remove the profile from source control
if it is only needed per-developer.

In
`@src/Test/Desktop/OpenRiaServices.Common.Test/OpenRiaServices.Common.Test.csproj`:
- Around line 16-17: The ItemGroup Condition contains a trailing space in the
comparison value ('net472' ) causing whitespace-sensitive MSBuild comparison to
fail; edit the Condition on the ItemGroup that controls the PackageReference for
System.Management so the comparison uses the exact string "'net472'" (no
trailing space) against $(TargetFramework), i.e., update the Condition to
"'$(TargetFramework)' != 'net472'" so the System.Management PackageReference is
excluded for net472 as intended.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: cc9244dd-4cd1-4e97-8402-41a9b1ed4142

📥 Commits

Reviewing files that changed from the base of the PR and between 84dd62c and d380926.

📒 Files selected for processing (19)
  • src/OpenRiaServices.Client/Test/Client.External.Test/OpenRiaServices.Client.External.Test.csproj
  • src/OpenRiaServices.Client/Test/Client.Test/OpenRiaServices.Client.Test.csproj
  • src/OpenRiaServices.Client/Test/Client.Vb.Test/OpenRiaServices.Client.Vb.Test.csproj
  • src/OpenRiaServices.Hosting.AspNetCore/Test/OpenRiaServices.Hosting.AspNetCore.Test/OpenRiaServices.Hosting.AspNetCore.Test.csproj
  • src/OpenRiaServices.Hosting.Local/Test/OpenRiaServices.Hosting.Local.Test.csproj
  • src/OpenRiaServices.Hosting.Wcf.Endpoint/Test/OpenRiaServices.Hosting.Wcf.Endpoint.Test.csproj
  • src/OpenRiaServices.Hosting.Wcf/Test/OpenRiaServices.Hosting.Wcf.Test.csproj
  • src/OpenRiaServices.Server.Authentication.AspNetMembership/Test/OpenRiaServices.Server.Authentication.AspNetMembership.Test.csproj
  • src/OpenRiaServices.Server.EntityFrameworkCore/Test/OpenRiaServices.Server.EntityFrameworkCore.Test/OpenRiaServices.Server.EntityFrameworkCore.Test.csproj
  • src/OpenRiaServices.Server.UnitTesting/Test/OpenRiaServices.Server.UnitTesting.Test.csproj
  • src/OpenRiaServices.Server/Test/OpenRiaServices.Server.Test.csproj
  • src/OpenRiaServices.Tools.CodeGenTask/OpenRiaServices.Tools.CodeGenTask.csproj
  • src/OpenRiaServices.Tools.CodeGenTask/Properties/launchSettings.json
  • src/OpenRiaServices.Tools.TextTemplate/Test/OpenRiaServices.Tools.TextTemplate.Test.csproj
  • src/OpenRiaServices.Tools/Test/OpenRiaServices.Tools.Test.csproj
  • src/Test/Desktop/OpenRiaServices.Common.Test/OpenRiaServices.Common.Test.csproj
  • src/Test/OpenRiaservices.EndToEnd.AspNetCore.Test/OpenRiaservices.EndToEnd.AspNetCore.Test.csproj
  • src/Test/OpenRiaservices.EndToEnd.Wcf.Test/OpenRiaservices.EndToEnd.Wcf.Test.csproj
  • src/VisualStudio/Tools/Test/OpenRiaServices.VisualStudio.DomainServices.Tools.Test.csproj

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@src/OpenRiaServices.Tools.TextTemplate/Test/OpenRiaServices.Tools.TextTemplate.Test.csproj`:
- Around line 35-36: Update all project PackageReference entries for
System.Collections.Immutable and System.Reflection.MetadataLoadContext to the
same version (preferably 10.0.5) to avoid MSBuild resolution conflicts;
specifically change the PackageReference in
OpenRiaServices.Tools.TextTemplate.Test.csproj and align the versions used in
the projects referenced (OpenRiaServices.Hosting.Wcf,
OpenRiaServices.Hosting.AspNetCore, WebsiteFullTrust, and any other csproj that
references these packages) so every csproj uses System.Collections.Immutable and
System.Reflection.MetadataLoadContext version 10.0.5, then restore and build to
verify no binding or resolution warnings remain.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 34433d4a-a98b-4d03-8c2b-0e1b16c41e15

📥 Commits

Reviewing files that changed from the base of the PR and between 3d57696 and 30fc198.

📒 Files selected for processing (2)
  • src/OpenRiaServices.Tools.TextTemplate/Test/OpenRiaServices.Tools.TextTemplate.Test.csproj
  • src/OpenRiaServices.Tools/Test/OpenRiaServices.Tools.Test.csproj

@Daniel-Svensson Daniel-Svensson disabled auto-merge April 7, 2026 20:42
@Daniel-Svensson Daniel-Svensson enabled auto-merge (squash) April 7, 2026 20:42
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/OpenRiaServices.Tools.CodeGenTask/SharedCodeServiceParametersBinder.cs (1)

2-4: ⚠️ Potential issue | 🟠 Major

Consider upgrading System.CommandLine from beta version to stable 2.0.5.

The code uses System.CommandLine version 2.0.0-beta4.22272.1 (released June 2, 2022). The latest stable version is 2.0.5 (March 2026). While no known security vulnerabilities were found for beta4, using a 4-year-old beta version in production is not ideal. Upgrading would require code changes due to breaking API changes between beta4 and stable 2.0.x releases. The PR description references "revert commandline update," suggesting previous upgrade attempts encountered incompatibilities. This is likely technical debt worth addressing if feasible.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/OpenRiaServices.Tools.CodeGenTask/SharedCodeServiceParametersBinder.cs`
around lines 2 - 4, The project currently imports System.CommandLine (seen in
SharedCodeServiceParametersBinder.cs via the using directives System.CommandLine
and System.CommandLine.Binding) which is an old beta; update the NuGet package
to the stable 2.0.5 and then fix compile breaks in
SharedCodeServiceParametersBinder and any other files that use the old binding
API: replace obsolete types/methods from System.CommandLine.Binding with the
stable equivalents (adjust Binder/BinderBase/Argument<T>/Option<T> usages,
binding constructors, and any BindingContext/InvocationContext differences),
update using directives as needed, rebuild, and resolve any resulting compiler
errors by following the System.CommandLine 2.0 migration guidance so the code
compiles and tests pass.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@src/OpenRiaServices.Tools.CodeGenTask/SharedCodeServiceParametersBinder.cs`:
- Around line 2-4: The project currently imports System.CommandLine (seen in
SharedCodeServiceParametersBinder.cs via the using directives System.CommandLine
and System.CommandLine.Binding) which is an old beta; update the NuGet package
to the stable 2.0.5 and then fix compile breaks in
SharedCodeServiceParametersBinder and any other files that use the old binding
API: replace obsolete types/methods from System.CommandLine.Binding with the
stable equivalents (adjust Binder/BinderBase/Argument<T>/Option<T> usages,
binding constructors, and any BindingContext/InvocationContext differences),
update using directives as needed, rebuild, and resolve any resulting compiler
errors by following the System.CommandLine 2.0 migration guidance so the code
compiles and tests pass.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1b5c282c-1823-4c54-bf3f-2c3f4074c67f

📥 Commits

Reviewing files that changed from the base of the PR and between 30fc198 and 4d9ad1a.

📒 Files selected for processing (2)
  • src/OpenRiaServices.Tools.CodeGenTask/ConsoleLogger.cs
  • src/OpenRiaServices.Tools.CodeGenTask/SharedCodeServiceParametersBinder.cs

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/OpenRiaServices.Tools.CodeGenTask/Program.cs`:
- Around line 62-93: The rootCommand.SetAction currently registers a void
handler so Invoke() always returns 0; change the handler to return an int and
return a non-zero exit code when RunCodeGenForNet6 fails. Inside the SetAction
callback that uses parseResult, call RunCodeGenForNet6(...) and return 0 when it
returns true and a non-zero value (e.g., 1) when it returns false; ensure the
handler signature matches System.CommandLine's Func<ParseResult,int> (or use
SetHandler that returns int) so rootCommand.Parse(args).Invoke() propagates the
code. Use the existing symbols rootCommand.SetAction, parseResult,
RunCodeGenForNet6, and the local success result when implementing the change.

In
`@src/OpenRiaServices.Tools.TextTemplate/Test/OpenRiaServices.Tools.TextTemplate.Test.csproj`:
- Around line 31-34: The project references Microsoft.Build packages at
Version="17.11.48" but the commit message claims "latest .NET 8 release"; either
update all four PackageReference versions (Microsoft.Build,
Microsoft.Build.Framework, Microsoft.Build.Utilities.Core,
Microsoft.Build.Tasks.Core) from 17.11.48 to 17.14.28 to use the current .NET
8-compatible MSBuild, or if 17.11.48 was intentionally chosen for compatibility,
keep those versions and amend the commit/message to accurately state the chosen
version rather than "latest .NET 8 release".
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: dfe883ba-9084-4cb5-a005-55c4d438a70e

📥 Commits

Reviewing files that changed from the base of the PR and between 4d9ad1a and e1624aa.

📒 Files selected for processing (8)
  • src/OpenRiaServices.Hosting.AspNetCore/Framework/OpenRiaServices.Hosting.AspNetCore.csproj
  • src/OpenRiaServices.Tools.CodeGenTask/ClientCodeGenerationOptionsBinder.cs
  • src/OpenRiaServices.Tools.CodeGenTask/OpenRiaServices.Tools.CodeGenTask.csproj
  • src/OpenRiaServices.Tools.CodeGenTask/Program.cs
  • src/OpenRiaServices.Tools.CodeGenTask/SharedCodeServiceParametersBinder.cs
  • src/OpenRiaServices.Tools.TextTemplate/Test/OpenRiaServices.Tools.TextTemplate.Test.csproj
  • src/OpenRiaServices.Tools/Test/OpenRiaServices.Tools.Test.csproj
  • src/VisualStudio/Tools/Test/OpenRiaServices.VisualStudio.DomainServices.Tools.Test.csproj
💤 Files with no reviewable changes (3)
  • src/OpenRiaServices.Hosting.AspNetCore/Framework/OpenRiaServices.Hosting.AspNetCore.csproj
  • src/OpenRiaServices.Tools.CodeGenTask/ClientCodeGenerationOptionsBinder.cs
  • src/OpenRiaServices.Tools.CodeGenTask/SharedCodeServiceParametersBinder.cs

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 8, 2026

@Daniel-Svensson Daniel-Svensson merged commit 41ef7d2 into OpenRIAServices:main Apr 8, 2026
7 checks passed
@Daniel-Svensson Daniel-Svensson deleted the feature/nuget_update branch April 8, 2026 10:26
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.

2 participants