Multi-target contracts projects (v10) - #892
Conversation
Only LeanCode.DomainModels.Generators should not reference it.
There was a problem hiding this comment.
🟢 Approval recommended
The multi-targeting configuration and authorization annotation are consistent and complete.
Pull request overview
Enables contract packages to provide framework-specific assets for supported .NET versions while correcting authorization metadata.
Changes:
- Multi-targets contract projects across .NET 6, 8, 9, and 10.
- Enables the analyzer for all targets except
netstandard2.0. - Explicitly permits unauthenticated version-support queries.
File summaries
| File | Description |
|---|---|
src/Directory.Build.props |
Broadens analyzer inclusion across target frameworks. |
src/CQRS/LeanCode.CQRS.Annotations/LeanCode.CQRS.Annotations.csproj |
Adds multi-targeting. |
src/Infrastructure/LeanCode.ForceUpdate.Contracts/LeanCode.ForceUpdate.Contracts.csproj |
Adds multi-targeting. |
src/Infrastructure/LeanCode.ForceUpdate.Contracts/VersionSupport.cs |
Marks the query as publicly accessible. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
Skipped
🎉 No failed tests in this run. Github Test Reporter by CTRF 💚 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v10.0 #892 +/- ##
=======================================
Coverage 85.12% 85.12%
=======================================
Files 241 241
Lines 5095 5095
Branches 362 374 +12
=======================================
Hits 4337 4337
Misses 675 675
Partials 83 83 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| Include="../../Tools/LeanCode.CodeAnalysis/LeanCode.CodeAnalysis.csproj" | ||
| Condition="'$(MSBuildProjectName)' != 'LeanCode.CodeAnalysis' | ||
| And '$(TargetFramework)' == 'net9.0'" | ||
| And '$(TargetFramework)' != 'netstandard2.0'" |
There was a problem hiding this comment.
Only not the particular version of netstandard is enough here? 🤔 2.1 is fine?
There was a problem hiding this comment.
Yes, netstandard2.1 is fine because our CodeAnalysis package itself targets netstandard2.1. Only referencing it in projects targeting older netstandards is a problem.
Plus a minor fix to VersionSupport, see the commits. Allows one to stop depending on long-deprecated
net6.0TFM.I'll port this to v11 branch afterwards.