Skip to content

teaceo-debug/DEEP6 / .claude/skills/nt8-build-verify

nt8-build-verify

Verified

FileKindSize
README.mdmarkdown13.6 KB
SKILL.mdskill md1.5 KB
fixes/BRACE_MISMATCH.mdmarkdown5.1 KB
fixes/CS0019.mdmarkdown4.7 KB
fixes/CS0101.mdmarkdown4.9 KB
fixes/CS0103.mdmarkdown4.0 KB
fixes/CS0246.mdmarkdown5.4 KB
fixes/CS0535.mdmarkdown3.6 KB
fixes/CS1061.mdmarkdown5.0 KB
fixes/MISSING_ATTRIBUTE.mdmarkdown5.9 KB
knowledge.mdmarkdown3.5 KB
lib/__init__.pyscript0 B
lib/diagnostics.pyscript2.3 KB
lib/nt8_paths.pyscript3.8 KB
scripts/compile_editor.ps1script5.1 KB
scripts/compile_headless.ps1script9.2 KB
scripts/deploy.ps1script2.6 KB
scripts/fix_loop.ps1script19.7 KB
scripts/fix_router.pyscript15.8 KB
scripts/install_indicator.ps1script16.0 KB
scripts/modal_detect.ps1script10.9 KB
scripts/orchestrator.ps1script19.8 KB
scripts/parse_errors.pyscript4.6 KB
scripts/runtime_check.ps1script2.9 KB
scripts/screenshot_chart.ps1script7.5 KB
scripts/verify_visual.pyscript8.0 KB
scripts/workspace_mutator.pyscript17.6 KB

fixes/CS1061.md

View on GitHub
# CS1061 — Member not found on type

## Pattern
`error CS1061: 'T' does not contain a definition for 'X' and no accessible extension method 'X' accepting a first argument of type 'T' could be found`

## Root Causes (ordered by likelihood)
1. SharpDX API drift — method signature changed between SharpDX versions bundled with different NT8 releases
2. `Series<double>` used where `ISeries<double>` is required (or vice versa) — interface vs concrete type mismatch
3. Calling a method on the wrong base class (e.g., calling an `Indicator`-only method from a `Strategy` context)
4. Null-conditional access on a type that doesn't support the member (wrong type inferred)

## Fix Strategies

### Strategy 1: SharpDX API drift
- **Detect**: The error references a method on a SharpDX type (`RenderTarget`, `Brush`, `TextFormat`, `Factory`, etc.). Common drifted methods: `Dispose()` signature, `DrawText` parameter count, `CreateSolidColorBrush` overloads.
- **Lookup**: NT8 8.x ships SharpDX 2.6.3. Check the SharpDX 2.6.3 API for the exact method signature. The NT8 API reference also documents the expected SharpDX calls in `OnRender`.
- **Fix**: Match the call site to the SharpDX 2.6.3 signature. For `Dispose`, use the parameterless overload. For `DrawText`, confirm the parameter order matches the 2.6.3 overload.
- **Verify**: The method call matches the SharpDX 2.6.3 signature exactly.

```csharp
// SharpDX 2.6.3 RenderTarget.DrawText signature:
// void DrawText(string text, TextFormat textFormat, RectangleF layoutRect, Brush defaultForegroundBrush)

// Wrong (extra parameter from newer SharpDX):
RenderTarget.DrawText(text, format, rect, brush, DrawTextOptions.None);

// Correct for NT8 / SharpDX 2.6.3:
RenderTarget.DrawText(text, format, rect, brush);
```

### Strategy 2: Series<T> vs ISeries<T> mismatch
- **Detect**: The error references a method or property on `Series<double>` or `ISeries<double>` that doesn't exist on the other. Common: `GetValueAt`, `IsValidDataPoint`, `Count`, indexer `[int]`.
- **Lookup**: `ISeries<T>` is the interface; `Series<T>` is the concrete implementation. NT8 API methods that accept data series typically take `ISeries<double>`. Custom helper methods may declare `Series<double>` when they should accept `ISeries<double>`.
- **Fix**: Change the parameter or variable type to `ISeries<double>` if the method needs to accept both built-in series (like `Close`) and custom `Series<T>` fields. If the concrete type is needed for mutation, keep `Series<T>`.
- **Verify**: The type used matches what the calling code passes in, and the method exists on that type.

```csharp
// Wrong: Close is ISeries<double>, not Series<double>
private void Process(Series<double> data) { ... }
Process(Close); // CS1061 or CS1503

// Correct:
private void Process(ISeries<double> data) { ... }
Process(Close); // OK
```

### Strategy 3: Method exists on base class but not on the declared type
- **Detect**: The method is documented in NT8 but the variable is typed as a more specific or less specific class than the one that declares the method. Example: calling `AddDataSeries` on a variable typed as `NinjaScriptBase` instead of `Indicator`.
- **Lookup**: Check the NT8 class hierarchy. `NinjaScriptBase` → `Indicator` → specific indicator. Methods like `AddDataSeries`, `AddPlot`, `AddLine` are on `Indicator`, not `NinjaScriptBase`.
- **Fix**: Change the variable type to the class that actually declares the method, or cast to that type before calling.
- **Verify**: The method is declared on the type used at the call site.

### Strategy 4: Calling instance method on null or wrong type via var inference
- **Detect**: The error says the method doesn't exist on the inferred type. The variable was declared with `var` and the compiler inferred a different type than expected.
- **Lookup**: Hover over the variable in the editor (or read the declaration) to see the inferred type. Compare it to the type that declares the method.
- **Fix**: Replace `var` with the explicit type, or cast the expression to the correct type before calling the method.
- **Verify**: The explicit type declares the method and the call compiles.

## NT8-Specific SharpDX Method Reference (SharpDX 2.6.3)

| Method | Correct Signature |
|--------|-------------------|
| `DrawText` | `(string, TextFormat, RectangleF, Brush)` |
| `DrawRectangle` | `(RectangleF, Brush, float)` |
| `FillRectangle` | `(RectangleF, Brush)` |
| `DrawLine` | `(Vector2, Vector2, Brush, float)` |
| `CreateSolidColorBrush` | `(Color4)` |
| `Dispose` (all SharpDX objects) | `()` — parameterless |

## Example Fix

```diff
  protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
  {
      using (var brush = RenderTarget.CreateSolidColorBrush(SharpDX.Color.White))
      {
-         // CS1061: 'RenderTarget' does not contain a definition for 'DrawText' with 5 args
-         RenderTarget.DrawText("DEEP6", _textFormat, _rect, brush, DrawTextOptions.None);
+         // Correct: SharpDX 2.6.3 DrawText takes 4 args
+         RenderTarget.DrawText("DEEP6", _textFormat, _rect, brush);
      }
  }
```
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall