Porting the app to .NET 7
Next week I will start porting the app to .NET 7 from the current Xamarin.Android project. There are a few changes that will happen. This process will take at least a few weeks. Here is a list of the changes that will happen.
- The app will support newer libraries due to the .NET 7 BCL. Also some performance boosts from that.
- Xamarin.Forms will be replaced with .NET MAUI. I will implement a basic migrator.
- ASP.NET Core 2.2 will be removed but ASP.NET Core 7.0 won't be included. Keeping the 2.2 version isn't possible. I can't figure out how to get it running under Android. Might actually not be possible since Microsoft don't intend to support that. So at least for now the app will continue without it. I've attached a basic project that simulates the issue in case anyone has any ideas. AndroidSimulatedWebApplication.zip
That's really great, have been waiting for this for quite a while. By the way, is there any possibility you would add support for global usings? For now, adding global usings results in an error CS8915
I understand the need for progress and this is a great step forward but can Xamarin.Forms co-exist alongside MAUI and be included for backwards compatibility?
Great app and quite impressed with Xamarin Forms now its going to be replaced :)
@1ffycat That's an app bug. I can probably fix it tomorrow.
@firstygoldfish MAUI.NET is practically the next Xamarin.Forms with changed namespaces and a few improvements. Despite that, I don't think Xamarin.Forms will work under an .NET 6 Android app. Even if it does I expect major conflicts if both are added to the project.
I understand its the replacement but it would be nice to be able to support both. It would be easier if I could have the old version and new version installed at the same time. Thanks again for the speedy response. All good feedback.
@firstygoldfish Yes, I do intend to copy and modify the last build as an archive package and upload it in the Google Drive folder with a different package name.
Yes thats nice to see. By the way, about the reference assembly that are being referred by default example. System.Runtime. is there a way to remove it? coz it conflicts with the nuget package im including in the project, thus it wont export the assembly because of that error.
No. System.Runtime isn't explicitly referenced by default. It is a dependency. However if you could that wouldn't matter. Even if you reference another System.Runtime package the Mono runtime will still use the one already inside the app.
[Error] CS1705: Assembly 'TShockAPI' with identity 'TShockAPI, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version than referenced assembly 'System.Runtime' with identity 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
they have the same public token but it will still have this kind of error.
@jgranserver This package? It only supports .NET 6.0.
oh okay. will this be supported when the app ported to .NET 6?
@jgranserver Yes, it should be.
does the update now supports .NET6?
@jgranserver No. I've just started porting it. It will take a while. Last update was just a hotfix. The .NET update will be app version 3.0. And it should say something like ".NET 7" in the main menu, if I remember correctly
Please add some demo/examples on working with xml/xaml file in Xamarin.Android project, it frustrating to make layouts programmatically
@BanDroid Doesn't have much to do with .NET versions, except how it will always work under Android. The app may always be limited in regards to Android resources and C# <-> Java. Best I could do for now is add this (haven't tested it yet).
@BanDroid Doesn't have much to do with .NET versions, except how it will always work under Android. The app may always be limited in regards to Android resources and C# <-> Java. Best I could do for now is add this (haven't tested it yet).
I know 😅 i commented here just so you know. Inflating layout at runtime is good too, but the view could be from material design, is it possible?
It should be.
Well, this took longer than expected (porting bug), but I'm nearly done. Aside from a few minor things all that is left is some of the MAUI support. Might be ready January but the first week of February is more likely. A short list of changes:
- .NET 7 libraries
- Replacing Xamarin.Forms with .NET MAUI. Most Xamarin.Forms code should still work. Mostly different namespaces. I've implemented some basic code porting to help with that.
- Removal of ASP.NET 2.2 (will be uploading an archive APK with support)
- Replaced the WebView editor with a faster native one. I will adding editable themes support after initial release. The only downside is that for now the new editor doesn't implement code folding.
At least a week later than expected, however it is now ready. The update has been released and should be available soon.
Currently there are just 4 editor themes and they seem to basically be 90% operational in regards to syntax highlighting for now. Today I'm updating the Google Play build, the Huawei and custom ones will come next week
Good news, an old feature is back in the Google Play version of the app - exporting APK. Still no one-click install since Google policies forbid it in such a context, however that is what file manager apps are for.
Now the bad news. It appears Visual Studio has more issues with desugaring. I will have to investegate a bit. However this means that for now the update is for devices with Android >= 7.0.