Reputation: 13
So my company is requesting me to change the application that they bought from a freelance developer to run it in MacOS because it can only run in Windows. The application is made using .Net MVC, not .Net Core MVC. Is there a way where I could transfer the codes to another framework which can build an app for MacOS with little to no changes in codes?
Sorry for my grammar. Thank you for reading.
Upvotes: 1
Views: 312
Reputation: 7444
As has already been pointed out the only way to run .Net on MacOS is .Net Core, however it seems unlikely that it would be possible with "little to no code changes".
Whilst of course It depends in my experience MVC applications are the hardest to migrate as unlike WebApi and Class Libraries there has been a substantial change in the way Views are rendered.
You have a choice between Tag Helpers and Razor Pages, but neither is a simple drop in solution and it seems likely that it is likely that every .cshtml
view file will need amending and then testing.
Upvotes: 0
Reputation: 1693
I suggest you also look at the problem from a cost/opportunity perspective and consider additional scenarios, such as running the Windows process in a virtual machine, or running remote desktop sessions. You would need to answer questions such as:
That said, there are porting opportunities you might explore in both the .NET world and outside, but IMHO it will be difficult to satisfy the "little to no code changes" requirement.
Upvotes: 2
Reputation: 30205
The easiest way should be to port to .Net Core that can run on Mac and Linux. It is relatively little work to do that usually.
It depends of course on the packages and technologies used in your application, but a simple MVC application that does not use too much packages that are not available in Net Standard and does not use specific windows features, etc. should be fine.
There are for sure a lot of guidelines on how to port mvc to asp.net core mvc.
I doubt there are some "automated" solutions though, so you should run through code and manually upgrade all the incompatible bits and pieces.
Upvotes: 4