The type or namespace name 'Foo' could not be found (are you missing a using directive or an assembly reference?)
Assembly Definitions (asmdefs) are used to manually group code into individual assemblies. They also define the references between those assemblies, giving you tighter control over your compilation.
Learn more about Assembly Definitions.
Navigate to the heading that fits your setup and complete the listed steps.

If the target is Unity's assemblies No Engine References must not be ticked on the asmdef.
If the target is in your project but not in an asmdef it cannot be referenced by code in an Assembly Definition. You may want to consider adding asmdefs to all parts of your project where possible. Adding them to external plugins for compatibility with your project is a normal thing to do.
Scripts outside of asmdefs can reference asmdef assemblies if Auto Referenced is ticked on their asset. If it isn't and can't be changed, then this code must be moved under its own asmdef to have it reference that assembly.
You can search the project with t:AssemblyDefinitionAsset to find asmdefs in the project, making sure none are above your scripts.
Continue debugging with Editor assemblies.