Migrating a WCF application to gRPC
Visual ReCode provides a wizard interface that guides you through creating WCF to gRPC migrations. With your WCF solution open, click Extensions -> Visual ReCode -> Migrate a WCF service to gRPC… from the top-level menu.
Step 1: Choose a WCF Service Contract
The first page of the wizard shows all the
ServiceContract classes and interfaces
in the currently-opened solution, grouped by project. If your project contains
multiple implementations of a
ServiceContract interface, all of them will be
displayed in the list, so take care to select the right one.
Step 2: Configure Output
On the next page you specify a new solution to create, as well as a name for the .NET Core gRPC Project to be generated. Required code from your current solution will be copied into .NET Standard 2.1 library projects in the new solution, with the same names and structure as your existing solution, so you should be able to find your way around.
You can also choose to generate a Client Project. Visual ReCode will produce
a standalone library project with the gRPC client generated from the
and a custom wrapper around that client which matches the interface of the old WCF
client. The generated project targets both .NET 4.5 and .NET Standard 2.1, so you
can use it in existing client applications to make the migration process easier.
Step 3: Save gRPC Migration
Provide a name for the migration you are creating. Visual ReCode will add a
migration file with this name and the
.recode extension to
Visual ReCode Solution Folder in your current solution. This file can be
checked into source control and used to re-run the migration as often as needed.
If you leave the Run migration now checkbox checked, the file will be saved and the migration will run immediately. Otherwise you can click the Run Migration button in the Migration document window.
Step 4: Building gRPC Solution
This is a non-interactive page that displays information about the gRPC solution model as it is built in memory. For large solutions this process may take a while.
Step 5: Solution Preview
The next page shows a tree view of the Solution that will be generated with all the generated and migrated files. If everything looks OK then click Next and the solution will be written to disk.
The progress bar shows the progress of writing the generated and migrated projects and documents to the new Solution. Once this is completed, you can open the new Solution in Visual Studio or File Explorer, or view the HTML Migration Report in your default browser. The Migration Report is included in the new Solution so you can review it at any time.