Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

The type or namespace name 'TextMeshProUGUI' could not be found

Discussion in 'Package Manager' started by magg, Aug 6, 2018.

  1. magg

    magg

    Joined:
    Sep 29, 2013
    Posts:
    59
    So after going from 2017.3.1 to 2018.2.1f1 I had to spend 2 days fixing stuff - mostly just related to TMP. Everything was broken so I had to uninstall (delete), install, reinstall and manually fix all my TMP UIs.

    The game is running without any problems now (even builds), but for some odd reason Visual Studio gives me these:
    The type or namespace name 'TextMeshProUGUI' could not be found (are you missing a using directive or an assembly reference?)

    It's everywhere I'm using it like this:
    public TextMeshProUGUI UI_EntryTxtLocation;

    Also VS now says "Using directive is unnecessary" for:
    using TMPro;
    using UnityEngine.Events;
    using UnityEngine.EventSystems;

    Any ideas?
     
  2. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    2,150
    Sorry that you had to invest that time to upgrade to the newer version of TMP. Provided you followed the procedure outlined in the following sticky post as well as reviewed the Update Notes at the bottom of this post, the process should have been pretty quick (with the exception of the scanning process which can take more time depending on the project size).

    In terms of the errors in Visual Studio, this is an issue between Assembly Definitions (which packages happen to use) and Visual Studio / VSTU. The solution is to upgrade to the latest version of Visual Studio 2017 which is 15.7.6. This information is also provided in the Update Notes section of the post I referenced above.

    Let me know if this resolves your issue?
     
  3. magg

    magg

    Joined:
    Sep 29, 2013
    Posts:
    59
    Thanks - that was FAST.

    Reinstalled VS and everything looks a-OK. TY again.
     
    Stephan_B likes this.
  4. Xblade-Imperium42

    Xblade-Imperium42

    Joined:
    Jan 12, 2016
    Posts:
    553
    Getting this now in VS 15.8.7
    upload_2018-10-23_20-11-45.png

     
  5. hal0000

    hal0000

    Joined:
    Oct 5, 2017
    Posts:
    7
    @Stephan_B yea samething happened to me please check my post.
     
    Yashajain likes this.
  6. Alkanov

    Alkanov

    Joined:
    May 15, 2017
    Posts:
    35
    Same problem here - Unity works fine and no errors found but on the VS project I get the same errors as above screenshot
     
  7. Alkanov

    Alkanov

    Joined:
    May 15, 2017
    Posts:
    35
    Changing the editor from VS to extension and then back to VS solved the problem
     
  8. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    2,150
    Glad to know this worked.

    I'll bring this thread again to the attention of the appropriate folks at Unity as whatever is causing this behavior should be addressed.