-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrading a Xamarin Android project is nowhere similar to the new NET6 Android app #923
Comments
@Sweekriti91 Is this something you could help with? |
This is not supported yet. The conversion from Xamarin Android -> Maui will be supported by the time .NET Maui is released. How are you performing the conversion? Are you using the .NET Maui preview extension? |
Not really. I just created a template and called the command I just installed. But why isn't it supported? |
After installing Visual Studio 2022 Quick Question: |
@nikossaperas when you create a xamarin android app from template you don't have net6, it's still modo with franken-proj. You have to use the Net6 android preview templates (they come with Maui iirc) |
Hi @nikossaperas and @manuelelucchi, .NET MAUI is the next evolution of Xamarin. You can find more detailed explanation of the difference and roadmap here. The updated timeline for the release of .NET MAUI RC is explained here. At the moment, upgrade-assistant has a preview of migration support for Xamarin.Forms to .NET MAUI (not single project, current it is done by maintaining the project heads). The migration process in the tool right now is incomplete and will actually be completed closer to the release of .NET MAUI. We also plan to add support to allow XF -> Single Project .NET MAUI project, but again this support is coming soon, it is not implemented at the moment.
This is the planned approach and we will be adding support for these migration paths to upgrade-assistant, and this support is coming soon.
Depending on which Project type you choose, the templates are different. If you search for templates for .NET MAUI, that will create a .NET MAUI Single project experience that targets net6-android. If you use the Xamarin templates, they will use the Xamarin templates. If you are not able to see the MAUI templates in VS2022, you want to make sure you have followed the installation steps here and also confirm you have the .NET MAUI workloads installed via the dotnet CLI tool. For more updated information and migration guides, you can follow the .NET MAUI GitHub, specifically checkout the Wiki. I hope this helps provide some clarity! |
@Sweekriti91 Thank you very much for all the info and clarifications. Thanks for all the effort! |
@Sweekriti91 so the support for migrating non forms project is coming, cool. It wasn't really clear if it was supported or not. Thank you |
One year later, upgrading File->New Xamarin.Android project looks like this: This is bad, @Sweekriti91 is this on your roadmap? |
Does upgrade-assistant supports migrating from Xamarin.Android to net7.0-android and Xamarin.iOS to net7.0-ios yet ? |
Currently on the painful process of migrating from Xamarin.Android to net7.0-android and Xamarin.iOS to net7.0 |
@fdhsdrdark The upgrade assistant should correctly migrate from Xamarin.Android to net7.0-android now. |
@jstedfast Maybe my project was a bit complicated, so I followed the 'manual' migration path, also described here for anyone on the same page: https://devblogs.microsoft.com/xamarin/upgrade-xamarin-ios-android-to-dotnet6-dotnet7/ |
If it doesn't migrate your project, we'd love to know what failed so we can fix it and/or add more logic to tackle things that it could do better. |
@jstedfast I took the suggested manual approach for Android and managed to complete the migration. Now iOS remains, seems trickier. Regardless of outcome/approach, kudos for replying and most important for positive attitude on supporting Xamarin! |
upgrade-assistant.clef
that is produced in the working directoryDescribe the bug
When upgrading a Xamarin Android project (even the default template) the csproj will be bloated of unneeded things and there will be errors with the nuget packages (also, it will upgrade it to net6, not net6-android). If you compare it with the NET6 Android app, you'll notice the template just doesn't use any nuget at all and the csproj is much smaller. Plus, the namespaces are different.
To Reproduce
Create a Xamarin Android default project and use the tool on it (doing all the steps). You can also compare the result with the NET6 Android template
Exceptions (if any)
Further technical details
dotnet --list-sdks
5.0.403 [C:\Program Files\dotnet\sdk]
6.0.100 [C:\Program Files\dotnet\sdk]
upgrade-assistant --version
0.3.255803+d72527aefab54bfbadc3227b4f1ffd326c1e9a8a
The text was updated successfully, but these errors were encountered: