Migrate HomeController to .NET Core 6 #3
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.
Migrate HomeController to .NET Core 6
Summary
This PR creates a new .NET Core 6 project (
SampleWebApp.Core) and migrates the HomeController from the existing ASP.NET MVC 5 (.NET Framework 4.5.1) project. The migration demonstrates the modernization path from legacy .NET Framework to .NET Core 6.Key Changes:
SampleWebApp.Coreproject with .NET Core 6 MVC configurationSystem.Web.Mvc→Microsoft.AspNetCore.Mvc) and return types (ActionResult→IActionResult)InternalsInfomodel to use .NET Core compatible memory APIs (GC.GetGCMemoryInfo()instead ofPerformanceCounter)The new project runs successfully and all HomeController actions have been tested locally.
Review & Testing Checklist for Human
Compare memory metrics between versions: Test both the original MVC5
/Home/Internalsand new .NET Core/Home/Internalspages side-by-side to verify the memory metrics are reasonable and comparable (the API change from PerformanceCounter to GC.GetGCMemoryInfo may show different values)Verify migration architecture aligns with requirements: Confirm that creating a separate .NET Core project (rather than in-place migration) matches your intended approach for modernizing this application
Test all controller actions: Navigate through all HomeController actions (Index, About, Contact, Internals, CodeView) in the new .NET Core version and verify they render correctly and match expected behavior
Test Plan
cd SampleWebApp && dotnet build(if supported) or use Visual Studiocd SampleWebApp.Core && dotnet runNotes
Session: https://app.devin.ai/sessions/dc3dff3d33f648718d4435fc8f000539
Requested by: ben-windsurf (@ben-windsurf)