Repository navigation
Migrate solution to .slnx and add DI/startup test coverage for observability registrations - #25
Merged
Merged
Conversation
Co-authored-by: frasermolyneux <34033625+frasermolyneux@users.noreply.github.com>
Co-authored-by: frasermolyneux <34033625+frasermolyneux@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Modernise .NET solution and target framework
Migrate solution to .slnx and add DI/startup test coverage for observability registrations
Aug 31, 2026
frasermolyneux
marked this pull request as ready for review
August 31, 2026 20:28
There was a problem hiding this comment.
🟢 Approval recommended
The changes are scoped to solution modernisation and additive test coverage, with only minor follow-up nits identified in the new test code.
Pull request overview
Modernises the repository’s solution format to .slnx and adds targeted unit tests that exercise the public DI/startup registration surface (AddObservability*) across the core library and host adapters, aligning with the repo’s multi-targeted net9/net10 setup.
Changes:
- Migrated the solution from legacy
.slnto SDK-style.slnx, removed the old.sln, and updated documentation references. - Added DI/startup-focused unit tests for core registrations (
AddObservabilityCore,AddAuditLogging,AddJobTelemetry) and adapter registrations (ASP.NET Core + WorkerServiceAddObservability). - Updated the test project to reference adapter projects and pinned
Microsoft.Extensions.DependencyInjectionto avoid the known diamond-dependency ambiguity; addedMicrosoft.AspNetCore.Appframework reference for adapter test compilation.
File summaries
| File | Description |
|---|---|
| src/MX.Observability.ApplicationInsights.Tests/Extensions/ServiceCollectionExtensionsTests.cs | Adds unit tests covering core service registrations and option binding defaults/overrides. |
| src/MX.Observability.ApplicationInsights.Tests/AspNetCore/ServiceCollectionExtensionsTests.cs | Adds unit tests for ASP.NET Core adapter DI wiring and telemetry-processor integration. |
| src/MX.Observability.ApplicationInsights.Tests/WorkerService/ServiceCollectionExtensionsTests.cs | Adds unit tests for WorkerService adapter DI wiring and telemetry-processor integration. |
| src/MX.Observability.ApplicationInsights.Tests/MX.Observability.ApplicationInsights.Tests.csproj | Adds adapter project references, framework reference, and pins DI package to resolve transitive conflicts. |
| src/MX.Observability.ApplicationInsights.slnx | Introduces the new .slnx solution file. |
| src/MX.Observability.ApplicationInsights.sln | Removes the legacy .sln solution file. |
| AGENTS.md | Updates solution path and validation commands to use .slnx. |
| .github/copilot-instructions.md | Updates solution path and validation commands to use .slnx. |
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: frasermolyneux <34033625+frasermolyneux@users.noreply.github.com>
Co-authored-by: frasermolyneux <34033625+frasermolyneux@users.noreply.github.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files
|
|
This was referenced Sep 1, 2026
This was referenced Sep 6, 2026
This was referenced Sep 13, 2026
Bump Azure.Extensions.AspNetCore.DataProtection.Blobs and 18 others
frasermolyneux/trip-side-kick#37
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Repository still used a legacy
.slnand had no test coverage for the package's DI/startup registration paths (AddObservability*), despite all projects already targetingnet9.0;net10.0with SDK-style project files.Solution format
src/MX.Observability.ApplicationInsights.slntosrc/MX.Observability.ApplicationInsights.slnxviadotnet sln migrate; removed the legacy.sln.AGENTS.mdand.github/copilot-instructions.mdreferences accordingly.dotnet-ciaction already auto-discovers solutions and caches keyed on**/*.slnx.Test coverage
Added unit tests for previously-untested DI wiring:
AddObservabilityCore,AddAuditLogging,AddJobTelemetry— registration, lifetimes, safe-default option binding.AddObservabilityregisters core services and correctly wiresTelemetryFilterProcessorinto the Application Insights SDK'sITelemetryProcessorFactorypipeline:Dependency fix (test-only)
Referencing the AspNetCore/WorkerService adapter projects from the test project surfaced a diamond-dependency conflict:
Microsoft.ApplicationInsights.AspNetCore2.23.0 transitively pullsMicrosoft.Extensions.DependencyInjection2.1.1, which collides with the net9/net10 framework-provided version (CS0433ambiguousServiceCollection). Pinned an explicitMicrosoft.Extensions.DependencyInjection10.0.11PackageReferencein the test project only — no production package versions changed.