Visual FoxPro to C#.NET migration
Working example built by Estrada Consulting, Inc. for RFQ BD-27-1003-EOAS-EOAS-135643, Executive Office for Administration and Finance

Migrating 199 modules without trusting the translation

199
modules in scope
10
translation traps catalogued
10 of 10
traps proven on this page
37
modules touching Office

The RFQ says plainly what the Commonwealth found: GitHub Copilot does not reliably translate Visual FoxPro into C#.NET at the accuracy this work needs. That finding is right, and it is the reason this example exists. It does not argue that a different assistant is better. It shows what has to sit around the assistant before any of its output is allowed near an appeals record.

The RFQ names the authority for functional equivalence: the existing Visual FoxPro behavior and source code, with a mock dataset and anticipated outputs supplied by the Commonwealth. That makes equivalence a test result rather than an opinion, so ECI built the harness first and the translation second.

Where a translation actually goes wrong

Not in the parts that look hard. A thousand line module with nested logic translates well, because the logic is on the page. What breaks is the behavior that is not on the page: a filter set two procedures away, a comparison that matches on a prefix because a global setting says so, a date that is empty rather than null, a field name assembled at run time from a string. An assistant reads the file it is given and produces something that compiles, reads well and is wrong in a way no reviewer catches by reading it.

So ECI catalogued the constructs that behave differently, wrote the check that tells the two translations apart, and ran it. Ten traps, ten checks, all ten currently separating a plausible translation from a correct one. The Translation traps page is the catalog and the Equivalence report is the run.

What the Commonwealth gets per module

Architecture, and the reason for it

The RFQ allows a Windows console application or a Web API and asks for a documented rationale. ECI recommends a class library holding the migrated logic, with two thin hosts over it: a console entry point for scheduled and on demand runs, and a Web API entry point where another system needs to call in. The mandatory requirement is that every component runs both scheduled and standalone, and a single library with two hosts is the only shape that satisfies it without maintaining the logic twice.

The one architectural decision that is not free is Office. 37 of the 199 modules in the planning model touch Excel or Word. Carrying COM interop into .NET keeps a dependency on an installed copy of Office and an interactive session, which is exactly what fails at two in the morning under a service account. Those modules write the workbook with a file library instead. That is trap ten, and it is an architecture question disguised as a translation question.