Skip to content

Conversation

@PTKu
Copy link
Contributor

@PTKu PTKu commented Aug 15, 2025

This pull request introduces several optimizations and improvements to the references loader in the AX# project. The main changes include:

  • Enhanced Logging: Improves the logging mechanism to provide better insights during project reference processing, making debugging and maintenance easier.
  • Optimized Project Reference Processing: Refactors and streamlines how project references are handled, resulting in more efficient and reliable reference resolution.
  • Streamlined Target Framework Handling: Updates the logic in CsProject.cs to handle target frameworks more effectively, reducing complexity and potential errors.

PTKu added 2 commits August 15, 2025 12:57
- Added Serilog for improved debugging in CsProject.cs.
- Optimized project reference handling to reduce redundancy.
- Introduced precompiled regex for faster target framework evaluations.
- Updated fallback target framework to "net9.0".
- Enhanced logging in ElementConditionPasses for better traceability.
- Improved Evaluate method for expanded conditions handling.
- Updated launchSettings.json for verbosity and corrected paths.
Refactored the code to replace nested loops for iterating
over target frameworks with a single assignment that selects
the first target framework. This simplification reduces
iterations and conditions checked. Additionally, adjusted
condition checks for `PackageReference` elements to ensure
correct evaluation based on the new structure, enhancing
code clarity and efficiency.
@PTKu PTKu marked this pull request as ready for review August 15, 2025 11:38
@PTKu PTKu requested a review from kuh0005 August 15, 2025 11:39
Modified the test to assert that "PkgOnlyNet9" is not included
in the references, reflecting a focus on a single target framework.
The previous assertion for its presence has been commented out.
@PTKu PTKu merged commit c6025eb into dev Aug 15, 2025
2 checks passed
@PTKu PTKu deleted the optimization-references-loader branch August 15, 2025 12:01
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