|
| 1 | +# WingtipToys Migration Test — Run 25 |
| 2 | + |
| 3 | +**Date:** 2026-03-26 |
| 4 | +**Branch:** `feature/l1-migration-scaffold-improvements` |
| 5 | +**Type:** L1 — Non-generic GridViewRow, QueryString/RouteData attributes, IDE0007 suppression |
| 6 | + |
| 7 | +## Summary |
| 8 | + |
| 9 | +| Metric | Value | |
| 10 | +|--------|-------| |
| 11 | +| Source project | `samples/WingtipToys/WingtipToys` | |
| 12 | +| Output project | `samples/AfterWingtipToys` | |
| 13 | +| L1 script | `migration-toolkit/scripts/bwfc-migrate.ps1` | |
| 14 | +| **Total build errors** | **382** | |
| 15 | +| **Razor structural (RZ*)** | **18** | |
| 16 | +| **Genuine L2 (CS*)** | **364** | |
| 17 | + |
| 18 | +### Error Count Correction |
| 19 | + |
| 20 | +Run 24 reported "3 errors" — this was from an **incremental build** that cached |
| 21 | +successful compilation of unchanged files. A clean build with Models/ and Logic/ |
| 22 | +files properly included produces 382 errors, all genuine L2 issues. |
| 23 | + |
| 24 | +The L1 script's purpose is to produce compilable scaffolding for the parts it |
| 25 | +*can* transform. The 382 remaining errors are all in code that requires semantic |
| 26 | +understanding (L2/Copilot work): |
| 27 | +- Web Forms control IDs referenced as fields (no designer.cs in Blazor) |
| 28 | +- `Session`, `Context`, `User` page properties (need Blazor service injection) |
| 29 | +- Web Forms enums like `TextBoxMode`, `GridLines`, `BorderStyle` |
| 30 | +- `HttpUtility`, `FormsAuthentication` (Web Forms API surface) |
| 31 | + |
| 32 | +## Changes in This Run |
| 33 | + |
| 34 | +### 1. Non-generic `GridViewRow` Shim (BWFC Library) |
| 35 | +Web Forms `GridViewRow` is non-generic; BWFC's is `GridViewRow<T>`. Created a |
| 36 | +non-generic `GridViewRow` class with basic properties (`RowIndex`, `DataItemIndex`, |
| 37 | +`DataItem`). Marked `[Obsolete]` to guide L2 toward the generic version. |
| 38 | + |
| 39 | +**Result:** CS0305 errors → **0** (was 2) |
| 40 | + |
| 41 | +### 2. `[QueryString]` Attribute (BWFC Library) |
| 42 | +Instead of converting `[QueryString("id")]` → `[SupplyParameterFromQuery(Name = "id")]` |
| 43 | +(which fails because that attribute only targets properties, not method params), we now |
| 44 | +**leave `[QueryString]` as-is** and provide a BWFC `QueryStringAttribute` that targets |
| 45 | +`AttributeTargets.Parameter | AttributeTargets.Property`. |
| 46 | + |
| 47 | +The L1 script no longer converts the attribute. L2 handles promotion to a proper |
| 48 | +`[Parameter, SupplyParameterFromQuery]` property on the component class. |
| 49 | + |
| 50 | +**Result:** CS0592 errors → **0** (was 4) |
| 51 | + |
| 52 | +### 3. `[RouteData]` Attribute (BWFC Library) |
| 53 | +Same pattern as `[QueryString]` — provide a BWFC `RouteDataAttribute` that targets |
| 54 | +method parameters so the original attribute compiles. L1 script no longer strips it. |
| 55 | +L2 promotes to `[Parameter]` property. |
| 56 | + |
| 57 | +### 4. IDE0007 Suppression in Migration Mode |
| 58 | +Added `IDE0007` (use `var` instead of explicit type) to `BwfcMigrationMode` |
| 59 | +warning suppression. Web Forms code uses explicit types; this is a style concern |
| 60 | +that shouldn't block L1 builds. |
| 61 | + |
| 62 | +**Result:** 198 fewer style errors |
| 63 | + |
| 64 | +## Error Breakdown (382 total) |
| 65 | + |
| 66 | +| Category | Count | Description | |
| 67 | +|----------|-------|-------------| |
| 68 | +| CS0103 | 256 | Missing name — control IDs, page properties, Web Forms APIs | |
| 69 | +| CS1503 | 26 | Type conversion mismatches | |
| 70 | +| CS1061 | 21 | Member not found on type | |
| 71 | +| CS0117 | 16 | No such member on type | |
| 72 | +| CS0246 | 15 | Type/namespace not found | |
| 73 | +| CS7036 | 14 | Required parameter not provided | |
| 74 | +| RZ9980 | 6 | Unclosed HTML tags from `<% %>` blocks | |
| 75 | +| CS0411 | 6 | Type arguments cannot be inferred | |
| 76 | +| RZ9996 | 2 | Unrecognized child content | |
| 77 | +| Other | 20 | Various (CS1525, CS0021, CS1929, RZ9981, etc.) | |
| 78 | + |
| 79 | +### Top Missing Names (CS0103) |
| 80 | + |
| 81 | +| Name | Count | Category | |
| 82 | +|------|-------|----------| |
| 83 | +| Context | 35 | Page property → inject IHttpContextAccessor | |
| 84 | +| User | 27 | Page property → inject AuthenticationStateProvider | |
| 85 | +| Session | 17 | Page property → inject ProtectedSessionStorage | |
| 86 | +| TextBoxMode | 16 | Web Forms enum → BWFC TextMode | |
| 87 | +| HttpUtility | 12 | System.Web → System.Net.WebUtility | |
| 88 | +| Control IDs | ~100 | Designer.cs fields → declare manually | |
| 89 | + |
| 90 | +## What Worked Well |
| 91 | + |
| 92 | +1. **"Leave it alone" pattern for attributes** — Creating BWFC shim attributes |
| 93 | + that accept the original Web Forms syntax is more robust than converting to |
| 94 | + Blazor equivalents at L1. Less script complexity, zero errors. |
| 95 | +2. **Non-generic GridViewRow** — C# allows both `GridViewRow` and `GridViewRow<T>` |
| 96 | + in the same namespace. Simple stub solves the compilation issue. |
| 97 | +3. **IDE0007 suppression** — Migrated code shouldn't be blocked by code style rules. |
| 98 | + |
| 99 | +## What Needs Improvement (Future L1 Enhancements) |
| 100 | + |
| 101 | +1. **Designer field generation** — The L1 script could parse `.aspx`/`.ascx` for |
| 102 | + `<asp:*>` controls with `ID="..."` and generate field declarations in the |
| 103 | + code-behind, similar to how Web Forms' designer.cs worked. |
| 104 | +2. **Page property stubs** — `WebFormsPageBase` could provide `Session`, `Context`, |
| 105 | + `User`, `Request`, `Response`, `Server` properties that delegate to the proper |
| 106 | + ASP.NET Core services (inject via DI internally). |
| 107 | +3. **Web Forms enum aliases** — `TextBoxMode`, `GridLines`, `BorderStyle` could be |
| 108 | + shimmed in BWFC's .targets via type aliases. |
| 109 | +4. **HttpUtility alias** — Add `<Using Alias="HttpUtility" Include="System.Net.WebUtility" />` |
| 110 | + to .targets (API is similar enough for common methods). |
0 commit comments