Skip to content

Conversation

@devin-ai-integration
Copy link

Migrate from ASP.NET MVC 5 to ASP.NET Core 7

Summary

This PR migrates the backend from ASP.NET MVC 5 (.NET Framework 4.8) to ASP.NET Core 7 while keeping the existing AngularJS frontend unchanged. The migration converts the application from a traditional MVC architecture to a minimal static file server, since the original application had no actual API endpoints or business logic.

Key Changes:

  • Project file: Converted from old-style .csproj to SDK-style format targeting .NET 7.0
  • Application bootstrap: Replaced Global.asax with Program.cs using minimal hosting model
  • Configuration: Migrated from Web.config to appsettings.json
  • Static serving: Moved files to wwwroot/ directory with proper static file middleware
  • Bundling: Replaced System.Web.Optimization with direct script/CSS references
  • Architecture: Removed all MVC components (Controllers, Views, Routing) in favor of static file serving

The AngularJS frontend code remains functionally identical with only one minor path fix in the directive template URL.

Working Application

Review & Testing Checklist for Human

Risk Level: 🟡 Medium - Major architectural changes require thorough verification

  • End-to-end functionality test: Run dotnet run and verify the application loads at http://localhost:5000 with correct title "XLTS for AngularJS with ASP.NET Core"
  • AngularJS components verification: Confirm both test-directive (jQuery version) and test-component (AngularJS version) display correctly on the homepage
  • Browser console check: Open developer tools and verify no JavaScript errors occur during page load and AngularJS bootstrapping
  • Cross-platform testing: If deploying on non-Windows environments, test that static file serving works correctly on the target platform
  • Production deployment: Verify the application builds and runs in production configuration (dotnet run --configuration Release)

Notes

  • Session: https://app.devin.ai/sessions/f40a05525bc84a62a2ddb8f9fc891493
  • Requested by: [email protected]
  • The migration removes bundling/minification - consider adding a build step for production if performance is a concern
  • All frontend dependencies now load from /node_modules/ path - ensure this works in your deployment environment
  • See MIGRATION.md for detailed documentation of all changes made during the migration

- Convert project file to SDK-style format targeting .NET 7.0
- Replace Global.asax with Program.cs for application bootstrap
- Migrate from Web.config to appsettings.json configuration
- Convert Index.cshtml to static index.html
- Move static files to wwwroot/ directory structure
- Configure static file serving for AngularJS SPA and node_modules
- Delete obsolete MVC files (Controllers, Views, App_Start, etc.)
- Update README.md with new setup instructions
- Add MIGRATION.md documentation for the migration process

The application now serves the AngularJS frontend as static files
while maintaining the exact same functionality and user experience.

Co-Authored-By: [email protected] <[email protected]>
@devin-ai-integration
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

@ibrahim-sowunmi
Copy link

Create a Read me

@devin-ai-integration
Copy link
Author

Hi @ibrahim-sowunmi,

This PR includes comprehensive documentation updates:

  1. README.md - Updated with ASP.NET Core 7 setup instructions, including:

    • Prerequisites (.NET 7 SDK, Node.js)
    • Getting started steps (dotnet restore, dotnet run)
    • Development information about the new file structure
  2. MIGRATION.md - New detailed migration guide covering:

    • All changes from ASP.NET MVC 5 to ASP.NET Core 7
    • File structure changes
    • Configuration differences
    • Testing checklist
    • Future enhancement suggestions

Could you clarify what specific documentation you'd like to see added? Are you looking for:

  • More detail in the README?
  • A different type of documentation?
  • Something not covered in the existing files?

Happy to add whatever would be most helpful!

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.

2 participants