MAUI reading files is terrible and many things just don't work

Lloyd Sheen 1,376 Reputation points
2023-11-01T20:28:53.5666667+00:00

Ok simply I have a file that I want to read. I add the file to the solution and set it's properties to MauiAsset (as per documentation). Now if I use Android the OpenAppPackageFileAsync will "work". When it doesn't it is because the documentation is WRONG!!!

So using Windows as the host and it just totally screws up but I have to admit the screw up is kinda funny. Debugging I had a breakpoint on the line -

Stream fileStream = await FileSystem.Current.OpenAppPackageFileAsync("theteams.json");

So it goes to the line and F10 and the screw up. It seems to take a while so I went for a walk with my dog and 40 mins later the VS debugger was still on that line. To make it more screwed up if you click Break All it shows the line that called the method I am in not the line in the method that is "maybe" running.

Now I ask that you don't just tell me to go to VS support as I spent about 1/2 hour perparing a post only to find out that I do not have a support plan. So MS requires me to pay to do QA on their products? Wonder if I get paid to do it as MS does not seem to do QA on it (I have a long list of things that are just wrong with VS and MAUI.

I "teach" a bunch of kids to use Maui and they often ask me why we use VS as it has so many problems with MAUI. I had to tell them that I already knew WPF and XAMARIN so it was just another step for me but I have to agree with them that VS 2022 with Maui is not very user friendly and the docs are well the absolute minimum to say there is documentation.

There other problem is with this. As Android seem to work but using the same code for Windows does not work. It is my and their understanding that Maui is advertised as one code base for multiple hosts (Android/IOS/Windows) but this is just one case where Windows and Maui really don't seem to work well together.

I would love for someone from the MS VS team would video with me so I can show all the problems from complicated ones as above to things like Maui controls which have bool properties and init of the property in the code window will not put true/false as valid responses.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,609 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,870 questions
{count} votes