[Android Dev] Basic XML fields not recognized in Xamarin

When using Xamarin with Microsoft’s visual studio you may an encounter an issue where the compiler will not recognize any of the basic XML variables this can be solved changing the MS Build tool property of the XML file.

Select the offending XML file and look at the property window for the custom tool field copy and paste the code below

MSBuild:UpdateDesignTimeXaml

Make any change inside the XML file so you can save the file. The compiler should now remove the red lines under the XML variables.

 

If this still does not work you can try checking the build action

  •  your XAML file build action it should be EmbeddedResource
  •  c# file build action should be compile

rebuild and clean the solution and hopefully it now works. If it still does does not change each build action to a different option and rebuild project this will cause errors now return the build options to the choices stated above in the billeted list. hopefully your project works now!

 

Still got errors?  maybe the solution on this page can help.

Comments are closed.