Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V9.0.0/cpm #99

Merged
merged 2 commits into from
Nov 11, 2024
Merged

V9.0.0/cpm #99

merged 2 commits into from
Nov 11, 2024

Conversation

gimlichael
Copy link
Owner

@gimlichael gimlichael commented Nov 10, 2024

This pull request includes several updates to package references across multiple project files to centralize and simplify version management. The most important changes involve removing explicit version numbers from PackageReference elements and adding a new Directory.Packages.props file to manage package versions centrally.

Centralization of package version management:

  • Added Directory.Packages.props to manage package versions centrally, including versions for AutoFixture, Microsoft.NET.Test.Sdk, System.Text.Json, and others.

Simplification of package references:

  • Removed version numbers from PackageReference elements in Directory.Build.props for both non-test and test projects. [1] [2]
  • Removed version numbers from PackageReference elements in various project files, including Cuemon.Data.SqlClient.csproj, Cuemon.Extensions.Core.csproj, Cuemon.Extensions.DependencyInjection.csproj, Cuemon.Extensions.Hosting.csproj, Cuemon.Extensions.Net.csproj, and Cuemon.Extensions.Text.Json.csproj. [1] [2] [3] [4] [5] [6]

Updates to README:

  • Updated README.md to reflect support for .NET 9 and deprecation of older .NET versions.

Summary by CodeRabbit

  • New Features

    • Introduced centralized package version management with the new Directory.Packages.props file.
    • Updated project support to include .NET 9 and .NET 8, while deprecating earlier versions.
    • Enhanced testing capabilities with new XML response handling in fault descriptor tests.
  • Bug Fixes

    • Removed specific version constraints for various package references across multiple project files, allowing for the latest versions to be used.
  • Documentation

    • Updated README.md to reflect new branching strategy and framework support changes.

@gimlichael gimlichael self-assigned this Nov 10, 2024
Copy link

coderabbitai bot commented Nov 10, 2024

Walkthrough

The pull request introduces significant changes to project files across the repository, primarily focusing on dependency management. Specific version numbers for various package references have been removed, allowing the projects to utilize the latest available versions of these packages. Additionally, a new Directory.Packages.props file has been created to centralize package version management. Updates to the README.md reflect changes in supported .NET versions and a new branching strategy. The modifications also include restructuring of project files to enhance consistency and simplify dependency handling.

Changes

File Path Change Summary
Directory.Build.props Removed specific version numbers for multiple package references, updated SignAssembly conditions, and expanded NoWarn property.
Directory.Packages.props Created a new file for centralized package version management, specifying versions for various frameworks.
README.md Updated to reflect support for .NET 8 and .NET 9, emphasized deprecation of older versions, and changed branching strategy to trunk-based.
src/Cuemon.Data.SqlClient/Cuemon.Data.SqlClient.csproj Removed version number for System.Data.SqlClient package reference.
src/Cuemon.Extensions.Core/Cuemon.Extensions.Core.csproj Removed version numbers for System.Threading.Tasks.Extensions and Microsoft.Bcl.AsyncInterfaces.
src/Cuemon.Extensions.DependencyInjection/Cuemon.Extensions.DependencyInjection.csproj Removed version constraints for Microsoft.Extensions.DependencyInjection and Microsoft.Extensions.Options.ConfigurationExtensions.
src/Cuemon.Extensions.Globalization/Cuemon.Extensions.Globalization.csproj Removed version number for Codebelt.Extensions.YamlDotNet and adjusted file handling.
src/Cuemon.Extensions.Hosting/Cuemon.Extensions.Hosting.csproj Consolidated package references for Microsoft.Extensions.Hosting without version specifications.
src/Cuemon.Extensions.Net/Cuemon.Extensions.Net.csproj Consolidated package references for Microsoft.Extensions.Http without version specifications.
src/Cuemon.Extensions.Text.Json/Cuemon.Extensions.Text.Json.csproj Removed versioned references for System.Text.Json and added a versionless reference.
src/Cuemon.Extensions.Threading/Cuemon.Extensions.Threading.csproj Removed version specification for Backport.System.Threading.Lock and reorganized project references.
test/Cuemon.AspNetCore.Authentication.Tests/Cuemon.AspNetCore.Authentication.Tests.csproj Removed version number for Codebelt.Extensions.Xunit.Hosting.AspNetCore.
test/Cuemon.AspNetCore.FunctionalTests/Cuemon.AspNetCore.FunctionalTests.csproj Removed version numbers for Meziantou.Xunit.ParallelTestFramework and Codebelt.Extensions.Xunit.Hosting.AspNetCore.
test/Cuemon.AspNetCore.Mvc.FunctionalTests/Cuemon.AspNetCore.Mvc.FunctionalTests.csproj Removed version numbers for Meziantou.Xunit.ParallelTestFramework and Codebelt.Extensions.Xunit.Hosting.AspNetCore.
test/Cuemon.AspNetCore.Mvc.FunctionalTests/Filters/Diagnostics/FaultDescriptorFilterTest.cs Added new test methods for XML rendering of exceptions.
test/Cuemon.AspNetCore.Mvc.Tests/Cuemon.AspNetCore.Mvc.Tests.csproj Removed version number for Codebelt.Extensions.Xunit.Hosting.AspNetCore.
test/Cuemon.AspNetCore.Razor.TagHelpers.Tests/Cuemon.AspNetCore.Razor.TagHelpers.Tests.csproj Removed version number for Codebelt.Extensions.Xunit.Hosting.AspNetCore.
test/Cuemon.AspNetCore.Tests/Cuemon.AspNetCore.Tests.csproj Removed version number for Codebelt.Extensions.Xunit.Hosting.AspNetCore.
test/Cuemon.Core.Tests/Cuemon.Core.Tests.csproj Removed version numbers for AutoFixture, NativeLibraryLoader, and System.Net.Http, adjusted resource handling.
test/Cuemon.Data.SqlClient.Tests/Cuemon.Data.SqlClient.Tests.csproj Removed version number for Codebelt.Extensions.Xunit.Hosting.
test/Cuemon.Data.Tests/Cuemon.Data.Tests.csproj Removed version numbers for Microsoft.Data.Sqlite and several Microsoft.Extensions.* packages.
test/Cuemon.Extensions.AspNetCore.Authentication.Tests/Cuemon.Extensions.AspNetCore.Authentication.Tests.csproj Removed version number for Codebelt.Extensions.Xunit.Hosting.AspNetCore.
test/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.Tests/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.Tests.csproj Removed version number for Codebelt.Extensions.Xunit.Hosting.AspNetCore.
test/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.Tests/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.Tests.csproj Removed version number for Codebelt.Extensions.Xunit.Hosting.AspNetCore.
test/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.Tests/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.Tests.csproj Removed version number for Codebelt.Extensions.Xunit.Hosting.AspNetCore.
test/Cuemon.Extensions.AspNetCore.Mvc.Tests/Cuemon.Extensions.AspNetCore.Mvc.Tests.csproj Removed version number for Codebelt.Extensions.Xunit.Hosting.AspNetCore.
test/Cuemon.Extensions.Hosting.Tests/Cuemon.Extensions.Hosting.Tests.csproj Removed version number for Codebelt.Extensions.Xunit.Hosting.
test/Cuemon.Extensions.Net.Tests/Cuemon.Extensions.Net.Tests.csproj Removed version number for System.Net.Http.
test/Cuemon.Extensions.Runtime.Caching.Tests/Cuemon.Extensions.Runtime.Caching.Tests.csproj Removed version numbers for Xunit.Priority and Codebelt.Extensions.Xunit.Hosting.
test/Cuemon.Xml.Tests/Cuemon.Xml.Tests.csproj Removed version number for System.Net.Http.
tooling/gse/gse.csproj Removed version number for Codebelt.Extensions.YamlDotNet.

