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.
You are ready to work with xamarin.forms :)
Do the following:
I have VS 2019 and I was prompted to update the Android SDK. After doing this I got a load of compiler errors including The type or namespace name 'Forms' does not exist in the namespace 'Xamarin'
After updating my NuGet package to the latest version, the errors resolved (from 4.3.0.947036 to 4.3.0.991211)
Look for your Target. Some targets aren't compatible with Xamarin.