I tested a free and useful converter and feel good about it. It really can save my time to convert a VB project at least 50% of my time.
At codeproject.com, there are some wonderful posts with VB project demos and I got many inspirations. I would like to convert them to C# projects.
So which tool should be used? There are many on the Internet, but I found this code converter from SharpDevelop Team. It can convert an entire VB project to C# project. So I gave it a try and am sharing some lessons & thoughts here.
Go to this site to get vsix file and save it to your local machine.
Double click this downloaded file and it will automatically install on your machine.
Converting a Simple Project
I would like to use reference  as a test. Download it and unzip it into your local folder.
Load it into your Visual Studio 2019. Inside Solution Explorer, select this project name and you will see this context menu:
Right click this project name and you will see this context menu:
Select convert to C# item and you will get this project converted to C# successfully:
Go to the same project folder, find csproj file and open this project. Compile it and you will see it has no errors in building process. You can run it without any problem.
One more project is converted and the source code is attached.
Magic Graphics is a another conversion from VB project. the source code is attached. this project needs some manual fixes after using this converter: mainly type conversion and a ref & out variable at the same time refactoring.
Converting a Complex Project
I tested the project in reference  and it ran into many errors in build process.
This solution has two projects. So you need to convert one project at a time.
I have to fix these errors one by one. Also, I need to review the corresponding .vb file to understand the original logic.
The first thing is to turn on Option Strict and Option Explicit. This will generate most of type conversion errors and I need to fix them one by one.
Points of Interest
It turns out this tool has challenges in converting VB form designer code. I think manual conversion is required to get a successful conversion.
An online version of converter in reference is very helpful to convert one class.
- Code Converter (VB - C#)
- ICSharpCode Converter
- Rubberband Lines
- A PictureBox with Zoom, Grid and Rulers
- Prepare Visual Basic for Conversion to C#
- Resize and Rotate Shapes in GDI+
- Magic Graphics
- 27th May, 2022: Initialized this post
turns good thoughts into actions...