2019.3, UnityEngine.UI, and VS Code?

Looking through the recent 2019.3 release, there doesn’t seem to be a UnityEngine.UI namespace being seen by Microsoft’s C# plugin for Visual Studio Code. The namespace is still valid on the Unity side and projects compile just fine, but anything referencing those UI classes / functions will give your project a sea of red squiggles / filenames.

I assumed it was just a weird behavior from migrating a 2019.2 project to 2019.3, but even brand new projects seem to give this behavior. Did anyone have a similar problem and find a solution?

Thanks!

Which version of the vs code plugin you use in package manager?
If you are using 1.1.4 try downgrading the version and the error will probably fix.

I’ve the same issue …
I downgraded, reinstalled plugin and VS, changed Unity version, deleted csproj and sln, reimported assets, restart the computer but I still got the issue…,Yeah same for me with 2019.3.0f6… I downgraded, resintalled VS, reinstall plugin, delete csproj et sln but I’ve still this error …

I was having trouble getting my info to work, I tried pretty much everything that every google search recommended.

Though none of it worked except for the following:

  1. I uncheck all the .csproj boxes under Edit > Preferences

  2. Then Regenerate Project Files

188773-screenshot-2021-11-16-041028.png

I hope this is able to help those of you that had a similar struggle like myself.

I’m seeing this on 2019.3.12, vs code [March 2020] and vs code package 1.1.4.

Upgrading to vs code editor package v 1.2.0 also revolved the issue for me.

@TreyH It looks like another error (probably you can see it in console) that break something and instigate pull of errors related with UnityEngine.UI namespace. Could you attach full list of errors?

This happened to me as well, going to package manager and “updating” to version 1.13 worked for me, but definitely is quite annoying doing this every time you create a new project.

Updating Visual Studio Code removed this error for me when creating new projects.

So try updating your version of VS @TreyH

answer from @RahulRaman is worked for me.

Thanks a lot man.

I think installing the Microsoft .NET 4.7.1 Developer Pack did the trick for me.

But I’m not 100% sure, because before installing that, I did try a few other things that may also be required:

  • I switched to Visual Studio Code which prompted me to install the C# Extension
  • I got the following error154728-68538608-1dc8ef80-0356-11ea-9b80-00aad50db102.png
  • I installed Microsoft .NET Core 3.1 SDK (v3.1.200) which did not immediately solve it, but after executing “dotnet --info” from the command-line to verify that it was configured in the PATH and running Visual Studio Code from the command-line, the error disappeared (also when subsequently starting it again from within Unity… strange…).
  • Then I switched back to using Visual Studio 2017 (Community) as External Script Editor in Unity. After opening a script Visual Studio prompted me the following dialog: 154729-target-framework.png
  • I installed Microsoft .NET Framework 4.6. Targeting Pack

And now Visual Studio knows about UnityEngine.UI and UnityEngine.EventSystems :slight_smile:

P.S. In between most of these steps I also removed .csproj and .sln files and shutdown Unity, Visual Studio Code and/or Visual Studio 2017 Community to make sure the step is effective.

The version I use 2019.3.5f1. I downgrading VS Code Editor 1.1.3 version and deleted .csproj .sln but not fix my problem. When i entered c# Scripts, i cannot import using UnityEngine. so ı cannot use NavMesh… Please help me for this problem.

Plugin version 1.2.0 is now available. He solves all these problems.

Very well done.

This solved my issue too, I had even TextMesh pro messed up.
what the hell did they do ? this situation is quite unacceptable.

prise to u man!

PS: unity marked this problem as “unreproducible bug”.

~an italian dev.

DLL, short for Dynamic Link Library, refers to a type of file format that contains several codes and procedures for Windows programs that can perform many tasks. The DLL is useful for sharing data and resources so that multiple applications can access the contents of a single file at the same time.

However, sometimes the application does not work due to a DLL problem. Read on for more information.

