"Scaffolded project missing global using System in Assembly.cs"
▸ SYMPTOM
You copy code from another project into a fresh scaffold. The code uses Math.Clamp, MathF.Abs, and similar calls without explicit using System; — standard practice when Assembly.cs has the global using. Build produces dozens of CS0103: The name 'MathF' does not exist in the current context errors.
▸ CAUSE
A freshly-scaffolded project's Code/Assembly.cs can be missing global using System; even though the documented project-setup template includes it. The scaffold doesn't always match the template. Code written against a project that has the global using compiles fine there, but fails when moved to a project without it.
▸ FIX
Before transplanting code between projects, check the destination's Code/Assembly.cs against the expected template:
// Code/Assembly.cs — complete template
global using Sandbox;
global using System;
global using System.Collections.Generic;
global using System.Linq;
global using System.Threading.Tasks;
global using MyProject; // your razor namespaceCheck before the first compile error, not after. Any missing line means every file that assumes it will fail.
▸ WHY IT WORKS
global using declarations in Assembly.cs apply assembly-wide — every .cs file in the project inherits them without explicit using statements. When System is missing, Math, MathF, Console, Environment, and every other System type becomes unresolved. The scaffold inconsistency means you can't trust the default — always verify.