I\'m getting this error:
\"MyApp\\App.cs(7,7): Error CS0246: The type or namespace name \'Xamarin\' could not be found (are you missing a using di
The context in my case is that the solution was already compiling previously, yet stopped doing so after changes to the code. In my case all I did was change the XAML file, add a resource and reference said resource in the XAML file. Prior to this Xamarin.Forms
was found, afterwards it was no longer found by Visual Studio for an unknown reason.
Restarting Visual Studio resolved the problem for me.
This is likely only relevant if Xamarin.Forms
was found before and suddenly went missing, a restart is obviously unsuitable in fixing errors with the project setup.
This also sometimes (though not always) occurs when the Xamarin.Forms
NuGet package is changed, i.e. a different one is installed for projects.