Skip to content

[LambdaTestTool] Add support for .NET 10 and removed support for .NET 6#2266

Merged
normj merged 5 commits into
devfrom
normj/test-tool-v1-10
Jan 30, 2026
Merged

[LambdaTestTool] Add support for .NET 10 and removed support for .NET 6#2266
normj merged 5 commits into
devfrom
normj/test-tool-v1-10

Conversation

@normj
Copy link
Copy Markdown
Member

@normj normj commented Jan 27, 2026

Issue #, if available:
#2252

Description of changes:
Create the .NET 10 variant of the v1 Lambda TestTool. Support for .NET 6 was dropped since that has been out of support for quite a few years.

Getting the project to work for .NET 10 ran into challenges with the changes Blazor has been making and the fact we have a single project targeting multiple versions of .NET. I struggled getting the older method using _Host.cshtml and MapBlazorHub via UseEndpoints to work in .NET 10 with the constraints of this tool. Those methods are also marked as obsolete. I decided to essentially fork the Startup code to have a .NET 10+ version and legacy version that will be used for .NET 8 and 9. The .NET 8 and 9 version don't have any changes exception for static assets which I'll talk about later. The .NET 10 version uses the current practice of using WebApplicationBuilder to initialize.

In the legacy version the programming model to was have an App.razor to setup the router and _Host.cshtml to provide the top level html. In .NET 10 the App.razor takes over the role of _Host.cshtml and the router setup is done in Routes.razor. As part of the fork I renamed the existing App.razor to AppLegacy.razor. Next year when .NET 8 and 9 go out of support we can remove all of the forks and then have all of the code just using the current approach.

Static assets like css in the past was always handled as embedded resources in the assembly and then setup our own FileProvider. This was originally done because we couldn't control the working directory since this was a tool run from any directory. This was causing a lot of issues with the .NET 10 version not finding the Blazor framework js file. I decided to remove the complexity and add logic at startup to figure out the content path based on the location of the test tool assembly. I'm thinking I didn't do this in the original version because back in .NET Core 3.1 days the static content wasn't included in the .NET CLI nuget pack.

Testing

Updated the test project to target .NET 10 and made sure tests past.
Built the tool as NuGet package and did end to end testing in both the .NET 8 and 10 version.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Copy Markdown

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

Adds a .NET 10 variant of the v1 Lambda Test Tool while removing .NET 6 targeting, updating the Blazor hosting model and packaging to support the new runtime.

Changes:

  • Updates LambdaTestTool and test projects to target .NET 8/9/10 (dropping .NET 6) and updates framework-specific constants/logic.
  • Introduces a .NET 10+ hosting path using WebApplicationBuilder, plus new App.razor/Routes.razor structure and an AppLegacy.razor for .NET 8/9.
  • Updates build/autover metadata and adds a new .NET 10 tool pack project.

Reviewed changes

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

Show a summary per file
File Description
buildtools/build.proj Updates packaging commands for Test Tool tool-pack projects.
Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/TestUtils.cs Updates framework selection logic for tests (net8/net10).
Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/Amazon.Lambda.TestTool.Tests.csproj Changes test TFMs to net8/net10.
Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.BlazorTester.Tests/RuntimeApiControllerTests.cs Adjusts tests to handle WebApplication on net10+.
Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.BlazorTester.Tests/Amazon.Lambda.TestTool.BlazorTester.Tests.csproj Changes test TFMs to net8/net10.
Tools/LambdaTestTool/src/Amazon.Lambda.TestTool/TestToolStartup.cs Adds net10 target framework handling.
Tools/LambdaTestTool/src/Amazon.Lambda.TestTool/Amazon.Lambda.TestTool.csproj Updates TFMs and dependency versions for net8/9/10.
Tools/LambdaTestTool/src/Amazon.Lambda.TestTool.BlazorTester/_Imports.razor Minor cleanup (BOM/formatting).
Tools/LambdaTestTool/src/Amazon.Lambda.TestTool.BlazorTester/Startup.cs Adds .NET 10+ hosting path and updates content root/static file behavior.
Tools/LambdaTestTool/src/Amazon.Lambda.TestTool.BlazorTester/Shared/MainLayout.razor Updates footer content and adds external integration link.
Tools/LambdaTestTool/src/Amazon.Lambda.TestTool.BlazorTester/Routes.razor Adds route definition component for .NET 10 model.
Tools/LambdaTestTool/src/Amazon.Lambda.TestTool.BlazorTester/Pages/_Host.cshtml Switches legacy host page to use AppLegacy.
Tools/LambdaTestTool/src/Amazon.Lambda.TestTool.BlazorTester/Controllers/RuntimeApiController.cs Removes obsolete framework-guard preprocessor block.
Tools/LambdaTestTool/src/Amazon.Lambda.TestTool.BlazorTester/Constants.cs Updates product name for net10 and VS marketplace link.
Tools/LambdaTestTool/src/Amazon.Lambda.TestTool.BlazorTester/AppLegacy.razor Introduces legacy router component for .NET 8/9.
Tools/LambdaTestTool/src/Amazon.Lambda.TestTool.BlazorTester/App.razor Implements .NET 10-style top-level document + interactive server render.
Tools/LambdaTestTool/src/Amazon.Lambda.TestTool.BlazorTester/Amazon.Lambda.TestTool.BlazorTester90-pack.csproj Removes embedded file provider package reference.
Tools/LambdaTestTool/src/Amazon.Lambda.TestTool.BlazorTester/Amazon.Lambda.TestTool.BlazorTester80-pack.csproj Removes embedded file provider package reference.
Tools/LambdaTestTool/src/Amazon.Lambda.TestTool.BlazorTester/Amazon.Lambda.TestTool.BlazorTester10_0-pack.csproj Adds new net10 tool pack project.
Tools/LambdaTestTool/src/Amazon.Lambda.TestTool.BlazorTester/Amazon.Lambda.TestTool.BlazorTester.csproj Updates TFMs to net8/9/10.
.autover/changes/30911c67-b2cc-4223-9477-ac0bab2fba8a.json Adds changelog entry for net10 support / net6 removal.
.autover/autover.json Updates autover paths to include the net10 pack project and drop net6 pack.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Tools/LambdaTestTool/src/Amazon.Lambda.TestTool.BlazorTester/Startup.cs Outdated
Comment thread buildtools/build.proj
Comment thread Tools/LambdaTestTool/src/Amazon.Lambda.TestTool.BlazorTester/Startup.cs Outdated
Comment thread Tools/LambdaTestTool/src/Amazon.Lambda.TestTool.BlazorTester/Startup.cs Outdated
Comment thread Tools/LambdaTestTool/src/Amazon.Lambda.TestTool.BlazorTester/Startup.cs Outdated
Copy link
Copy Markdown
Contributor

@GarrettBeatty GarrettBeatty left a comment

Choose a reason for hiding this comment

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

approving assume check the comments in the startup.cs

@normj normj force-pushed the normj/test-tool-v1-10 branch from 1159ea2 to c1cf547 Compare January 28, 2026 01:26
@normj normj merged commit 136b192 into dev Jan 30, 2026
8 of 9 checks passed
@normj normj deleted the normj/test-tool-v1-10 branch January 30, 2026 00:19
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.

4 participants