Skip to content
Bill Fencken edited this page Mar 20, 2026 · 4 revisions

CFX-WebForms2WASMMigration

A CodeFactory automation package that migrates an ASP.NET WebForms application to Blazor WebAssembly — one right-click at a time.

This wiki documents the package for experienced .NET developers who are new to CFX. If you're evaluating CodeFactory, start with the CFX Mental Model — it's the fastest path to understanding how the source code is structured and why it's written the way it is.


What This Package Does

CFX is a Visual Studio extension that lets architects encode code transformation patterns as C# commands. Those commands appear in the Solution Explorer right-click context menu and execute against a live, parsed model of your source code — no regex, no text manipulation, no build pipeline.

This package provides two commands that together migrate a WebForms application to a Blazor WASM three-project solution:

Command Trigger What It Does
Setup Blazor WASM Projects Right-click the WebForms project Scaffolds .Client / .Server / .Shared, migrates config, static files, logic classes, and generates the API layer and client program
Migrate WebForm to WASM Right-click any .aspx file Migrates a single page to a Blazor component in .Client/Pages/ with @inject HttpClient and OnInitializedAsync

The reference application is WingtipToys — a classic ASP.NET 4.x WebForms e-commerce project, freely available, and representative of real legacy .NET code.


Why This Is Open Source

The CFX SDK is open core. The CFX Runtime (the engine inside Visual Studio) is closed-source commercial software, but the automation commands you author against the SDK are yours entirely. There is no runtime dependency on CodeFactory in any code this package generates.

This repo exists so you can read a real, non-trivial CFX automation package and understand how the patterns work before building your own. See Reading the Source for a guided walkthrough.


Navigation

CFX Mental Model Four concepts that make everything else click — start here
Prerequisites and Quick Start What you need and how to run the migration
What Gets Generated The three-project output structure and sample generated code
Project Structure Commands Library folder layout and file responsibilities
Reading the Source Recommended reading order + CFX compliance rules applied
Building the Package How to modify and rebuild the .cfx file
Extension Scenarios Six commands you could build yourself using the same patterns

View on GitHub · CFX SDK · v2 Docs · WebForms2BlazorServer

Clone this wiki locally