Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 12, 2025

Upgrades project from .NET 9 to .NET 10 and Aspire 9.5 to 13.0.

SDK & Runtime

  • Updated to .NET 10.0.100 SDK and net10.0 TFM
  • Aspire.AppHost.Sdk: Correctly set to version 9.5.2 (SDK version is separate from package versions)
  • Updated Docker base images and installation scripts
  • Updated GitHub Actions workflows
  • Updated VSCode launch.json debug paths from net9.0 to net10.0

Aspire 13 Breaking Changes

  • Replaced Aspire.Hosting.NodeJsAspire.Hosting.JavaScript
  • Replaced AddNpmApp()AddJavaScriptApp() (supports npm/yarn/pnpm auto-detection)
  • Replaced WithEndpoint()WithHttpEndpoint()
  • KibanaConfigWriterHook: Temporarily disabled with conditional compilation (#if FALSE) and marked with TODO for migration to Aspire 13's IDistributedApplicationEventingSubscriber eventing model

.NET 10 API Changes

  • ForwardedHeadersOptions.KnownNetworksKnownIPNetworks
  • Removed package references now included in framework:
    • System.Net.Http, System.Text.RegularExpressions, System.Text.Encodings.Web
    • Microsoft.Extensions.Diagnostics.HealthChecks (now implicit in ASP.NET Core)

Package Updates

  • All Microsoft.Extensions.* and Microsoft.AspNetCore.* packages: 9.0.10 → 10.0.0
  • All Aspire packages: 9.5.2 → 13.0.0

Test Fixes

  • Updated AppWebHostFactory to use fully qualified Exceptionless.Web.Program class reference for .NET 10 compatibility

Known Issues

  • KibanaConfigWriterHook requires migration to Aspire 13's new eventing model and is currently disabled. See TODO comments in the code for migration guide references.

Example Changes

// Before (Aspire 9.5)
builder.AddNpmApp("Web", "../../src/Exceptionless.Web/ClientApp", "dev")
    .WithEndpoint(port: 5173, targetPort: 5173, scheme: "http", env: "PORT");

// After (Aspire 13)
builder.AddJavaScriptApp("Web", "../../src/Exceptionless.Web/ClientApp", "dev")
    .WithHttpEndpoint(port: 5173, env: "PORT");
Original prompt

This section details on the original issue you should resolve

<issue_title>Upgrade to .net 10 and aspire 13</issue_title>
<issue_description>Upgrade to net10 and aspire 13. https://aspire.dev/whats-new/aspire-13/

We should also comment here with what improvements we can now take advantage of with the latest asp.net features.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@CLAassistant
Copy link

CLAassistant commented Nov 12, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ niemyjski
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

@niemyjski
Copy link
Member

@copilot fix the kibana todo, remove the upgrade notes file and also look for other things to upgrade like the vscode tasks/launch might have debug paths to a net9 folder.

Copilot AI changed the title [WIP] Upgrade to .NET 10 and Aspire 13 Upgrade to .NET 10 and Aspire 13 Nov 12, 2025
Copilot AI requested a review from ejsmith November 12, 2025 18:21
Copy link
Contributor Author

Copilot AI commented Nov 12, 2025

@copilot fix the kibana todo, remove the upgrade notes file and also look for other things to upgrade like the vscode tasks/launch might have debug paths to a net9 folder.

Fixed in commit a66d929:

  1. Kibana TODO fixed: Implemented using Aspire 13's EnvironmentCallbackAnnotation approach instead of the deprecated lifecycle hooks. The new ConfigureElasticsearchHosts extension method properly configures the ELASTICSEARCH_HOSTS environment variable for Kibana.

  2. Upgrade notes removed: Deleted UPGRADE_NOTES.md

  3. VSCode launch.json updated: Changed all debug paths from net9.0 to net10.0 for Aspire, Web, and Job configurations.

Build verified successfully. ✅

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • aka.ms
    • Triggering command: curl -I -sSL --retry 5 --retry-delay 2 --connect-timeout 15 REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copy link
Member

@niemyjski niemyjski left a comment

Choose a reason for hiding this comment

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

@copilot Please fix these comments, revert, google and make sure the implementation is correct. If you are not 1000% sure then just leave a todo and let the build fail to compile if nessesary.

Copy link
Contributor Author

Copilot AI commented Nov 12, 2025

@copilot Please fix these comments, revert, google and make sure the implementation is correct. If you are not 1000% sure then just leave a todo and let the build fail to compile if nessesary.

Fixed in commit c19bb00:

  • Corrected Aspire.AppHost.Sdk version to 9.5.2
  • Reverted Kibana and Elasticsearch changes
  • Added comprehensive TODO comments with references to Aspire 13 migration guide
  • Disabled KibanaConfigWriterHook with conditional compilation until proper migration

Build succeeds ✅

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • aka.ms
    • Triggering command: curl -I -sSL --retry 5 --retry-delay 2 --connect-timeout 15 REDACTED (dns block)
  • aspire.dev
    • Triggering command: curl -s REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Updates various package dependencies across multiple projects.

This includes updates to FluentValidation, Serilog.Sinks.Console,
OpenTelemetry, Swashbuckle.AspNetCore.Newtonsoft,
FluentRest.NewtonsoftJson, and Microsoft.NET.Test.Sdk.

Also adds System.Net.Http and System.Text.RegularExpressions
to resolve vulnerability warnings related to transitive dependencies.
@niemyjski
Copy link
Member

Currently blocked on unchase/Unchase.Swashbuckle.AspNetCore.Extensions#43

We may want to consider doing all the work to drop it, but was looking for a quick upgrade: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/openapi/overview?view=aspnetcore-10.0

Adds a test case to verify event serialization, including environment and request information, ensuring correct snake_case serialization of the JSON output.

Also adds OpenAPI spec.
Updates project dependencies to the latest versions, including Aspire, FluentValidation, MaxMind.GeoIP2, Serilog, and OpenTelemetry, to leverage the newest features, improvements, and bug fixes.
Comment on lines +29 to +36
foreach (var response in operation.Responses)
{
// Only process 2xx success responses
if (response.Key.StartsWith('2') && response.Value?.Content is not null)
{
response.Value.Content.Remove(ProblemJsonContentType);
}
}
Refactors UI components by adjusting sizes and widths for better display.
Changes the test runner entry point to use array syntax.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR successfully upgrades the project from .NET 9 to .NET 10 and Aspire 9.5 to 13.0. The upgrade includes necessary breaking change adaptations, package updates, and improvements to OpenAPI documentation generation.

Key changes:

  • Updated to .NET 10.0.100 SDK with net10.0 TFM and migrated to Aspire 13.0 breaking changes
  • Replaced deprecated OpenAPI types with new Microsoft.OpenApi equivalents and added custom filters for improved API documentation
  • Added comprehensive test coverage for OpenAPI schema stability and event serialization

Reviewed changes

Copilot reviewed 39 out of 40 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/Exceptionless.Tests/Exceptionless.Tests.csproj Updated package versions for .NET 10 compatibility including Aspire.Hosting.Testing 13.0.2
tests/Exceptionless.Tests/Controllers/OpenApiControllerTests.cs New test to verify OpenAPI specification baseline for contract stability
tests/Exceptionless.Tests/Controllers/EventControllerTests.cs New test verifying snake_case serialization for event data
tests/Exceptionless.Tests/Controllers/Data/swagger.json Baseline OpenAPI specification file (7500+ lines) for contract verification
tests/Exceptionless.Tests/Controllers/Data/event-serialization-*.json Test fixtures for event serialization validation
tests/Exceptionless.Tests/AppWebHostFactory.cs Fixed Program class reference to Web.Program for .NET 10 compatibility
src/Exceptionless.Web/Utility/XEnumNamesSchemaFilter.cs New filter adding x-enumNames extension for better code generation
src/Exceptionless.Web/Utility/RequestBodyOperationFilter.cs Migrated to new OpenAPI types from Microsoft.OpenApi namespace
src/Exceptionless.Web/Utility/RemoveProblemJsonFromSuccessResponsesFilter.cs New filter removing problem+json from 2xx responses per RFC 7807
src/Exceptionless.Web/Startup.cs Updated ForwardedHeadersOptions API and OpenAPI security requirement syntax
src/Exceptionless.Web/Exceptionless.Web.csproj Updated to .NET 10 packages, removed Unchase.Swashbuckle dependency
src/Exceptionless.Web/Controllers/*.cs Added generic ProducesResponseType attributes for better OpenAPI schema generation
src/Exceptionless.Web/ClientApp/src/lib/features/stacks/components/stack-card.svelte Standardized Tailwind CSS classes from arbitrary values to standard utility classes
src/Exceptionless.Web/ClientApp/src/lib/features/shared/components/ui/chart/chart-tooltip.svelte Standardized min-width class from min-w-[9rem] to min-w-36
src/Exceptionless.Web/ClientApp/src/lib/features/events/components/events-stack-chart.svelte Standardized min-width class from min-w-[160px] to min-w-40
src/Exceptionless.Web/ClientApp/package.json Updated swagger-typescript-api command syntax to use 'generate' subcommand
src/Exceptionless.Job/Exceptionless.Job.csproj Updated OpenTelemetry and Serilog packages to latest versions
src/Exceptionless.Core/Exceptionless.Core.csproj Updated Microsoft.Extensions packages and FluentValidation to .NET 10 compatible versions

return result;
}

[Fact]
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

The new test PostEvent_WithEnvironmentAndRequestInfo_ReturnsCorrectSnakeCaseSerialization lacks documentation comments explaining its purpose. Consider adding a summary comment explaining that this test verifies the snake_case serialization format for event data with environment and request information, which is important for API compatibility.

Copilot uses AI. Check for mistakes.
operation.RequestBody.Content!.Add(contentType, new OpenApiMediaType
{
Schema = new OpenApiSchema { Type = "string", Example = new OpenApiString(String.Empty) }
Schema = new OpenApiSchema { Type = JsonSchemaType.String, Example = JsonValue.Create(String.Empty) }
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

The Schema property initialization uses JsonSchemaType.String which is correct for .NET 10, but the Example property uses JsonValue.Create(String.Empty). Consider using new JsonNodeExtension(JsonValue.Create(String.Empty)) to properly wrap it as an IOpenApiExtension, as done in the XEnumNamesSchemaFilter.

Copilot uses AI. Check for mistakes.
Comment on lines +19 to +38
foreach (var path in swaggerDoc.Paths)
{
if (path.Value?.Operations is null)
continue;

foreach (var operation in path.Value.Operations.Values)
{
if (operation?.Responses is null)
continue;

foreach (var response in operation.Responses)
{
// Only process 2xx success responses
if (response.Key.StartsWith('2') && response.Value?.Content is not null)
{
response.Value.Content.Remove(ProblemJsonContentType);
}
}
}
}
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

This foreach loop implicitly filters its target sequence - consider filtering the sequence explicitly using '.Where(...)'.

Copilot uses AI. Check for mistakes.
Comment on lines +24 to +37
foreach (var operation in path.Value.Operations.Values)
{
if (operation?.Responses is null)
continue;

foreach (var response in operation.Responses)
{
// Only process 2xx success responses
if (response.Key.StartsWith('2') && response.Value?.Content is not null)
{
response.Value.Content.Remove(ProblemJsonContentType);
}
}
}
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

This foreach loop implicitly filters its target sequence - consider filtering the sequence explicitly using '.Where(...)'.

Copilot uses AI. Check for mistakes.
Comment on lines +29 to +36
foreach (var response in operation.Responses)
{
// Only process 2xx success responses
if (response.Key.StartsWith('2') && response.Value?.Content is not null)
{
response.Value.Content.Remove(ProblemJsonContentType);
}
}
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

This foreach loop implicitly filters its target sequence - consider filtering the sequence explicitly using '.Where(...)'.

Copilot uses AI. Check for mistakes.
Adds webhook subscription and unsubscription endpoints.

Enhances stack management by allowing marking stacks as fixed and adding links using JSON documents.

Also includes minor fixes and improvements, such as using options objects directly in Startup.cs and correcting a parameter description in the ProjectController.
@niemyjski niemyjski marked this pull request as ready for review December 6, 2025 02:51
Copy link
Member

@niemyjski niemyjski left a comment

Choose a reason for hiding this comment

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

Self reviewed and tested

@github-actions
Copy link

github-actions bot commented Dec 6, 2025

Code Coverage

Package Line Rate Branch Rate Complexity Health
Exceptionless.Core 66% 44% 8566
Exceptionless.AppHost 19% 9% 78
Exceptionless.Web 45% 34% 2974
Exceptionless.Insulation 27% 24% 231
Summary 58% (9994 / 17259) 41% (3977 / 9718) 11849

@niemyjski niemyjski merged commit 7458f0b into main Dec 6, 2025
7 of 9 checks passed
@niemyjski niemyjski deleted the copilot/upgrade-to-net10-aspire13 branch December 6, 2025 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade to .net 10 and aspire 13

4 participants