Fixing "The type or namespace name 'NUnit' could not be found" in 2020.3.17f1

Hello everyone, I just did a totally fresh install of Unity (and Unity Hub) on a totally new PC, but for every new project I try to create in 2020.3.17f1 gives me about 450 errors.

All of the errors seem to be related to the folder Library\PackageCache\com.unity.test-framework@1.1.27\UnityEngine.TestRunner.

Already tried solutions:

- Reimporting all assets (right click in project folder -> Reimport all).
- Go to C:/Users/username/AppData/Local/Unity/cache/packages/ (The path that 
  is shown in the error) Delete all of those folders in that "" folder. Let Unity 
  recompile the project.
- Resetting packages to defaults in advanced tab of the package manager window.
- Launching Unity Hub and the engine as admin.
- Uninstalling and reinstalling Unity.
- Deleting Unity folders in `AppData\Local, AppData\LocalLow, AppData\Roaming`

I’m using the Unity Hub 3.0.0-beta.4 if that makes any difference.

Edit: the problem has been fixed, look at the attached answer.

UPDATE: deleting all Unity folders located in C:\Users\username\AppData\Local & C:\Users\username\AppData\LocalLow & C:\Users\username\AppData\Roaming and creating a new project seems to have fixed the problem. Keep in mind that deleting those folders will also delete your preferences in the editor.