Xamarin.forms: Erro XLS0503 A value of type 'Label' cannot be added to a collection or dictionary of type 'IList`1'

Created on 9 Aug 2020  路  18Comments  路  Source: xamarin/Xamarin.Forms

Xamarin Forms 4.8 show up a error message, when I add label into Stacklayout.


external-intellisense bug

Most helpful comment

Why is this closed. Its not fixed and it costing me hours fixing valid xmal.

All 18 comments

Happens everywhere. Adding a DataTrigger to a Triggers-collection also shows this error.

Also happened to me when updating to Xamarin Forms 4.8.
After cleaning up the solution, then Rebuilding, then closing VS2019, then cleaning and rebuilding again (more or less that order hehe) the issue was gone.

Hi @RobertoGFilho , @ludas96 and @jpacov , if you clean and restart the IDE does it work for you?

Thanks

For me yes, after cleaning, closing, reopening, rebuilding (not sure which order exactly and how many times) it finally stopped annoying to me.

@rmarinho Yeah, cleaning the solution and restarting the IDE did indeed work.

Now ! it's ok just update Visual Studio to Version 16.7.1 or latter

I am getting this in 16.7.2 (see image) and also it stops the tab key working with Intellisense. A mix of clean/rebuild/restart works but then it comes back?
image

Same problem here, with VS 2019 16.7.2

Same problem here, with VS 2019 16.7.2

It still did it for me in 16.7.2, but doesn't do it anymore in 16.7.5

Still here with 16.7.5
image

same here!

same here!

16.7.6

Confirm issue is not fix
immagine
immagine

it is not fix

Why is this closed. Its not fixed and it costing me hours fixing valid xmal.

Still existing in VS 16.7.6 with Xamarin 16.7.000.456

image

any status on a fix for this?

After cleaning and restarting solution i fix it

Was this page helpful?
0 / 5 - 0 ratings