The type or namespace name ‘App’ could not be found. Are you missing an assembly reference?

I got this error when I was trying to deploy this:

I was able to build other Android/iOS apps that don't rely on Xamarin.Forms, so I think that's where the problem is from.

And here are some screenshots:



  • ChrisMason.2517ChrisMason.2517 USMember, University ✭✭

    sometimes it seems to work to build all the projects...
    and then the error goes seems the thing it is referring to
    hasn't been compiled I find I can debug in the Android for example..
    Set your startup project and build it..and then test..see if the error goes away.

  • LoriLalondeLoriLalonde CAInsider, University, Developer Group Leader ✭✭✭
    edited July 2015

    @YKSugi In the Android screenshot you provided it doesn't look like you have the BoxViewClock Portable Class Library loaded in Xamarin Studio. It needs to be loaded and included in the build configuration so it's compiled as well. The App class is in the BoxViewClock Portable Class Library project which is why it can't find it.

    In the iOS screenshot you provided, the PCL is listed and loaded in Xamarin Studio, but it doesn't look like it's being built with the project. Right-click on the solution name in Xamarin Studio, select Options. In the Solution Options dialog select Configurations under the Build node, and select the Configuration Mappings tab. Make sure the Build checkbox is selected for each project (platform specific and PCL). Rebuild the project.

    Let me know if this helps!

  • YKSugiYKSugi USMember
    edited July 2015

    @LoriLalonde I tried what you suggested, and I'm still getting the same error. Here are some screenshots. I've been getting the same errors with Android as well.


    ios4.png 266.7K
  • YKSugiYKSugi USMember

    Thanks, it worked when I added a reference!

  • naseefmtlnaseefmtl USMember, University

    why this errors,?

  • naseefmtlnaseefmtl USMember, University

    please check the attachement and reply me

  • SipkeSchoorstraSipkeSchoorstra NLMember ✭✭

    I seem to have the same issue. I have a Xamarin.Forms project that references a PCL project. The solution builds fine, but as soon as I open a XAML file and switch back to any C# class in the Xamarin.Forms project, VS complains about being unable to resolve types from the PCL. When I manually re-add the project reference to the PCL, the issue goes away, but then as soon as I open a XAML file, the issue appears again.

  • manasaavmanasaav INMember ✭✭✭

    clean the project ..Rebuild the application

  • CharmXamarinCharmXamarin INMember ✭✭

    Hi all,
    Severity Code Description Project File Line Suppression State
    Error CS0246 The type or namespace name 'App' could not be found (are you missing a using directive or an assembly reference?)

    i am getting this error in all platforms like, ios, uwp in xamarin.forms

    Please help me to resolve it.

  • Sumit_SharmaSumit_Sharma USMember ✭✭✭

    @PriyaXamarin1 , Sorry for the late response , i hope you have sorted out your error.

    But to remove your error , Add Reference of of PortableProject into all Platforms project , by clicking on References in each platform project -> Add References -> Project -> Add you portable project reference

  • MuhammadhamzaMuhammadhamza USMember ✭✭

    can anyone help what is the problem?

  • Hi guys, Good day. I'm having the same issue above as well.

    CODE :smile:

    using System;
    using System.Collections.Generic;
    using System.Linq;

    using Foundation;
    using UIKit;
    using Xamarin.Forms;
    using Xamarin.Forms.Xaml;
    using Xamarin.Forms.Platform.iOS;
    using XFormsUI.iOS.CustomRenderer;

    namespace XFormsUI.iOS
    // The UIApplicationDelegate for the application. This class is responsible for launching the
    // User Interface of the application, as well as listening (and optionally responding) to
    // application events from iOS.
    public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
    // This method is invoked when the application has loaded and is ready to run. In this
    // method you should instantiate the window, load the UI into it and then make the window
    // visible.
    // You have 17 seconds to return from this method, or iOS will terminate your application.
    public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions)
    LoadApplication(new App());

            return base.FinishedLaunching(uiApplication, launchOptions);


  • JassimRahmaJassimRahma USMember ✭✭✭

    No solution?

    I have the same problem and the portable project is already added as a reference in both Droid and iOS

  • BobbyFARUQIBobbyFARUQI USMember ✭✭

    same here using the latest version of VS 2017 and Xamarin.Form

  • xxayyxxayy Member ✭✭

    I had this too in a brand new App with a Standard .Net Library. Removing the reference to the lib and readding it fixed it.

  • van8tkavan8tka RUMember ✭✭

    I had this error: The type or namespace name 'App' could not be found (are you missing a using directive or an assembly reference?and I had a problem with AdMob .What I did, I downgrade Xamarin.Forms from version to version, after that all projects worked fine.

  • EdwinKlesmanEdwinKlesman USMember ✭✭


    I was jerking around with my project files and moved them around. I then got the same issue (App could not be found anymore).
    Two things you can check:

    1) Is the shared / PCL project referred from the platform specific projects?
    2) In my case, the App.xaml.cs Build action wasn't set to "Compile" anymore which caused this.
    Also, check that the App.xaml file's Build action is set to EmbeddedResource

Sign In or Register to comment.