Possibly related PRs

🐰 In the meadow, changes abound,
Packages now without version found.
With each hop, we embrace the new,
Latest versions, fresh as the dew.
Dependencies dance, so light and free,
Hooray for updates, come celebrate with me! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@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: 0

🧹 Outside diff range and nitpick comments (4)
src/Cuemon.Extensions.Hosting/Cuemon.Extensions.Hosting.csproj (1)

12-14: Consider documenting version management strategy

Since this is part of a larger effort to centralize package versions, it would be helpful to document this approach for future contributors.

Consider adding a comment in the csproj file pointing to where versions are managed:

   <ItemGroup>
+    <!-- Package versions are centrally managed in Directory.Packages.props -->
     <PackageReference Include="Microsoft.Extensions.Hosting" />
   </ItemGroup>
Directory.Packages.props (2)

7-27: Consider organizing packages by purpose.

The main ItemGroup mixes different types of packages (testing, tooling, runtime). Consider organizing them into separate ItemGroups for better maintainability:

  • Test packages (AutoFixture, xUnit, etc.)
  • Build/CI tools (MinVer, SourceLink)
  • Runtime dependencies

Example organization:

  <ItemGroup> <!-- Build Tools -->
    <PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
    <PackageVersion Include="MinVer" Version="6.0.0" />
  </ItemGroup>

  <ItemGroup> <!-- Test Framework -->
    <PackageVersion Include="AutoFixture" Version="4.18.1" />
    <PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
    <PackageVersion Include="xunit" Version="2.9.2" />
    <!-- ... other test packages ... -->
  </ItemGroup>

  <ItemGroup> <!-- Runtime Dependencies -->
    <PackageVersion Include="System.Data.SqlClient" Version="4.8.6" />
    <!-- ... other runtime packages ... -->
  </ItemGroup>

1-66: Consider implementing version variables for shared packages.

To reduce maintenance overhead, consider using MSBuild properties for packages that appear in multiple target frameworks (e.g., Microsoft.Data.Sqlite, System.Text.Json). This would make version updates more manageable.

Example approach:

+ <PropertyGroup>
+   <!-- Define versions for packages used across multiple target frameworks -->
+   <SystemTextJsonVersion Condition="$(TargetFramework.StartsWith('net9'))">9.0.0-rc.2.24473.5</SystemTextJsonVersion>
+   <SystemTextJsonVersion Condition="$(TargetFramework.StartsWith('net8'))">8.0.5</SystemTextJsonVersion>
+   <SystemTextJsonVersion Condition="$(TargetFramework.StartsWith('netstandard2'))">8.0.5</SystemTextJsonVersion>
+ </PropertyGroup>

  <ItemGroup Condition="$(TargetFramework.StartsWith('net9'))">
-   <PackageVersion Include="System.Text.Json" Version="9.0.0-rc.2.24473.5" />
+   <PackageVersion Include="System.Text.Json" Version="$(SystemTextJsonVersion)" />
  </ItemGroup>
test/Cuemon.AspNetCore.Mvc.FunctionalTests/Filters/Diagnostics/FaultDescriptorFilterTest.cs (1)

Line range hint 556-1182: Consider refactoring test methods to improve maintainability.

The new XML test methods are comprehensive but could benefit from some refactoring to reduce duplication and improve maintainability:

  1. Consider extracting the expected XML templates into separate resource files or constants to improve readability and maintenance.
  2. The switch statements for different sensitivity levels could be refactored into a separate method or use a lookup pattern.

Here's a suggested approach for extracting the XML templates:

private static class XmlTemplates 
{
    public static string AllSensitivityTemplate => """
        <?xml version="1.0" encoding="utf-8"?>
        <ProblemDetails>
            <!-- Template content -->
        </ProblemDetails>
        """;
    
    // Add other templates...
}

And for the sensitivity level handling:

private string GetExpectedXmlForSensitivity(FaultSensitivityDetails sensitivity) 
{
    return sensitivity switch 
    {
        FaultSensitivityDetails.All => XmlTemplates.AllSensitivityTemplate,
        FaultSensitivityDetails.Evidence => XmlTemplates.EvidenceTemplate,
        // Add other cases...
        _ => throw new ArgumentException($"Unsupported sensitivity level: {sensitivity}")
    };
}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 2012856 and dde4281.

📒 Files selected for processing (35)
  • Directory.Build.props (2 hunks)
  • Directory.Packages.props (1 hunks)
  • README.md (1 hunks)
  • src/Cuemon.Data.SqlClient/Cuemon.Data.SqlClient.csproj (1 hunks)
  • src/Cuemon.Extensions.Core/Cuemon.Extensions.Core.csproj (1 hunks)
  • src/Cuemon.Extensions.DependencyInjection/Cuemon.Extensions.DependencyInjection.csproj (1 hunks)
  • src/Cuemon.Extensions.Globalization/Cuemon.Extensions.Globalization.csproj (1 hunks)
  • src/Cuemon.Extensions.Hosting/Cuemon.Extensions.Hosting.csproj (1 hunks)
  • src/Cuemon.Extensions.Net/Cuemon.Extensions.Net.csproj (1 hunks)
  • src/Cuemon.Extensions.Text.Json/Cuemon.Extensions.Text.Json.csproj (1 hunks)
  • src/Cuemon.Extensions.Threading/Cuemon.Extensions.Threading.csproj (1 hunks)
  • test/Cuemon.AspNetCore.Authentication.Tests/Cuemon.AspNetCore.Authentication.Tests.csproj (1 hunks)
  • test/Cuemon.AspNetCore.FunctionalTests/Cuemon.AspNetCore.FunctionalTests.csproj (1 hunks)
  • test/Cuemon.AspNetCore.Mvc.FunctionalTests/Cuemon.AspNetCore.Mvc.FunctionalTests.csproj (1 hunks)
  • test/Cuemon.AspNetCore.Mvc.FunctionalTests/Filters/Diagnostics/FaultDescriptorFilterTest.cs (1 hunks)
  • test/Cuemon.AspNetCore.Mvc.Tests/Cuemon.AspNetCore.Mvc.Tests.csproj (1 hunks)
  • test/Cuemon.AspNetCore.Razor.TagHelpers.Tests/Cuemon.AspNetCore.Razor.TagHelpers.Tests.csproj (1 hunks)
  • test/Cuemon.AspNetCore.Tests/Cuemon.AspNetCore.Tests.csproj (1 hunks)
  • test/Cuemon.Core.Tests/Cuemon.Core.Tests.csproj (1 hunks)
  • test/Cuemon.Data.SqlClient.Tests/Cuemon.Data.SqlClient.Tests.csproj (1 hunks)
  • test/Cuemon.Data.Tests/Cuemon.Data.Tests.csproj (1 hunks)
  • test/Cuemon.Extensions.AspNetCore.Authentication.Tests/Cuemon.Extensions.AspNetCore.Authentication.Tests.csproj (1 hunks)
  • test/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.Tests/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.Tests.csproj (1 hunks)
  • test/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.Tests/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.Tests.csproj (1 hunks)
  • test/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.Tests/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.Tests.csproj (1 hunks)
  • test/Cuemon.Extensions.AspNetCore.Mvc.Tests/Cuemon.Extensions.AspNetCore.Mvc.Tests.csproj (1 hunks)
  • test/Cuemon.Extensions.AspNetCore.Tests/Cuemon.Extensions.AspNetCore.Tests.csproj (1 hunks)
  • test/Cuemon.Extensions.Hosting.Tests/Cuemon.Extensions.Hosting.Tests.csproj (1 hunks)
  • test/Cuemon.Extensions.Net.Tests/Cuemon.Extensions.Net.Tests.csproj (1 hunks)
  • test/Cuemon.Extensions.Runtime.Caching.Tests/Cuemon.Extensions.Runtime.Caching.Tests.csproj (1 hunks)
  • test/Cuemon.Net.Tests/Cuemon.Net.Tests.csproj (1 hunks)
  • test/Cuemon.Resilience.Tests/Cuemon.Resilience.Tests.csproj (1 hunks)
  • test/Cuemon.Runtime.Caching.Tests/Cuemon.Runtime.Caching.Tests.csproj (1 hunks)
  • test/Cuemon.Xml.Tests/Cuemon.Xml.Tests.csproj (1 hunks)
  • tooling/gse/gse.csproj (1 hunks)
