cs2vb 6.0.1
dotnet tool install --global cs2vb --version 6.0.1
dotnet new tool-manifest
dotnet tool install --local cs2vb --version 6.0.1
#tool dotnet:?package=cs2vb&version=6.0.1
nuke :add-package cs2vb --version 6.0.1
cs2vb
Converts C# to Visual Basic from the command line, in a terminal window, or in a Windows window: snippets, files, folders, projects, solutions, zips and links to code on GitHub or GitLab.
Install
dotnet tool install --global cs2vb
Needs the .NET 10 runtime. The Windows window (--gui) is Windows only and needs the .NET Desktop runtime; the rest runs on Windows, Linux and macOS.
Use
cs2vb open the Windows window (on Windows; the terminal window elsewhere)
cs2vb . convert the current folder into ..\<folder>_vb
cs2vb MyApp.sln convert a solution (or a .csproj)
cs2vb Program.cs print the Visual Basic of a file
cs2vb Program.cs -o Program.vb write it to a file
cs2vb app.zip convert a zip of C# code
cs2vb https://github.com/owner/repo download and convert code (also GitLab, gists and links to zip files)
echo "var x = 1;" | cs2vb - convert what is on the standard input
cs2vb --tui [input] the terminal window
cs2vb --gui [input] the Windows window
cs2vb --help every option
Progress is shown on the standard error output, the report on the standard output (-q for just a line, --report <file> to keep the Markdown report).
When the folder for the converted files already has files in it, nothing is converted unless --existing says what to do with them (overwrite, recycle, backup, backup-replace, zip or delete).
Exit codes: 0 converted, 1 failed or stopped, 2 the command line is wrong, 3 converted, with files left to fix by hand.
Source and license
https://github.com/DualBrain/CSharpToVB, MIT license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.