Has anyone here had success with upgrading a Xamarin project to use Maui?
from ExtraMedicated@lemmy.world to programming@programming.dev on 08 May 20:10
https://lemmy.world/post/29344357

I’m wondering if anyone here has gone through this process, and what the experience was like. (I’m not asking for help with any particular error or anything like that. At least not yet).

I got put in charge of maintaining an old codebase that includes Xamarin projects for android and ios and we seem to have run into a situation where we need to update the framework not just for security, but to keep the mobile app fully functional as Apple and Google update their APIs.

I did see that there was a button in Visual Studio to automatically upgrade the project, but apparently “upgrade” means “break fuckin’ everything” so I’m guessing I’ll need to take a more manual approcach and also blow a bunch of hours on finding replacements for all the dependencies that required Xamarin and are no longer maintained.

My biggest problem is that I haven’t even heard of Xamarin before this thing got dropped in my lap so I have some confusion about how it’s supposed to work on top of my normal baseline amount of confusion.

#programming

threaded - newest

mrbn@lemmy.ca on 09 May 02:07 collapse

Yes. The transition from Xamarin to Maui has been similar to transition from .net framework to .net core.

A few things you will run into:

  • namespaces have changed
  • certain things will be deprecated but still currently work (ie FillAndExpand)
  • platform specific setup has changed (you’ll need to convert to the new way, but code will likely remain the same)
  • upgrade your nuget packages to the Maui equivalents (the ones we used had Maui versions so we didn’t have to change any of them)
  • certain ways of doing things have change slightly, like how to run things on the main UI thread (you’ll see warnings)
  • your xaml code will remain mostly unchanged but your layout may need to be fixed (especially if your dependencies changed their interfaces)

That’s all I can think of right now. There’s no easy way to do it and it’s going to suck. Focus on getting it to build with all your dependencies upgraded and then go from there.

ExtraMedicated@lemmy.world on 09 May 02:16 collapse

Thanks for this info! I still need to give our client some kind of estimate. I’m thinking somewhere between 40 to infinity hours.

MonkderVierte@lemmy.ml on 09 May 10:03 collapse

Make it 120, since Xamarin automatically accumulates technical debt.