Skip to content

Conversation

devin-ai-integration[bot]
Copy link

Migrate ASP.NET MVC 5 application from .NET Framework 4.8 to .NET 7

Summary

This PR migrates the existing ASP.NET MVC 5 application from .NET Framework 4.8 to .NET 7, modernizing the project structure while preserving the hybrid AngularJS frontend functionality. The migration converts the legacy project file to SDK-style format, replaces System.Web.Mvc with ASP.NET Core MVC, and updates the application startup and configuration patterns.

Key Changes:

  • Project file: Converted from legacy format to SDK-style targeting .NET 7
  • Application entry point: Replaced Global.asax.cs with Program.cs using minimal hosting model
  • Configuration: Migrated from Web.config to appsettings.json
  • Static file serving: Replaced bundling system with static file middleware for WebApp/ and node_modules/ directories
  • Controller: Updated LandingController to inherit from ASP.NET Core Controller base class
  • View: Removed bundling references and added direct script/CSS references in Index.cshtml
  • Cleanup: Removed legacy files (Web.config, Global.asax, App_Start/, packages.config, etc.)

The AngularJS frontend (v1.8.3) with jQuery (v3.7.0) remains fully functional with test components and directives rendering correctly.

Review & Testing Checklist for Human

  • End-to-end functionality test: Run dotnet run and verify the application loads at http://localhost:5000
  • AngularJS component verification: Confirm that both the test directive (showing jQuery version) and test component (showing AngularJS version) render properly on the page
  • Static file serving: Verify CSS styles are applied and JavaScript files load correctly from both Content/ and WebApp/ directories
  • Deployment compatibility: Test that the application builds and runs correctly in different environments (if applicable)

Notes

Local test screenshot

- Convert legacy project file to SDK-style format targeting .NET 7
- Replace System.Web.Mvc with ASP.NET Core MVC
- Create Program.cs entry point replacing Global.asax.cs
- Convert Web.config settings to appsettings.json
- Update LandingController to use ASP.NET Core Controller base class
- Update Razor view to use direct script/CSS references instead of bundling
- Configure static file middleware for WebApp/ and node_modules/ directories
- Remove legacy files: Web.config, Global.asax, App_Start/, packages.config, Views/web.config
- Preserve AngularJS frontend functionality with test components and directives
- Update page title to reflect .NET 7 migration

The hybrid architecture (ASP.NET Core backend + AngularJS frontend) remains fully functional.
All AngularJS components render correctly and display version information as expected.

Co-Authored-By: Jia Wu <jia.wu@cognition.ai>
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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.

0 participants