Missing or not found DLL errors
When trying to open an application, you may receive an error message that a DLL file is missing or not found. Typically, errors on the computer can come in many different forms:

The program cannot start because the DLL file is missing on your computer. Try to reinstall the program to fix this problem.
Cannot find .dll. Please reinstall this app.
This application failed to start because .dll was not found. Reinstalling the application could solve the problem.
This problem is not new to Windows 10/8/7 users. Why are missing or not found DLL errors so common? There are many reasons for that:

  1. Delete a DLL file by mistake

When you try to clean up hard disk space or uninstall / install a program, a DLL file may be accidentally deleted.

  1. The DLL file is overwritten

If you recently installed a program, an existing DLL file may be overwritten with an invalid or incompatible DLL file.

  1. A DLL file is damaged.

A bad application installation can corrupt one or more files and cause DLL errors.

In addition, malware infections, hardware errors, etc. can lead to DLL file errors. What should you do if you also find that DLL files are missing or not found? There are many ways to fix DLL errors here.

How to fix missing dll files in Windows 7/8/10
Meaning:

If DLL errors are missing or not found, someone selects the lack of missing DLL files from a website. However, we do not recommend downloading them here as DLLs from download sites may be out of date, infected, etc. In this post, important reasons NOT to download DLL files contains more information.

If such a file has been downloaded, please delete it. Then continue with the troubleshooting below to fix the problem with DLL files.

Way 1: Restart your PC
Sometimes the problem that causes not found or missing DLL file errors to occur is temporary. And a restart can be an option. Just do it to solve your problem.

Way 2: Reinstall the program
If a DLL error occurs while using or opening a specific application, reinstalling this program may allow the missing DLL file to be properly installed and registered again. In most cases, however, this route doesn’t work well.

Way 3: Recover Deleted DLL Files from Recycle Bin
You may have accidentally deleted DLL files, but you didn’t notice. As a result, the error “DLL not found” or “Missing DLL” occurs. You can go to the trash in Windows 10/8/7 and check if these files are saved here.

If so, try to restore them using the Restore button. However, if the missing DLL files cannot be displayed in the trash, you can ask a file recovery program for help. Just go on to the next solution.

Way 4: restore missing dll files using file recovery software
Using free data recovery software to recover deleted DLL files is a good idea if the lost files can work properly before deletion. Which tool is worth recommending here for the recovery of DLL files? MiniTool Power Data Recovery Free Edition, the powerful, reliable and free data recovery software, is your best choice. there were no issue of unity you may download the unity bull game Sniper Ghost Warrior 2 PC Game Download which don’t have any issue with unity.

It is compatible with many Windows operating systems, including Windows 10/8/7, so you can get lost, deleted or existing files from an internal hard drive, external hard drive, SSD, hard drive, SD card, USB flash drive Drive, a memory stick. or other storage devices with simple clicks.

This freeware is also very helpful to recover data from various accidents, e.g. B. deletion, formatting, virus attack, system damage, hard drive failure, etc. In addition, the original data

Didn’t have any luck with upgrading vs code editor to 1.1.3 but I switched my external script editor from Visual Studios 2017 to Visual Studios 2019 and it seemed to get rid of the error. Oddly enough, the UI variable references that had the errors were still showing up in the inspector window on Unity so I’m not sure what happened here.

But updating the version of Visual Studios did the trick.

Using 2019.3, my project folder was missing “Assembly-CSharp-Editor.csproj” file. Creating dummy script that uses UnityEditor, made Unity to generate this file, and that solved the issue.

Easy solution that works 100%:

go to Edit > Preferences > External Tools make sure the ‘Generate all .csproj files.’ is checked

close Unity
delete all csproj and sln files in your folder
open Unity

Yep! Great answers.
It’s ALWAYS good fun to “upgrade” isn’t it. Luckily for us, Unity makes it so easy and so error free. Now for the 2021 versions. Can’t wait for that.

Deleting my .sln file worked.