Skip to content

Smallbasic-n/CodeConverter

 
 

Repository files navigation

Code Converter Build Status

Convert code from VB.NET to C# and vice versa using Roslyn - all free and open source:

Visual Studio Extension

Adds context menu items to convert projects/files between VB.NET and C#. See the wiki documentation for help using it.

Download from Visual Studio Marketplace (Requires VS 2017 15.7+)

  • Flexible: Convert a small selection, or a whole solution in one go, in either direction.
  • Accurate: Full project context (through Roslyn) is used to get the most accurate conversion.
  • Safe: Conversion runs entirely locally - your code doesn't leave your machine.
  • Completely free and open source GitHub project.
  • Integrated: Uses the Output window to show conversion progress / summary.
  • Actively developed: User feedback helps us continuously strive for a more accurate conversion.

Selected text conversion context menu

Contributing

Let us know what needs improving. If you want to get involved in writing the code yourself, even better! We've already had code contributions from several first time GitHub contributors, so don't be shy! See Contributing.md for more info.

Currently, the VB -> C# conversion quality is higher than the C# -> VB conversion quality. This is due to demand of people raising issues and supply of developers willing to fix them. But we're very happy to support developers who want to contribute to either conversion direction. Visual Basic will have support for some project types on initial versions of .NET 5, but won't be getting new features according to the .NET Team Blog.

Other ways to use the converter

  • Latest CI build (potentially less stable):
    • See latest build
    • Uninstall current version, then install VSIX file inside "1 published" artifact
  • Integrating the NuGet library

Building/running from source

  1. Ensure you have .NET Core SDK 3.1+
  2. Open the solution in Visual Studio 2017+
  3. To run the website, set CodeConverter.Web as the startup project
  4. To run the Visual Studio extension, set Vsix as the startup project
    • A new instance of Visual Studio will open with the extension installed

History

A spiritual successor of the code conversion within SharpDevelop and later part of Refactoring Essentials, the code converter was separated out to avoid difficulties with different Visual Studio and Roslyn versions.

More screenshots

About

Convert code from C# to VB.NET and vice versa using Roslyn

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 90.2%
  • Visual Basic .NET 8.7%
  • HTML 0.6%
  • PowerShell 0.2%
  • JavaScript 0.2%
  • CSS 0.1%