✅ Files skipped from review due to trivial changes (8)
  • src/Cuemon.Extensions.Core/Cuemon.Extensions.Core.csproj
  • test/Cuemon.AspNetCore.Authentication.Tests/Cuemon.AspNetCore.Authentication.Tests.csproj
  • test/Cuemon.AspNetCore.FunctionalTests/Cuemon.AspNetCore.FunctionalTests.csproj
  • test/Cuemon.AspNetCore.Mvc.FunctionalTests/Cuemon.AspNetCore.Mvc.FunctionalTests.csproj
  • test/Cuemon.AspNetCore.Razor.TagHelpers.Tests/Cuemon.AspNetCore.Razor.TagHelpers.Tests.csproj
  • test/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.Tests/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.Tests.csproj
  • test/Cuemon.Extensions.Hosting.Tests/Cuemon.Extensions.Hosting.Tests.csproj
  • test/Cuemon.Extensions.Runtime.Caching.Tests/Cuemon.Extensions.Runtime.Caching.Tests.csproj
🔇 Additional comments (43)
test/Cuemon.Extensions.Net.Tests/Cuemon.Extensions.Net.Tests.csproj (1)

8-8: LGTM! Removal of explicit version aligns with centralized version management.

The removal of the explicit version from System.Net.Http package reference is correct as it aligns with the PR's objective to centralize version management in Directory.Packages.props.

Let's verify the version specification in Directory.Packages.props:

✅ Verification successful

✅ Version is correctly managed in Directory.Packages.props

The removal of explicit version from System.Net.Http package reference is correct as:

  • The version (4.3.4) is properly specified in Directory.Packages.props for .NET Framework targets
  • The package reference is correctly conditioned with $(TargetFramework.StartsWith('net4'))
  • This aligns with the centralized package version management approach
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify System.Net.Http version specification in Directory.Packages.props
# Expected: Should find a version specification for System.Net.Http

# Search for System.Net.Http version in Directory.Packages.props
rg -A 1 "System\.Net\.Http" "**/Directory.Packages.props"

Length of output: 127


Script:

#!/bin/bash
# Let's first check if the Directory.Packages.props exists and its location
fd -I "Directory.Packages.props"

# Also check for any other props files that might contain package versions
fd -I ".props$"

# Let's also check the project file itself to understand the framework targets
cat test/Cuemon.Extensions.Net.Tests/Cuemon.Extensions.Net.Tests.csproj

Length of output: 680


Script:

#!/bin/bash
# Let's check the content of Directory.Packages.props for System.Net.Http version
cat Directory.Packages.props

# Also check Directory.Build.props as it might contain relevant package information
cat Directory.Build.props

Length of output: 8862

test/Cuemon.Net.Tests/Cuemon.Net.Tests.csproj (1)

8-8: Verify if System.Net.Http reference is still needed for .NET Framework 4.x

The version-less package reference aligns with the central package management approach. However, since this PR adds .NET 9 support and potentially deprecates older versions, we should verify if this .NET Framework 4.x specific reference is still required.

✅ Verification successful

System.Net.Http reference is correctly configured for .NET Framework

The System.Net.Http package reference is still needed as the test project targets .NET Framework 4.8 on Windows (as defined in Directory.Build.props). The version-less reference is correct as it's centrally managed in Directory.Packages.props with version 4.3.4 for net4* targets. This aligns with both the central package management approach and the multi-targeting strategy of the project.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if there are any remaining .NET Framework 4.x target frameworks in the solution
rg -l "TargetFramework.*net4" --type xml

Length of output: 42


Script:

#!/bin/bash
# Let's check the target frameworks in the specific test project
cat test/Cuemon.Net.Tests/Cuemon.Net.Tests.csproj

# Also check for any conditional references to System.Net.Http
rg "System\.Net\.Http" --type xml -C 3

Length of output: 599


Script:

#!/bin/bash
# Let's check the target frameworks defined in the project
rg "<TargetFramework.*?>" test/Cuemon.Net.Tests/Cuemon.Net.Tests.csproj

# Check the Directory.Build.props for target frameworks
fd "Directory.Build.props" --exec cat {}

# Check if System.Net.Http is referenced in central package management
fd "Directory.Packages.props" --exec cat {}

Length of output: 8966

test/Cuemon.Xml.Tests/Cuemon.Xml.Tests.csproj (2)

8-8: LGTM! Version removal aligns with centralized package management.

The removal of explicit version from System.Net.Http package reference is consistent with the PR's objective to centralize version management.


8-8: Verify System.Net.Http version in Directory.Packages.props

Let's ensure the package version is properly specified in the central version management file.

✅ Verification successful

System.Net.Http version is properly managed in Directory.Packages.props

The package version is correctly specified as 4.3.4 in the central package management file (Directory.Packages.props), and no other explicit version references were found in the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if System.Net.Http version is defined in Directory.Packages.props
# Expected: Should find a Version attribute for System.Net.Http package

# Look for System.Net.Http package version in Directory.Packages.props
rg -A 1 "PackageVersion.*System\.Net\.Http" Directory.Packages.props

# Also check if there are any other references to this package that might need updating
rg "System\.Net\.Http.*Version=" --type xml

Length of output: 196

test/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.Tests/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.Tests.csproj (2)

14-14: LGTM! Package version centralization.

The removal of explicit version number aligns with the PR objective of centralizing package version management in Directory.Packages.props.


Line range hint 4-5: Verify package compatibility with target frameworks.

Since this project targets both .NET 9.0 and 8.0, ensure that the centrally managed version of Codebelt.Extensions.Xunit.Hosting.AspNetCore in Directory.Packages.props is compatible with both frameworks.

Also applies to: 14-14

✅ Verification successful

Package version 9.0.0-preview.11 is compatible with target frameworks

The centrally managed package version of Codebelt.Extensions.Xunit.Hosting.AspNetCore (9.0.0-preview.11) in Directory.Packages.props is compatible with both .NET 9.0 and .NET 8.0 target frameworks. This is evidenced by:

  • The package version follows .NET versioning pattern (9.0.0)
  • It's a preview version which aligns with .NET 9.0 preview status
  • No framework-specific conditions are present in the package reference
  • The package is referenced without any framework constraints in the test project
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the package version compatibility in Directory.Packages.props

# Test: Check the package version specified in Directory.Packages.props
echo "Checking package version in Directory.Packages.props:"
rg "Codebelt\.Extensions\.Xunit\.Hosting\.AspNetCore" Directory.Packages.props -A 1

# Test: Look for any framework-specific conditions
echo -e "\nChecking for framework-specific conditions:"
rg "Codebelt\.Extensions\.Xunit\.Hosting\.AspNetCore.*Condition" .

Length of output: 569


Script:

#!/bin/bash
# Let's check the package references in the test project and any framework-specific conditions

# Check package references in the test project
echo "Checking package references in the test project:"
cat "test/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.Tests/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.Tests.csproj"

# Check if there are any framework-specific package references across all test projects
echo -e "\nChecking framework-specific package references in test projects:"
fd ".*\.Tests\.csproj$" test/ --exec grep -A 5 -B 5 "PackageReference.*Condition"

