Sometimes I get a red error that says:
InitializeComponent does not exist in the current context
Along with the other variables that I have in my .xaml , which are connected by x:Name . x:Class in the Xaml file corresponds to the namespace and class name in my xaml.cs file.
In the build action, my xaml file is set to Embedded Resource, and the build action for my xaml.cs file xaml.cs set to Compile. The error appears only randomly, and the project works, as usual, even with red errors. I am developing Windows 8.1 with Visual Studio with Xamarin.
Despite the fact that the code works, I would not want these errors to be displayed. Is there a reason why this is happening?
source share