Skip to content
Convert code from C# to VB.NET and vice versa using Roslyn
Branch: master
Clone or download
Pull request Compare This branch is 52 commits behind icsharpcode:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
.nuget
CodeConverter.Web
ICSharpCode.CodeConverter
TestData
Tests
Vsix
.editorconfig
.gitignore
CHANGELOG.md
CodeConverter.sln
LICENSE
README.md
appveyor.yml

README.md

Code Converter Build status

Convert code from VB.NET to C# and vice versa via Roslyn using a Visual Studio Extension or Online snippet converter

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.9.3+)

  • 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.

Other ways to use the converter

Building/running from source

  1. Ensure you have .NET Core SDK 2.2+
  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 and in the project properties, set:
  • "Start external program" to C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.exe
  • "Command line arguments" to /rootsuffix Roslyn

History

This was previously part of Refactoring Essentials. However, because of the way analyzers are tied to Visual Studio and Roslyn versions made it super-hard to co-evolve the code converter bits. That is why we teased the converters out and they are now a self-contained entity.

More screenshots

You can’t perform that action at this time.