The type or namespace name 'Xamarin' missing error in Xamarin Studio

后端 未结 16 1561
陌清茗
陌清茗 2020-12-15 04:21

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

16条回答
  •  时光说笑
    2020-12-15 04:26

    Trivial solution to try before proceeding with more severe methods: Restart Visual Studio


    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.

提交回复
热议问题