34 lines
1.2 KiB
Markdown
34 lines
1.2 KiB
Markdown
# Common Compile Failures
|
|
**Last Updated:** 2026-04-05
|
|
|
|
Record concise error fingerprints and verified fixes.
|
|
|
|
## Entry Template
|
|
- **Date:** YYYY-MM-DD
|
|
- **Error:** `CSXXXX`
|
|
- **Fingerprint:** file + line + short symptom
|
|
- **Root cause:** one sentence
|
|
- **Fix:** one to three concrete steps
|
|
- **Prevention link:** guardrail/pattern doc entry added
|
|
|
|
## Starter Examples
|
|
1. **`CS0115` no suitable method found to override**
|
|
- Root cause: incorrect NT8 override signature.
|
|
- Fix: replace with exact official signature; recompile.
|
|
|
|
2. **`CS0507` cannot change access modifiers when overriding**
|
|
- Root cause: used `public override`/`private override` instead of `protected override`.
|
|
- Fix: change to `protected override`; recompile.
|
|
|
|
3. **`CS0246` type or namespace not found**
|
|
- Root cause: missing using/namespace or undefined domain type.
|
|
- Fix: add correct namespace reference or confirmed type definition.
|
|
|
|
4. **`CS1503` argument type mismatch**
|
|
- Root cause: wrong overload or argument ordering.
|
|
- Fix: align call with exact method signature and parameter types.
|
|
|
|
5. **C# 6+ syntax in C# 5 project**
|
|
- Root cause: use of `$""`, `?.`, `nameof`, expression-bodied members, etc.
|
|
- Fix: rewrite using C# 5 compatible constructs.
|