# Let's also check the package's NuGet page for supported frameworks
echo -e "\nChecking package info using dotnet CLI:"
gh search repos --owner codebelt --match name --json description,url --jq '.[] | select(.description | contains("Xunit.Hosting.AspNetCore"))'

Length of output: 1304

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

14-14: LGTM! Version removal aligns with centralized package management.

The removal of explicit version from PackageReference aligns with the PR's objective to centralize version management.

Let's verify the package version is properly managed:

✅ Verification successful

✅ Package version is properly managed in Directory.Packages.props

The package Codebelt.Extensions.Xunit.Hosting.AspNetCore is correctly defined in Directory.Packages.props with version 9.0.0-preview.11, and no test projects have explicit version references, confirming successful centralization of package versioning.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the package version is defined in Directory.Packages.props
# and consistently used across test projects

# Test 1: Check if the package version is defined in Directory.Packages.props
echo "Checking Directory.Packages.props for package version..."
rg "Codebelt\.Extensions\.Xunit\.Hosting\.AspNetCore" Directory.Packages.props

# Test 2: Check for any remaining explicit versions of this package in other test projects
echo "Checking for any remaining explicit versions in test projects..."
fd -e csproj . test/ --exec rg "Codebelt\.Extensions\.Xunit\.Hosting\.AspNetCore.*Version="

Length of output: 541

test/Cuemon.Runtime.Caching.Tests/Cuemon.Runtime.Caching.Tests.csproj (1)

10-10: LGTM! Verify package versions in Directory.Packages.props

The removal of explicit versions aligns with the PR objective of centralizing package version management.

Let's verify that these packages are properly configured in the central version file:

Also applies to: 18-18

✅ Verification successful

✓ Package versions are properly configured in Directory.Packages.props

Both packages have their versions correctly defined in the central version management file:

  • Xunit.Priority: 1.1.6
  • Codebelt.Extensions.Xunit.Hosting: 9.0.0-preview.11
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the packages are defined in Directory.Packages.props
# Expected: Both packages should have version entries in the props file

# Test: Check if Directory.Packages.props exists and contains version entries for both packages
rg -A 1 "Xunit\.Priority|Codebelt\.Extensions\.Xunit\.Hosting" "Directory.Packages.props"

Length of output: 513

test/Cuemon.Data.SqlClient.Tests/Cuemon.Data.SqlClient.Tests.csproj (1)

16-16: LGTM! Package reference aligned with centralized version management.

The removal of explicit version specification aligns with the PR objective of centralizing package version management.

Let's verify the package version configuration:

✅ Verification successful

✅ Package version is properly configured in Directory.Packages.props

The package Codebelt.Extensions.Xunit.Hosting is correctly configured in Directory.Packages.props with version 9.0.0-preview.11, which aligns with the centralized version management approach. The removal of the explicit version from the project file is valid.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that Directory.Packages.props exists and contains version for Codebelt.Extensions.Xunit.Hosting

# Test 1: Check if Directory.Packages.props exists and contains the package reference
echo "Checking Directory.Packages.props for package version..."
rg -l "Codebelt\.Extensions\.Xunit\.Hosting" Directory.Packages.props

# Test 2: Display the version configuration
echo "Displaying package version configuration..."
rg "Codebelt\.Extensions\.Xunit\.Hosting" Directory.Packages.props -A 1

Length of output: 679

test/Cuemon.Extensions.AspNetCore.Mvc.Tests/Cuemon.Extensions.AspNetCore.Mvc.Tests.csproj (1)

16-16: Verify package version configuration.

The removal of explicit version for Codebelt.Extensions.Xunit.Hosting.AspNetCore aligns with the centralized version management strategy. Let's verify the version is properly configured.

✅ Verification successful

Package version is properly configured in centralized management

The verification confirms that:

  1. The package version is correctly defined in Directory.Packages.props as "9.0.0-preview.11"
  2. All test projects consistently use the package without explicit version, following the centralized version management pattern
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify package version configuration in Directory.Packages.props
# and ensure consistent usage across test projects

# Test 1: Check if the package is defined in Directory.Packages.props
echo "Checking Directory.Packages.props for package version:"
rg -A 1 "Codebelt\.Extensions\.Xunit\.Hosting\.AspNetCore" Directory.Packages.props

# Test 2: Verify consistent usage across test projects
echo -e "\nChecking usage across test projects:"
fd -e csproj . test/ --exec rg "Codebelt\.Extensions\.Xunit\.Hosting\.AspNetCore"

Length of output: 1532

src/Cuemon.Extensions.DependencyInjection/Cuemon.Extensions.DependencyInjection.csproj (2)

12-14: LGTM! Package reference changes align with centralized version management.

The removal of explicit version numbers from PackageReference elements is the correct approach when using centralized package version management through Directory.Packages.props.


12-14: Verify package versions in Directory.Packages.props.

Ensure that the versions for these packages are properly defined in Directory.Packages.props:

  • Microsoft.Extensions.DependencyInjection
  • Microsoft.Extensions.Options.ConfigurationExtensions
✅ Verification successful

Multiple versions found for the same packages. Version alignment needed.

Both packages are defined in Directory.Packages.props but with multiple versions:

  • Microsoft.Extensions.DependencyInjection: 2.1.1, 8.0.1, 9.0.0-rc.2.24473.5
  • Microsoft.Extensions.Options.ConfigurationExtensions: 2.1.1, 8.0.0, 9.0.0-rc.2.24473.5

Let's verify which version is actually being used in the project:


Let's check the global properties that might determine which version set is being used:


Package versions are correctly defined for multi-targeting scenarios

The multiple versions found in Directory.Packages.props are intentional and correct. The project targets multiple frameworks (net9.0, net8.0, netstandard2.0) as defined in Directory.Build.props, and the package versions align with these targets:

  • net9.0 uses v9.0.0-rc.2.24473.5
  • net8.0 uses v8.0.0/8.0.1
  • netstandard2.0 uses v2.1.1

The package references in the .csproj file correctly use centralized package version management without specifying versions, allowing the build system to select the appropriate version based on the target framework.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify package versions are defined in Directory.Packages.props
# Expected: Both package references should have corresponding version entries

echo "Checking Directory.Packages.props for package versions..."
rg -A 1 "Microsoft\.Extensions\.(DependencyInjection|Options\.ConfigurationExtensions)" Directory.Packages.props

Length of output: 1331


Script:

#!/bin/bash
# Check the target framework and other properties that might influence package versions
cat src/Cuemon.Extensions.DependencyInjection/Cuemon.Extensions.DependencyInjection.csproj

Length of output: 830


Script:

#!/bin/bash
# Check Directory.Build.props for target framework and other global properties
cat Directory.Build.props

Length of output: 4773

test/Cuemon.Resilience.Tests/Cuemon.Resilience.Tests.csproj (1)

8-8: LGTM! The package reference change aligns with centralized version management.

The removal of the explicit version for System.Net.Http package reference is consistent with the PR's objective of centralizing version management.

Let's verify that the version is properly defined in Directory.Packages.props:

✅ Verification successful

✓ System.Net.Http package version is properly centralized

The version (4.3.4) is correctly defined in Directory.Packages.props, confirming that the removal of the explicit version from the project file is safe and aligns with the centralized package version management objective.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify System.Net.Http version is defined in Directory.Packages.props
# Expected: Should find the package version definition

# Test: Search for System.Net.Http package version in Directory.Packages.props
rg -l 'PackageVersion.*System\.Net\.Http' Directory.Packages.props

# If not found in Directory.Packages.props, check if it's defined elsewhere
if [ $? -ne 0 ]; then
    echo "Searching in other potential locations..."
    fd -e props -e targets | xargs rg 'PackageVersion.*System\.Net\.Http'
fi

Length of output: 111


Script:

