Migrate from ASP.NET MVC 5 to ASP.NET Core 7 Web API #14
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 from ASP.NET MVC 5 to ASP.NET Core 7 Web API
Summary
This PR migrates the application from .NET Framework 4.8 / ASP.NET MVC 5 to ASP.NET Core 7 Web API. The AngularJS frontend remains unchanged and is now served as static files from the
wwwrootdirectory.Key Changes:
.csprojtargetingnet7.0Program.cswith minimal API setup, static file serving, and CORS middlewarewwwroot/directoryViews/Landing/Index.cshtml(Razor) towwwroot/index.html(static HTML)node_modulestowwwroot/lib/What Stayed the Same:
wwwroot/WebApp/app.js, components, directives) - completely unchangedhttp://localhost:51267Review & Testing Checklist for Human
dotnet buildand confirm it succeeds without errorsdotnet runand verify the app starts onhttp://localhost:51267test-componentdisplays "AngularJS Version: 1.8.3"test-directivedisplays "jQuery Version: 3.6.3"Notes
http://localhost:51267, though it may not be necessary since the frontend is served from the same origintemplateUrl: 'WebApp/Directives/test.directive.html'which should resolve correctly from the newwwwrootstructure, but verify it loadse2e/directory may need updates if they expect specific server behaviorLink to Devin run: https://app.devin.ai/sessions/0b11c65824f24ab39115ea5807e3b32a
Requested by: Kevin Tang (@kevintang513)