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 directive or an assembly reference?) (CS0246)".
I'm using Xamarin Studio to make a cross platform app via Xamarin.Forms. Whenever I build the basic form project I get this error and I don't know why.
I'm new in Xamarin.
Here is the code of app.cs:
using System;
using Xamarin.Forms; //This is the line where error occurs
namespace FIrstFormProject
{
public class App
{
public static Page GetMainPage ()
{
return new ContentPage
{
Content = new Label
{
Text = "Hello, Forms !",
VerticalOptions = LayoutOptions.CenterAndExpand,
HorizontalOptions = LayoutOptions.CenterAndExpand,
},
};
}
}
}
MihaMarkic's post here led me to the right answer. For each project in your solution you'll need to do the following:
This is the workflow that got it working on my Mac. I'm not sure what the exact steps are for you PC users out there.
Do the following:
I just had to add the Xarmin.Forms.Addin.dll in app's references. :) (Thanks @sam holder your hint in the comments led me to the answer.)
I have to combine some previous answers:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With