#!/bin/bash
# Let's check the actual version defined in Directory.Packages.props
cat Directory.Packages.props | grep -A 1 'System\.Net\.Http'

Length of output: 142

src/Cuemon.Extensions.Hosting/Cuemon.Extensions.Hosting.csproj (1)

12-14: Verify version specification in Directory.Packages.props

The removal of explicit version number aligns with the centralized version management strategy. However, let's ensure the version is properly specified in the central location.

✅ Verification successful

The results show multiple versions defined in Directory.Packages.props, so we need to verify which target frameworks this project uses to ensure the correct version mapping is in place.


Version management is properly configured in central files

The removal of explicit version numbers from the project file is correct as the versions are properly managed in Directory.Packages.props with appropriate versions for all target frameworks:

  • net9.0 → v9.0.0-rc.2.24473.5
  • net8.0 → v8.0.1
  • netstandard2.0 → v2.1.1

The project inherits these target frameworks from Directory.Build.props (net9.0;net8.0;netstandard2.0) and the package versions are correctly specified in Directory.Packages.props for each framework version.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify Microsoft.Extensions.Hosting version is defined in Directory.Packages.props
# Expected: Version specification for Microsoft.Extensions.Hosting package

# Test 1: Check if the package version is defined in Directory.Packages.props
echo "Checking Directory.Packages.props for Microsoft.Extensions.Hosting version..."
rg -A 1 "Microsoft\.Extensions\.Hosting" Directory.Packages.props

# Test 2: Verify no other version specifications exist
echo "Verifying no other version specifications exist..."
rg "Microsoft\.Extensions\.Hosting.*Version" .

Length of output: 1211


Script:

#!/bin/bash
# Let's check the target frameworks in the project file to understand which version applies
echo "Checking target frameworks in the project file..."
rg "<TargetFramework" src/Cuemon.Extensions.Hosting/Cuemon.Extensions.Hosting.csproj -A 1

# Also check if there's a global.json or other framework version control
echo "Checking for global.json..."
fd global.json

Length of output: 282


Script:

#!/bin/bash
# Let's check for TargetFrameworks (plural) as it might be using multiple targets
echo "Checking for multiple target frameworks..."
rg "<TargetFrameworks" src/Cuemon.Extensions.Hosting/Cuemon.Extensions.Hosting.csproj -A 1

# Let's also check if it inherits from a Directory.Build.props
echo "Checking Directory.Build.props for framework definitions..."
fd Directory.Build.props --exec rg -l "TargetFramework"

Length of output: 396


Script:

#!/bin/bash
# Let's check the target frameworks defined in Directory.Build.props
echo "Checking target frameworks in Directory.Build.props..."
rg "TargetFramework" Directory.Build.props -B 1 -A 1

# Also check if there are any conditions in Directory.Packages.props that map versions to frameworks
echo "Checking version conditions in Directory.Packages.props..."
rg "PackageVersion.*Microsoft\.Extensions\.Hosting" Directory.Packages.props -B 2 -A 2

Length of output: 2634

src/Cuemon.Data.SqlClient/Cuemon.Data.SqlClient.csproj (1)

18-18: LGTM! Verify version constraints in Directory.Packages.props

The removal of explicit version from System.Data.SqlClient package reference aligns with the PR objective of centralizing package version management.

Let's verify the version constraints in Directory.Packages.props:

✅ Verification successful

Version constraint verified in Directory.Packages.props

The version constraint for System.Data.SqlClient is properly set to 4.8.6 in Directory.Packages.props, which is the secure version that addresses known vulnerabilities. The centralized version management is correctly implemented.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify System.Data.SqlClient version constraints
# Expected: Should find version constraints in Directory.Packages.props

# Test 1: Check if Directory.Packages.props exists and contains System.Data.SqlClient version
rg -A 1 "System\.Data\.SqlClient" Directory.Packages.props

# Test 2: Look for any other files that might still have explicit versions
rg "System\.Data\.SqlClient.*Version=" "**/*.csproj"

Length of output: 302

test/Cuemon.Extensions.AspNetCore.Authentication.Tests/Cuemon.Extensions.AspNetCore.Authentication.Tests.csproj (1)

16-16: LGTM! Version removal aligns with centralized package management.

The removal of explicit version from PackageReference aligns with the PR's objective to centralize package version management.

Let's verify that the package version is properly defined in Directory.Packages.props:

✅ Verification successful

✅ Package version is properly defined in Directory.Packages.props

The package Codebelt.Extensions.Xunit.Hosting.AspNetCore is correctly defined in Directory.Packages.props with version 9.0.0-preview.11, which aligns with the centralized package management strategy.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify package version is defined in Directory.Packages.props
# Expected: Find the package version definition for Codebelt.Extensions.Xunit.Hosting.AspNetCore

# Test 1: Check if Directory.Packages.props exists and contains the package reference
rg -l "Codebelt\.Extensions\.Xunit\.Hosting\.AspNetCore" Directory.Packages.props

# Test 2: Show the package version definition
rg "<PackageVersion Include=\"Codebelt\.Extensions\.Xunit\.Hosting\.AspNetCore\"" -A 1 Directory.Packages.props

Length of output: 415

src/Cuemon.Extensions.Text.Json/Cuemon.Extensions.Text.Json.csproj (1)

12-14: 💡 Codebase verification

Verify central package version management for System.Text.Json

The removal of framework-specific versions in favor of an unversioned reference aligns with the PR's centralized version management approach. However, we should verify that the versions defined in Directory.Packages.props maintain compatibility across all target frameworks.

✅ Verification successful

Multiple version declarations found for System.Text.Json package

The Directory.Packages.props file contains conflicting version declarations for System.Text.Json:

  • Version 8.0.5 (declared twice)
  • Version 9.0.0-rc.2.24473.5

This could lead to version resolution issues and needs to be addressed to ensure consistent package versioning.


Central package versioning is correctly configured

The multiple System.Text.Json version declarations in Directory.Packages.props are intentional and properly configured:

  • Version 8.0.5 for netstandard2.x and net8.0 frameworks
  • Version 9.0.0-rc.2.24473.5 for net9.0 framework

The unversioned package reference in the project file is the correct approach as it allows the central package version management to select the appropriate version based on the target framework.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify System.Text.Json version management
# Expected: Directory.Packages.props should define the version and the package should be referenced without version in project files

# Check Directory.Packages.props for System.Text.Json version definition
echo "Checking Directory.Packages.props for System.Text.Json version:"
rg "System\.Text\.Json" Directory.Packages.props -A 1

# Verify no other project files have explicit versions for System.Text.Json
echo -e "\nChecking for any remaining explicit versions in other project files:"
fd -e csproj . | xargs rg "System\.Text\.Json.*Version="

Length of output: 666


Script:

#!/bin/bash
# Let's check the target frameworks in the project file to understand version requirements
echo "Checking target frameworks in Cuemon.Extensions.Text.Json.csproj:"
rg "<TargetFramework|<TargetFrameworks" src/Cuemon.Extensions.Text.Json/Cuemon.Extensions.Text.Json.csproj -A 1

# Let's also check if there are any conditional package references
echo -e "\nChecking for conditional package references:"
rg "<PackageReference.*System\.Text\.Json.*Condition" src/Cuemon.Extensions.Text.Json/Cuemon.Extensions.Text.Json.csproj

Length of output: 482


Script:

#!/bin/bash
# Let's try a different approach to check the target frameworks
echo "Checking project file content:"
cat src/Cuemon.Extensions.Text.Json/Cuemon.Extensions.Text.Json.csproj

# Let's also check the entire Directory.Packages.props file to understand the context of multiple versions
echo -e "\nChecking Directory.Packages.props content:"
cat Directory.Packages.props

Length of output: 5247

test/Cuemon.AspNetCore.Tests/Cuemon.AspNetCore.Tests.csproj (1)

