maui
maui copied to clipboard
System.FieldAccessException: Field `Microsoft.Maui.Controls.VisualElement:ZIndexProperty' is inaccessible
Description
I'm deploying a Release version for android app, and i get this message error System.FieldAccessException: Field `Microsoft.Maui.Controls.VisualElement:ZIndexProperty' is inaccessible`
Also i'm trying with debugger but this error doesn't appears, every works fine
Steps to Reproduce
- Create MAUI app project with .net 6 framework
- In XAML editor add the property ZIndex with any value
- Choose Release deployment
- Compile and run (Emulator or Physical device indistinct)
Optional: Use device logger to identify the exception
Link to public reproduction project repository
https://github.com/anherukun/zindexerrorexample
Version with bug
7.0 (current)
Last version that worked well
7.0 (current)
Affected platforms
Android, I was not able test on other platforms
Affected platform versions
Android 11 (Tested)
Did you find any workaround?
Not using Zindex, but rather positioning the objects in reverse order in the XAML Editor
Relevant log output
No response
@anherukun Does the error occur if you update to .NET 7?
Duplicate of https://github.com/dotnet/maui/issues/7331
Hi @anherukun. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.
You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.
This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
I'm using MAUI 7.0.59
Steps to Reproduce
- Create MAUI app project with .net 6 framework
Does the problem occur if you create your project with the .NET 7 framework?
My mistake. I'm tested with .net 7 and it works fine