Anil Kumar
Anil Kumar

Reputation: 11

Error CS2001 Source file 'C:\Users\Admin\Documents\MyHololens01\Packages\com.unity.textmeshpro\Scripts\Runtime\TMP_FontAsset.cs' could not be found

I have installed Hololens Emulator, Visual studio 2017, and Unity 3D and done all the necessary settings.

Now I want to run my Unity project on Hololens Emulator, but unfortunately when I am running the .sln generated file in Visual Studio, I am facing this error:

Error CS2001 Source file 'C:\Users\Admin\Documents\MyHololens01\Packages\com.unity.textmeshpro\Scripts\Runtime\TMP_FontAsset.cs' could not be found

How can I solve this problem?

Upvotes: 0

Views: 755

Answers (1)

Mohammed Alshair
Mohammed Alshair

Reputation: 280

I encountered the same issue. I am not sure which unity version are you using, but this is what I did to resolve my error (assuming you are using Unity 2018.2.12f1 or 2018.2.11f1):

(1) Uninstall TextMesh Pro

  1. Open your Unity project.
  2. Click on Windows from the Unity Menu
  3. Select Package Manager
  4. Find TextMesh Pro package and select it
  5. Click on Remove located on the top right corner Screenshot here to help you. I already uninstalled mine, so you should see Remove instead of Install

(2) You must delete the previously generated UWP Visual Studio Solution in your previous build.

(3) Build your project in Unity

(4) If using older version of Unity:

If you see a folder named TextMesh Pro inside your Asset folder, delete it and then follow the steps above to rebuild it. Make sure you delete the previously generated UWP solution.

Hopefully this resolve your issue.

Upvotes: 1

Related Questions