18-18: Verify package version in Directory.Packages.props

The removal of explicit version aligns with the PR objective to centralize version management.

Let's verify the package version is properly defined:

✅ Verification successful

Preview dependencies need attention in Directory.Packages.props

The package version is defined in Directory.Packages.props but it's using a preview version (9.0.0-preview.11). Since this is a test project targeting both .NET 8.0 and 9.0, let's verify if we're using preview versions appropriately.


Preview package version is appropriate for .NET 9.0 testing

The use of preview version (9.0.0-preview.11) for Codebelt.Extensions.Xunit.Hosting.AspNetCore is appropriate as:

  • The test project targets .NET 9.0 (preview/RC) alongside .NET 8.0
  • Other .NET 9.0 dependencies are also using pre-release versions (rc.2)
  • This follows a consistent versioning strategy where preview packages are used for preview framework testing
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the package version is defined in Directory.Packages.props
# and verify it's not using a preview version in a stable release

# Test: Search for the package version definition
rg "Codebelt.Extensions.Xunit.Hosting.AspNetCore" "Directory.Packages.props"

# Test: Check if we're using preview versions
rg -i "preview" "Directory.Packages.props"

Length of output: 595


Script:

#!/bin/bash
# Check target frameworks in the test project
rg "TargetFrameworks" "test/Cuemon.AspNetCore.Tests/Cuemon.AspNetCore.Tests.csproj"

# Check if this is part of a broader preview/pre-release strategy
rg "PackageVersion" "Directory.Packages.props" -A 1 | rg -v "preview"

Length of output: 3576

tooling/gse/gse.csproj (2)

Line range hint 4-4: Consider updating TargetFramework to include net9.0

The PR objectives mention support for .NET 9, but this project only targets net8.0. Consider if this tool should also support .NET 9.

#!/bin/bash
# Description: Check .NET framework targeting across the solution
# Expected: Understand if other projects have been updated to net9.0

# Test: Check target framework patterns across all project files
echo "Checking TargetFramework patterns across solution..."
rg "TargetFramework" "**/*.csproj" -A 1

22-22: Verify package version in Directory.Packages.props

The removal of explicit version from Codebelt.Extensions.YamlDotNet package reference aligns with the PR's objective of centralizing version management. Let's verify that this package is properly configured in the central version management file.

✅ Verification successful

Package version is properly configured in central management

The package Codebelt.Extensions.YamlDotNet is correctly defined in Directory.Packages.props with version 9.0.0-preview.5, and the project file correctly references it without an explicit version, following the centralized package version management pattern.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the package version is defined in Directory.Packages.props
# Expected: Find the package version definition in Directory.Packages.props

# Test 1: Check if the package is defined in Directory.Packages.props
echo "Checking Directory.Packages.props for Codebelt.Extensions.YamlDotNet version..."
rg -A 1 "Codebelt\.Extensions\.YamlDotNet" "Directory.Packages.props"

# Test 2: Ensure no other explicit versions remain in project files
echo "Verifying no other explicit versions exist in project files..."
rg "Include=\"Codebelt\.Extensions\.YamlDotNet\"\s+Version=" "**/*.csproj"

Length of output: 301


Script:

#!/bin/bash
# Let's verify with more precise commands and handle potential file location issues

# Test 1: First, let's find the Directory.Packages.props file
echo "Locating Directory.Packages.props..."
fd "Directory.Packages.props"

# Test 2: If found, check its content for the package
echo "Checking package version definition..."
fd "Directory.Packages.props" --exec cat {}

# Test 3: Find all csproj files to verify the context
echo "Locating csproj files..."
fd ".+\.csproj$"

# Test 4: If found, check content of gse.csproj
echo "Checking gse.csproj content..."
fd "gse.csproj" --exec cat {}

Length of output: 11283

src/Cuemon.Extensions.Threading/Cuemon.Extensions.Threading.csproj (2)

13-16: LGTM! Package version centralization and conditional compilation look good.

The removal of explicit version for Backport.System.Threading.Lock aligns with the centralized version management approach. The conditional Using directives properly handle compatibility between .NET 9.0 and earlier versions.


19-21: LGTM! Clean separation of reference types.

Moving the ProjectReference to a separate ItemGroup improves code organization by clearly separating package references from project references.

src/Cuemon.Extensions.Net/Cuemon.Extensions.Net.csproj (2)

12-14: LGTM! Package reference consolidation looks good.

The consolidation of framework-specific package references into a single versionless entry aligns with the central package management approach.


12-14: Verify Microsoft.Extensions.Http version in Directory.Packages.props

Let's ensure the package version is properly defined in the central props file.

✅ Verification successful

Microsoft.Extensions.Http package version is properly defined in Directory.Packages.props

The package version is correctly defined in Directory.Packages.props with different versions based on target framework:

  • Version 2.1.1 for netstandard2.x
  • Version 8.0.1 for net8.0
  • Version 9.0.0-rc.2.24473.5 for net9.0
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that Microsoft.Extensions.Http is defined in Directory.Packages.props
# Expected: Should find the package version definition

# Look for the package version in Directory.Packages.props
rg -A 1 "Microsoft\.Extensions\.Http" "**/Directory.Packages.props"

Length of output: 137


Script:

#!/bin/bash
# Let's first check if the file exists with a different name or location
fd -g "*Packages.props" -g "*packages.props"

# Also check for any .props files that might contain package versions
fd -g "*.props" -x grep -l "Microsoft.Extensions.Http" {} \;

# Check if package versions are defined in the project file itself
cat src/Cuemon.Extensions.Net/Cuemon.Extensions.Net.csproj

Length of output: 1373


Script:

#!/bin/bash
# We found Directory.Packages.props, let's check its content
cat Directory.Packages.props

Length of output: 4088

test/Cuemon.AspNetCore.Mvc.Tests/Cuemon.AspNetCore.Mvc.Tests.csproj (1)

19-19: LGTM! Package version centralization looks good.

The removal of explicit version for Codebelt.Extensions.Xunit.Hosting.AspNetCore aligns with the PR objective of centralizing package version management in Directory.Packages.props.

Let's verify the version resolution:

✅ Verification successful

✅ Package version centralization verified successfully

The verification confirms:

  • Package version (9.0.0-preview.11) is properly defined in Directory.Packages.props
  • No explicit versions found in any .csproj files
  • All references to the package are using the centralized version management
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the package version is properly defined in Directory.Packages.props
# and that there are no conflicting version definitions

# Test 1: Check if the package is defined in Directory.Packages.props
rg -A 1 "Codebelt\.Extensions\.Xunit\.Hosting\.AspNetCore" "Directory.Packages.props"

# Test 2: Check for any remaining explicit versions of this package in other test projects
rg "Codebelt\.Extensions\.Xunit\.Hosting\.AspNetCore.*Version" "**/*.csproj"

Length of output: 411


Script:

#!/bin/bash
# Let's try a different approach to find any remaining explicit versions in csproj files
fd "\.csproj$" --exec rg "Codebelt\.Extensions\.Xunit\.Hosting\.AspNetCore.*Version"

# Also verify if the package is referenced in other projects
fd "\.csproj$" --exec rg "Codebelt\.Extensions\.Xunit\.Hosting\.AspNetCore"

Length of output: 1124

test/Cuemon.Extensions.AspNetCore.Tests/Cuemon.Extensions.AspNetCore.Tests.csproj (2)

20-20: Verify package version in Directory.Packages.props

The removal of explicit version aligns with the centralized version management approach. However, since this package was previously using a preview version (9.0.0-preview.11), we should ensure the version specified in Directory.Packages.props is compatible.

✅ Verification successful

Version compatibility verified - no changes needed

