Maui tells me I have a problem but surely it could narrow it down

WillAutioItrax 201 Reputation points
2023-09-05T17:23:09.5+00:00

In my Maui app, I get the message:

[0:] Microsoft.Maui.Controls.Element: Warning: Microsoft.Maui.Controls.Label is already a child of Microsoft.Maui.Controls.Grid. Remove Microsoft.Maui.Controls.Label from Microsoft.Maui.Controls.Grid before adding to Microsoft.Maui.Controls.Grid.

Java.Lang.IllegalStateException: 'The specified child already has a parent. You must call removeView() on the child's parent first.'

If the compiler can tell me there is a problem with a Grid and a Label, surely it can tell me the name of the Grid and the Label, or a line number or something to help me find the source of the problem. I think this is a bug in the compiler - a serious short coming.

How else can I find the Grid and Label responsible for this issue?

Thanks

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,514 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.