Xamarin.Android does not update Resource.designer in C# Visual Studio 2019

Asked

Viewed 62 times

0

When I insert a button (for example) into the file Activity Resource.desigenr.cs does not update to add the item Botao and the data (like id for example) so I can’t access it by command findViewbyId.

I’ve looked everywhere and done the few procedures I could find. What seemed most promising to me was to enter the folder values inside resources and check if the file string.xml was pointing the compilation directory to the AndroidResource. I checked this and this ok... I’ve also uninstalled the xamarim and installed it again to see if any path would have come corrupted and also does not work.

1 answer

0

Hello @Thiago Cordeiro,

Considering the little information you provided, I can suggest the following attempts to verify if your problem is solved.

1) Clean the contents of Resource.designer (delete), clean the solution and build the project.

2) Make sure that you are entering the controls in the right place as the identifiers are generated when Resources(images, colors, strings, controls, etc.) are added to the project and are grouped by their nature, so make sure you are looking in the right place.

3) Make sure you are setting your controls via Designer(xml) because if your identifiers have been set programmatically (via code), they are not written to Resources.designer

For more information don’t forget to look at the official documentation:

Browser other questions tagged

You are not signed in. Login or sign up in order to post.