Skip to content

Conversation

@devin-ai-integration
Copy link

@devin-ai-integration devin-ai-integration bot commented Sep 29, 2025

Migrate from ASP.NET MVC 5 to ASP.NET Core 8 Web API

Summary

This PR completes a major architectural migration from ASP.NET MVC 5 (.NET Framework 4.8) to ASP.NET Core 8 Web API while maintaining compatibility with the existing AngularJS frontend. The migration represents a fundamental shift from server-side MVC with Razor views to a decoupled API-first architecture with static file serving.

Key Changes:

  • Framework: Migrated from .NET Framework 4.8 to .NET 8
  • Architecture: Replaced MVC pattern with Web API + static files
  • Project Structure: Modern SDK-style csproj, Program.cs instead of Global.asax
  • Configuration: appsettings.json replaces Web.config
  • Controllers: LandingController converted from MVC to API controller returning JSON
  • Frontend Serving: AngularJS app now served as static files from wwwroot instead of Razor views
  • Asset Management: Individual file references replace ASP.NET bundling
  • CORS: Added policy to enable frontend-API communication

Review & Testing Checklist for Human

This is a high-risk architectural migration requiring thorough verification:

  • Frontend Integration: Verify AngularJS application loads correctly and all components/directives display properly when served as static files
  • API Functionality: Test all API endpoints (/api/landing and /api/landing/health) return expected JSON responses
  • Static File Serving: Confirm all assets (JS, CSS, HTML templates) are accessible from wwwroot and node_modules paths
  • CORS Configuration: Review if AllowAnyOrigin() is appropriate for your deployment environment (may need restriction for production)
  • Cross-Environment Testing: Build and run the application in different environments to ensure portability

Recommended Test Plan

  1. Build the project: dotnet build angularjs-aspnetcore-webapi.csproj
  2. Run locally: dotnet run --project angularjs-aspnetcore-webapi.csproj
  3. Navigate to the application root and verify both AngularJS components display version information
  4. Test API endpoints manually: /api/landing and /api/landing/health
  5. Check browser console for any 404 errors or missing resources
  6. Verify the application title changed from ".NET Framework" to "ASP.NET Core"

Notes

Screenshots from testing:
Application Running
API Endpoint

The migration maintains full backward compatibility with the existing AngularJS frontend while modernizing the backend infrastructure. No database or external dependencies exist in this application, simplifying the migration scope.

Link to Devin run: https://app.devin.ai/sessions/d9321a364e884860a20631328b271c93
Requested by: Kevin Tang (@kevintang-windsurf)

Co-Authored-By: kevin.tang@windsurf.com <kevin.tang@windsurf.com>
@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

@ghost
Copy link

ghost commented Sep 29, 2025

Lets start the upgrade now from .Net 7 to .Net 8

- Updated TargetFramework from net7.0 to net8.0
- Updated Microsoft.AspNetCore.OpenApi from 7.0.20 to 8.0.10
- Updated Swashbuckle.AspNetCore from 6.5.0 to 6.8.1
- Verified application builds and runs successfully with .NET 8
- Tested AngularJS frontend and API endpoints work correctly

Co-Authored-By: kevin.tang@windsurf.com <kevin.tang@windsurf.com>
@devin-ai-integration
Copy link
Author

Upgrade to .NET 8 Complete

I've successfully upgraded the project from .NET 7 to .NET 8 as requested. Here's what was updated:

Changes Made:

  • Updated TargetFramework from net7.0 to net8.0 in angularjs-aspnetcore-webapi.csproj
  • Updated Microsoft.AspNetCore.OpenApi from 7.0.20 to 8.0.10
  • Updated Swashbuckle.AspNetCore from 6.5.0 to 6.8.1

Testing Results:

  • ✅ Project builds successfully with .NET 8 (0 warnings, 0 errors)
  • ✅ Application runs correctly on .NET 8
  • ✅ AngularJS frontend loads and displays properly
  • ✅ API endpoints return expected JSON data
  • ✅ All functionality verified working

The upgrade is complete and ready for review. The application maintains full compatibility with the existing AngularJS frontend while now running on the latest .NET 8 framework.

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.

1 participant