The version specified in Directory.Packages.props (9.0.0-preview.11) matches exactly with the previously used version in the project file. This confirms that the centralization of package versions maintains the same dependency version, ensuring compatibility.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check the version specified in Directory.Packages.props and verify it's not a downgrade
# that could break compatibility

# Look for the package version in Directory.Packages.props
rg -A 1 "Codebelt\.Extensions\.Xunit\.Hosting\.AspNetCore" Directory.Packages.props

Length of output: 280


20-20: Ensure test suite passes with centralized package version

Since this is a test project and we're changing the package version management, it's crucial to verify that all tests continue to pass, especially given the previous use of a preview version.

✅ Verification successful

Package version is properly managed in central version control

The package Codebelt.Extensions.Xunit.Hosting.AspNetCore is already centrally managed in Directory.Packages.props with version "9.0.0-preview.11". The test project is configured to target both net9.0 and net8.0, and all necessary test infrastructure packages are properly versioned in the central package management file. No issues were found that would affect test execution.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Look for any conditional compilation or version-specific test code that might be affected

# Search for version-specific test code or conditional compilation
rg -g "*.cs" -A 5 "net9\.0|net8\.0|preview" test/Cuemon.Extensions.AspNetCore.Tests/

# Look for any TODO/HACK comments related to versioning
rg -g "*.cs" "TODO|HACK|FIXME" test/Cuemon.Extensions.AspNetCore.Tests/

Length of output: 160


Script:

#!/bin/bash
# Let's gather more comprehensive information about the test project

# Check the target framework in the project file
cat test/Cuemon.Extensions.AspNetCore.Tests/Cuemon.Extensions.AspNetCore.Tests.csproj

# Look for test files and their dependencies
fd . test/Cuemon.Extensions.AspNetCore.Tests/ -e cs -x head -n 20 {}

# Check if there are any explicit version references in the Directory.Build.props/targets
fd "Directory.Build.props|Directory.Build.targets" . -x cat {}

# Look for package version management files
fd "Directory.Packages.props|Packages.props" . -x cat {}

Length of output: 17838

test/Cuemon.Core.Tests/Cuemon.Core.Tests.csproj (3)

Line range hint 8-15: LGTM: Appropriate resource management for test assets

The move from None to EmbeddedResource is the correct approach for test data files that need to be packaged with the test assembly.


22-24: Verify System.Net.Http compatibility with .NET Framework 4.x

While centralizing the version is good, ensure the centrally defined version of System.Net.Http is compatible with .NET Framework 4.x targets.

#!/bin/bash
# Description: Check the defined version of System.Net.Http and target framework support
# Expected: Should find version definition and framework targets

echo "Checking System.Net.Http version and framework targets..."
rg -A 2 "System\.Net\.Http" "Directory.Packages.props"
rg "TargetFramework" "Directory.Build.props"

18-19: Verify package versions in Directory.Packages.props

The removal of version numbers aligns with the centralized version management approach. Let's verify these packages are properly defined in the central configuration.

✅ Verification successful

Let me try another search pattern to find these specific packages.


Package versions are properly defined in Directory.Packages.props

Both packages have their versions centrally defined:

  • AutoFixture: Version="4.18.1"
  • NativeLibraryLoader: Version="1.0.13"

The removal of version numbers from the project file is correct as it follows the centralized package version management approach enabled by ManagePackageVersionsCentrally.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the packages have versions defined in Directory.Packages.props
# Expected: Both AutoFixture and NativeLibraryLoader should have version entries

echo "Checking Directory.Packages.props for package versions..."
rg -A 1 "AutoFixture|NativeLibraryLoader" "Directory.Packages.props"

Length of output: 697


Script:

#!/bin/bash
# Search for AutoFixture and NativeLibraryLoader in Directory.Packages.props with a more lenient pattern
echo "Searching Directory.Packages.props for package versions..."
cat Directory.Packages.props

# Also check if there are any other props files that might contain package versions
echo -e "\nChecking for other props files..."
fd "\.props$"

Length of output: 4361

test/Cuemon.Data.Tests/Cuemon.Data.Tests.csproj (2)

32-39: Review netstandard2 conditional references

While the version centralization looks good, consider reviewing the netstandard2 condition given the project's move towards .NET 9 support. Ensure these dependencies are still necessary for backward compatibility.

#!/bin/bash
# Description: Check target framework references across the solution
# Expected: Understand the broader framework targeting strategy

# Check target frameworks in project files
rg -l "TargetFramework" | xargs cat | rg "TargetFramework"

# Check netstandard2 conditions across solution
rg "Condition.*netstandard2" 

28-30: Verify package versions in Directory.Packages.props

The removal of explicit versions aligns with the centralized version management approach. However, we should ensure these packages are properly defined in Directory.Packages.props.

✅ Verification successful

Package versions are properly defined in Directory.Packages.props

Both packages are correctly configured in the central version management:

  • Codebelt.Extensions.Xunit.Hosting is defined with version "9.0.0-preview.11"
  • Microsoft.Data.Sqlite is defined with framework-specific versions:
    • net4: 6.0.35
    • net8: 8.0.10
    • net9: 9.0.0-rc.2.24474.1

The removal of explicit versions from the project file is correct as it aligns with the centralized package version management approach.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify package versions are defined in Directory.Packages.props
# Expected: Both packages should have version entries

rg -A 1 "Microsoft\.Data\.Sqlite" "Directory.Packages.props"
rg -A 1 "Codebelt\.Extensions\.Xunit\.Hosting" "Directory.Packages.props"

Length of output: 3944


Script:

#!/bin/bash
# Let's try a different approach to find package versions in Directory.Packages.props
cat Directory.Packages.props

Length of output: 4088


Script:

#!/bin/bash
# Let's verify the target frameworks of the test project
cat test/Cuemon.Data.Tests/Cuemon.Data.Tests.csproj | rg "TargetFramework"

Length of output: 146

Directory.Packages.props (3)

1-5: LGTM! Proper setup of central package management.

The configuration correctly enables central package version management using the recommended approach.


57-64: Verify latest RC2 versions for .NET 9.

The .NET 9 section uses RC2 versions which is appropriate for early .NET 9 support. However, ensure these are the latest RC2 builds available:

  • Microsoft.Data.Sqlite: 9.0.0-rc.2.24474.1
  • Microsoft.Extensions.*: 9.0.0-rc.2.24473.5
  • System.Text.Json: 9.0.0-rc.2.24473.5

Let's check for any newer RC2 versions:

#!/bin/bash
# Look for any version references in the solution to verify consistency
rg "9\.0\.0-rc\.2\.[0-9]+" --type xml

34-46: Verify compatibility of mixed package versions in .NET Standard 2.x.

The .NET Standard 2.x section mixes very different package versions:

  • Microsoft.Extensions.* packages are on 2.1.1
  • System.Text.Json is on 8.0.5
  • Microsoft.Bcl.AsyncInterfaces is on 8.0.0

This mixing of versions could lead to compatibility issues.

Let's check the support status of these packages:

✅ Verification successful

Based on the README.md content and the context, I can generate a final response:

Mixed package versions in .NET Standard 2.x are intentional and compatible

The project explicitly supports .NET Standard 2.x as part of its multi-targeting strategy, alongside modern .NET versions. The mixing of package versions is deliberate:

  • Microsoft.Extensions.* 2.1.1 packages are from the last LTS version that supported .NET Standard 2.0
  • System.Text.Json 8.0.5 and Microsoft.Bcl.AsyncInterfaces 8.0.0 are newer packages that maintain backwards compatibility with .NET Standard 2.0

This is a common pattern for libraries supporting both legacy and modern frameworks, where newer packages are used when they maintain backwards compatibility, while stable LTS versions are kept for core infrastructure packages.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if there are any references to these specific versions in the solution
rg -l "Microsoft.Extensions.*2\.1\.1"

