Search Unity

Upon Build: The type or namespace name `Vuforia' could not be found

Discussion in 'Vuforia' started by emorling, Oct 30, 2017.

  1. emorling

    emorling

    Joined:
    Jul 6, 2015
    Posts:
    24
    When building for IOS I get the following:

    error CS0246: The type or namespace name `Vuforia' could not be found. Are you missing an assembly reference?

    Any ideas?
     
  2. FontouraCollide

    FontouraCollide

    Joined:
    Nov 15, 2016
    Posts:
    10
    Same issue here
     
    emaciate likes this.
  3. FontouraCollide

    FontouraCollide

    Joined:
    Nov 15, 2016
    Posts:
    10
    Just needed to enable vuforia in the player settings for iOS. I thought the flag was the same for Android and iOS but I was wrong.
     
    alllab, SheZii, emaciate and 6 others like this.
  4. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    Please make sure you have the Vuforia Support enabled in the XR Settings for each platform you plan to deploy to.

    Thanks!
     
  5. emorling

    emorling

    Joined:
    Jul 6, 2015
    Posts:
    24
    Yes that does the trick. Thanks.
     
    Vuforia-Strasza likes this.
  6. TigerBooks

    TigerBooks

    Joined:
    Jul 31, 2015
    Posts:
    10
    For those interested. I stumbled accross this problem, too. But in my case I have a project for mobile devices and standalone. I don't use AR in Standalone and got the compiler error there, too. I activated vuforia support for standalone, which solved the problem. Still feels awkward to enable this even though I don't use it there.
     
    adsilcott likes this.
  7. BeauWorlds

    BeauWorlds

    Joined:
    Oct 21, 2015
    Posts:
    1
    @TigerBooks you should try adding #if UNITY_IOS || UNITY_ANDROID to all references of vuforia, for exemple:

    void Start()
    {
    // do some stuff
    #if UNITY_IOS || UNITY_ANDROID
    Vuforia.DoSomeARStuff();
    #endif
    }

    anything within the #if UNITY_IOS || UNITY_ANDROID and #endif will only be compiled for ios and android.
    Hope it helps :)
     
    Vuforia-Strasza likes this.
  8. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    799
    Does Cloud Build have this feature too? Tried cloud build for Android 2017.3.1 ... errors:

    [Unity] Assets/Vuforia/Scripts/DefaultTrackableEventHandler.cs(10,7): error CS0246: The type or namespace name `Vuforia' could not be found. Are you missing an assembly reference?
     
  9. quadratron

    quadratron

    Joined:
    Jun 3, 2015
    Posts:
    20
    This worked for me too.
     
    TymNetwork likes this.
  10. BEKumar

    BEKumar

    Joined:
    Jan 3, 2019
    Posts:
    3

    Error Error Error I downloaded the Vuforia sample from the asset repository and got exactly the same error for any platform

    Please find attachment for Editor log file also...

    Unity: 2018.3.0
     
  11. ericbintner

    ericbintner

    Joined:
    Jul 22, 2019
    Posts:
    19
    Maybe in 2019 there is an update to Vuforia SDK and it's causing it to fail in Unity? I don't understand Vuforia, there does not seem to be an accessible or downloadable SDK -- perhaps this is my fault for finding and older (2017) tutorial and expecting it's underlying SDK to be open source or testable.
     
    Last edited: Aug 17, 2019 at 6:54 PM
  12. meedabit

    meedabit

    Official Vuforia Employee Vuforia

    Joined:
    Dec 8, 2016
    Posts:
    253
    Hello @ericbintner,

    The Vuforia Engine SDK is not a open sourced project. This is why you cannot access Engine code directly.

    There is likely a mismatch between your SDK version, and the version of the samples being used. As the SDK evolves and APIs are created/changes, so do the samples to be compatible with them.

    Here's how you can check the versions of both (assuming you used Vuforia samples resources):
    • SDK version: Unity Editor->Window->Vuforia Configuration
    • Samples version: Unity Editor->Project window: Assets/Vuforia/version
    I suggest you create a new project and download the most recent version of the samples.

    Thanks,
    Vuforia Engine Support
     
  13. Dipsoid

    Dipsoid

    Joined:
    Jul 10, 2019
    Posts:
    1
    Hi, I'm having the same issue with Unity 2019.1.10f1
    My SDK version is 8.3.8, and my samples version is 8.3.8. I have Vuforia Augmented Reality Supported enabled. And I've loaded the Vuforia Core Samples through the Unity Asset Store. I can't even follow along with a simple tutorial due to these CS errors. Is there something I'm missing?
     
  14. meedabit

    meedabit

    Official Vuforia Employee Vuforia

    Joined:
    Dec 8, 2016
    Posts:
    253
    Hello @Dipsoid,

    From your description, things should work. I have to do the same workflow multiple times a week and have not had any issues that have blocked me from building and deploying our 8.3 Core Samples.

    Perhaps one thing you can try is to deleted the "Library" folder in the root directory of your project. Do this when the project is closed. Then re-open the project. My understanding is that this forces Unity to reimport all assets and may help to resolve the errors. It's something I've done from time-to-time when I've been stuck by errors that I just can't resolve.

    Thanks,
    Vuforia Engine Support