Hundreds of compiler errors, how to fix?

Hi,

I’ve been having problems compiling any project (new blank projects included) because I’m getting hundreds of compiler errors, 447 to be specific.

All of these errors originate from one of these two paths:
Library\PackageCache\com.unity.test-framework@1.1.19\UnityEngine.TestRunner\TestRunner.…
Library\PackageCache\com.unity.test-framework@1.1.19\UnityEngine.TestRunner\NUnitExtensions.…

and are ONLY one of these types of errors:
“The type or namespace name *Something* could not be found”,
SomethingMethod: No suitable method found to override”,
“Attribute _something_ is only valid on classes derived from *Class.something*”.

I have already tried these possible solutions:
Deleting the PackageCache folder to let Unity reimport them, to no avail,
Help->Reset packages to default,
Completely removing Unity and reinstalling it.

Does anyone know what is going on and how to fix these problems?
Many thanks in advance!

~FortunePilotSam

Both of those errors are related to the Test Framework package. Just remove the Test Framework package. Click “Window->Package Manager”, click on that package, then in the bottom right click the remove button.

I have no idea why Unity includes the Test Framework package by default in new projects. It is a feature for more advanced users, and is more likely to be used in larger projects with extensive planning. Novices or fairly small projects are unlikely to use this package, and the larger or well planned projects can easily fit “install the Test Framework package” into their planning.

Same thing with the Unity Collaborate package. You don’t need it unless you’re using the Collaborate service, and most projects aren’t so don’t need it. But It is there by default with its only use for me to potentially generate compile errors :stuck_out_tongue:

Thanks for the quick response, saved my day!
In my case, I also had to remove a package called ‘Rider Editor’ before I could remove ‘Test Framework’ as it was a dependency.

Happy Holidays!

~FortunePilotSam

1 Like

Yeah I always remove the Rider Editor package too, since I use VS instead of Rider, so didn’t realize there was a dependency. Glad you got things working!