# Look for any package compatibility documentation
fd -g "*.md" -x grep -l "Microsoft.Extensions.*2\.1\.1"

Length of output: 133


Script:

#!/bin/bash
# Let's try a different approach to check package references and versions

# Search for package references in all XML files (including props and csproj)
rg -t xml "PackageVersion.*Microsoft\.Extensions|PackageReference.*Microsoft\.Extensions" -A 1

# Check for any documentation about .NET Standard support
fd README.md -x cat {}

# Look for target framework specifications
rg -t xml "TargetFramework.*netstandard"

Length of output: 21614

Directory.Build.props (3)

77-92: LGTM! Package configurations are properly structured.

The test package references are well-organized with appropriate asset configurations:

  • Runtime packages (test framework, SDK) are correctly configured without asset restrictions
  • Build-time tools (runners, coverage) properly use PrivateAssets/IncludeAssets to prevent dependency leakage

50-51: LGTM! Verify version definitions in Directory.Packages.props.

The removal of explicit versions and configuration of PrivateAssets for build tools is correct. This change aligns with the centralized version management approach.

#!/bin/bash
# Verify that versions for these packages are defined in Directory.Packages.props
echo "Checking for package version definitions..."
rg -A 1 'Microsoft\.SourceLink\.GitHub|MinVer' Directory.Packages.props

78-78: Verify Linux/.NET Framework test configuration.

The conditional reference to Microsoft.TestPlatform.ObjectModel for Linux/.NET Framework scenarios should be validated to ensure it properly handles all test scenarios.

✅ Verification successful

Let me gather more information about the test projects and their framework configurations.


Let me check the specific test projects that target .NET Framework and their Linux-specific configurations.


Let me check one final aspect - the actual test execution configuration and test platform settings.


Based on the gathered information, I can now provide a final response:

The Microsoft.TestPlatform.ObjectModel reference is correctly configured for Linux/.NET Framework test scenarios.

The configuration is properly set up because:

  • The package reference is conditionally included only when needed ($(TargetFramework.StartsWith('net4')) AND '$(IsLinux)' == 'true')
  • Test projects are executed on both Linux (ubuntu-22.04) and Windows environments in CI pipeline
  • The test infrastructure includes proper test SDK and runner configurations for cross-platform testing
  • No existing issues were found related to test platform compatibility
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for potential test projects that might be affected
echo "Checking for .NET Framework test projects..."
find . -name "*.csproj" -type f -exec grep -l "net4" {} \;

# Verify no existing issues are reported
echo "Checking for related GitHub issues..."
gh issue list --search "in:title Microsoft.TestPlatform.ObjectModel Linux"

Length of output: 600


Script:

#!/bin/bash
# Check the actual framework configurations in test projects
echo "Checking framework configurations in test projects..."
for proj in $(find . -name "*.csproj" -type f); do
  echo "=== $proj ==="
  grep -A 5 "TargetFramework" "$proj"
done

# Check if there are any Linux-specific test configurations or CI workflows
echo -e "\nChecking for Linux CI configurations..."
find . -type f -name "*.yml" -o -name "*.yaml" | while read -r file; do
  echo "=== $file ==="
  grep -i "linux" "$file"
done

Length of output: 42367


Script:

#!/bin/bash
# Check test projects with .NET Framework target and their configurations
echo "Checking test projects with .NET Framework targets..."
for proj in ./test/Cuemon.Core.Tests/Cuemon.Core.Tests.csproj \
           ./test/Cuemon.Extensions.Net.Tests/Cuemon.Extensions.Net.Tests.csproj \
           ./test/Cuemon.Net.Tests/Cuemon.Net.Tests.csproj \
           ./test/Cuemon.Resilience.Tests/Cuemon.Resilience.Tests.csproj \
           ./test/Cuemon.Xml.Tests/Cuemon.Xml.Tests.csproj; do
    echo "=== $proj ==="
    cat "$proj" | grep -A 10 "<TargetFramework"
done

# Check CI pipeline configuration for test execution
echo -e "\nChecking test execution in CI pipeline..."
cat ./.github/workflows/pipelines.yml | grep -A 10 "test:"

Length of output: 3213


Script:

#!/bin/bash
# Check Directory.Build.props for test configurations
echo "Checking Directory.Build.props for test configurations..."
cat Directory.Build.props | grep -A 10 -B 10 "Microsoft.TestPlatform.ObjectModel"

# Check test projects for VSTest settings
echo -e "\nChecking test projects for VSTest settings..."
for proj in ./test/Cuemon.Core.Tests/Cuemon.Core.Tests.csproj \
           ./test/Cuemon.Extensions.Net.Tests/Cuemon.Extensions.Net.Tests.csproj \
           ./test/Cuemon.Net.Tests/Cuemon.Net.Tests.csproj \
           ./test/Cuemon.Resilience.Tests/Cuemon.Resilience.Tests.csproj \
           ./test/Cuemon.Xml.Tests/Cuemon.Xml.Tests.csproj; do
    echo "=== $proj ==="
    cat "$proj" | grep -B 5 -A 5 "VSTest"
done

Length of output: 3994

README.md (2)

6-6: LGTM! Clear framework support declaration.

The framework support statement accurately reflects the current state of the project, clearly indicating support for .NET 9, .NET 8, .NET Standard 2, and legacy .NET Framework 4.6.2.


12-14: LGTM! Clear version support and deprecation notice.

The version support details are well-documented with:

  • Clear indication of .NET 9 (STS) and .NET 8 (LTS) support
  • Explicit deprecation notice for older versions
  • Important information about version 8.3.1 being the last to support .NET 7
src/Cuemon.Extensions.Globalization/Cuemon.Extensions.Globalization.csproj (2)

Line range hint 13-1201: Well-organized resource management structure.

The project demonstrates excellent organization of culture-specific resources:

  • Proper use of EmbeddedResource for culture-specific binaries
  • Comprehensive coverage of global cultures
  • Clear and consistent naming convention

1203-1203: Package reference updated to use centralized version management.

The removal of explicit version number aligns with the PR objective of centralizing package versions in Directory.Packages.props.

Let's verify the package version is properly defined in Directory.Packages.props:

✅ Verification successful

Package reference correctly configured in centralized version management

The package Codebelt.Extensions.YamlDotNet is properly defined in Directory.Packages.props with version 9.0.0-preview.5, confirming successful migration to centralized version management.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify package version is defined in Directory.Packages.props
# Expected: Should find the package version definition

rg -l "Codebelt\.Extensions\.YamlDotNet" "Directory.Packages.props"

Length of output: 92


Script:

#!/bin/bash
# Let's check the actual content to verify the package version is properly defined
rg "Codebelt\.Extensions\.YamlDotNet" "Directory.Packages.props" -A 2 -B 2

Length of output: 524

test/Cuemon.AspNetCore.Mvc.FunctionalTests/Filters/Diagnostics/FaultDescriptorFilterTest.cs (1)

Line range hint 556-1182: LGTM! Comprehensive XML format testing.

The implementation provides thorough coverage of XML formatting for different sensitivity levels and fault descriptor options. The tests effectively validate:

  • XML structure and content
  • Different sensitivity levels
  • Both ProblemDetails and FaultDetails formats

Copy link

codecov bot commented Nov 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.61%. Comparing base (2012856) to head (dde4281).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #99   +/-   ##
=======================================
  Coverage   79.61%   79.61%           
=======================================
  Files         607      607           
  Lines       18625    18625           
  Branches     1897     1897           
=======================================
  Hits        14828    14828           
  Misses       3729     3729           
  Partials       68       68           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@gimlichael gimlichael merged commit 991c52d into main Nov 11, 2024
173 checks passed
@gimlichael gimlichael deleted the v9.0.0/cpm branch November 11, 2024 07:46
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.

1 participant