CSharpShellApp icon indicating copy to clipboard operation
CSharpShellApp copied to clipboard

Issues with version 3.4.7 • .Net 9.0.0

Open PMi-Pro opened this issue 1 year ago • 6 comments

• Issues:

  • The exported apk file reports an error, the App crashes
  • The apk file in this version is very large, about 96MB when exported with the Maui application type

Screenshot_2024-12-25-21-57-48-773_com.companyname.demo.jpg

PMi-Pro avatar Dec 25 '24 14:12 PMi-Pro

You can disable auto formatting from the editor settings. This is a very major update and both the plugin and main IDE apps need to be updated for it to work as expected. Unfortunately for some reason the plugin update still hasn't gone live. It is up to Google now so it might be 5 minutes from now or 5 days from now

radimitrov avatar Dec 25 '24 15:12 radimitrov

Thanks I solved the auto format source code issue, hope there will be updates in the future to fix some of the app issues. ❤️

PMi-Pro avatar Dec 25 '24 15:12 PMi-Pro

• One more error when running projects with TargetFrameworks 8.0-Android will report an error, Previous version of the app had no problem:

System.NullReferenceException: Object reference not set to an instance of an object at Microsoft.Maui.Controls.Platform.Compatibility.ShellToolbarTracker..ctor(IShellContext shellContext, Toolbar toolbar, DrawerLayout drawerLayout) at Microsoft.Maui.Controls.Handlers.Compatibility.ShellRenderer.CreateTrackerForToolbar(Toolbar toolbar) at Microsoft.Maui.Controls.Handlers.Compatibility.ShellRenderer.Microsoft.Maui.Controls.Platform.Compatibility.IShellContext.CreateTrackerForToolbar(Toolbar toolbar) at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) at AndroidX.Fragment.App.Fragment.n_OnCreateView_Landroid_view_LayoutInflater_Landroid_view_ViewGroup_Landroid_os_Bundle_(IntPtr jnienv, IntPtr native__this, IntPtr native_inflater, IntPtr native_container, IntPtr native_savedInstanceState) at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPLLL_L(_JniMarshal_PPLLL_L callback, IntPtr jnienv, IntPtr klazz, IntPtr p0, IntPtr p1, IntPtr p2)


• Error when using method "JsonSerializer.SerializeAsync" from class "System.Text.Json":

The type 'PipeWriter' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.IO.Pipelines, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.

PMi-Pro avatar Dec 26 '24 01:12 PMi-Pro

Target framework strings are ignored, only .NET 9 is supported. This is the same root issue. The plugin update should be live today and should resolve all .NET version mismatch related issues.

radimitrov avatar Dec 26 '24 06:12 radimitrov

• I just updated "Maui App Plugin" the issue of publishing and running apk file has been solved, but I have a new problem in this new version of the app is when opening a new page like the image below, in the MainPage constructor, both of the below methods give the same error (in the previous version it was completely normal)

Screenshot_2024-12-26-20-02-44-625_com.radinc.csharpshell.jpg

Screenshot_2024-12-26-20-08-14-720_com.radinc.csharpshell.jpg

PMi-Pro avatar Dec 26 '24 13:12 PMi-Pro

Yes, Microsoft has deprecated App.Current.MainPage in favor of App.Current.Windows[0].MainPage in this case. Same for MainPage setter in App as it is now done by by overriding CreateWindow(IActivationState? activationState). This isn't an issue with the app, just changes in the MAUI framework with some accompanying bugs or useless Exceptions it seems as it also happen on a fresh MAUI project in VS. The workaround is to not try changing the app root and instead to use Shell.Current.Navigation.PushAsync() logic

radimitrov avatar Dec 26 '24 18:12 radimitrov