Der Typ oder namespace 'App' existiert nicht im aktuellen Namensraum

Ich habe ein Problem mit einem neu gemacht Xamarin.Forms-Anwendung in Visual Studio 2015. Ich habe das Droid/iOS-Projekte an der Lösung und es ist mir ein build Fehler sagen...

The type or namespace 'App' does not exist in the current namespace

Hier ist ein Beispiel, wo die zwei Fehler sind.

Droid Projekt:

namespace MyApp.Droid
{
    [Activity (Label = "MyApp", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
    public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity
    {
        protected override void OnCreate (Bundle bundle)
        {
            base.OnCreate (bundle);

            global::Xamarin.Forms.Forms.Init (this, bundle);
                LoadApplication (new MyApp.App ());
                //Error on the above line at MyApp.App ()
            }
        }
}

iOS-Projekt:

namespace MyApp.iOS
{
    [Register("AppDelegate")]
    public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
    {
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init ();
            LoadApplication (new MyApp.App ());
            //Error on above line in MyApp.App ()
            return base.FinishedLaunching (app, options);
        }
    }
}

Diese Lösung wurde gerade gemacht und keine Codierung noch nicht fertig, könnte dies ein Problem mit VS2015?

  • tun Sie Ihre zwei Plattform-Projekte haben einen Verweis auf die gemeinsamen Formen der PCL-Projekt? Das ist, wo die App Klasse Leben standardmäßig.
InformationsquelleAutor Shawn | 2015-07-28
Schreibe einen Kommentar