The following issues have potentially the same cause. They are linked to recognition of C# scripts in the resource folder.
1) Making a script with the same name as another script with different case (e.g. DELETEME.cs x DeleteMe.cs) is allowed, but when I try to build the project, I get an error:
C:\Program Files
(x86)\MSBuild\14.0\Bin\amd64\Microsot.CSharp.Core.targets(67,5): The
item "DELETEME.cs" was specified more than once in the "Sources"
parameter. Duplicate items are not supported by the "Sources"
parameter.
I deleted the script and erased all dependencies. Yet, the error still persists. The file "Microsoft.CSharp.Core" contains nothing specific for my project which leads me to believe that the "memory" of the said script is still somewhere in my project files. I just do not know where...
2) Deleted C# script will still be expected to exist in the res\: folder. In short, I get an error: could not be found. This forces me to create a script with identical name just to prevent this error.
3) Script that was not created in it's original project (e.g. was copied from another project) will not be recognized in the build. You have to attach it to a node to get recognized, even if the script does not extend any of Godot node objects.
This one is minor, but still surprising. I stumbled on it when I tried to create new project and copy/paste my scripts from the previous one.
The expected behaviour of the editor would be permanent update of internal/invisible dependencies. Is there a was to manually correct them?