vbnc(1)

πŸ“¦ version 4.7, in fedora 43, fedora 44, ubuntu jammy

πŸ’… vbnc β€” the Mono Visual Basic Compiler (yes bestie, vbnc(1), General Commands Manual, we're fancy like that)


✨ NAME ✨

vbnc, vbnc2 β€” the Mono Visual Basic Compiler. two icons, one job. πŸ’–


✨ SYNOPSIS ✨

vbnc [option] [source-files]

like. that's it. that's the whole vibe. πŸ¦‹


🌸 DESCRIPTION 🌸

vbnc is a CIL compiler for the VisualBasic.NET language. no cap. πŸŽ€

Apps you built on Windows with vbc can run on Mono, and apps you compiled with vbnc can run on the .NET runtime. cross-platform slay, honestly.

The Mono Visual Basic compiler accepts the exact same options as the Microsoft VB.NET compiler. and those options can start with a slash or a dash β€” /checked is the same thing as -checked. pick your fighter. πŸ’…

Visual Basic.NET source files normally end with a .vb extension. To compile VB.NET source code you need to hand over all the files that make up a library, module or executable, right there on the command line. there is no support for partial compilation. nope. none. so if you want the benefits of partial compilation, you compile your programs into their own assemblies and then reference them later with the -r flag. that's the move. ✨

The Mono Basic compiler generates images (.exe files) that contain CIL byte code, and those can be executed by any system implementing a Common Language Infrastructure virtual machine β€” like the Microsoft .NET runtime engine on Windows, or the Mono runtime engine on Unix systems. Executables are not bound to a specific CPU or operating system. platform-independent queen behavior. πŸ‘‘

By default the Mono Basic compiler only references these assemblies: mscorlib.dll, Microsoft.VisualBasic.dll, System.dll and System.Xml.dll. want extra libraries? you have to manually specify them yourself using the -r: command line option. the compiler is not a mind reader bestie 😭

The vbnc compiler is used to compile against the latest available profile (currently the 4.0 profile).

The vbnc2 compiler is used to compile against the 2.0 profile.


πŸŽ€ OPTIONS πŸŽ€

  • -addmodule:MODULE1[,MODULE2] β€” includes the modules you list in the resulting assembly. come through, modules 🫢
  • -codepage:ID β€” specifies the code page used to process the input files from the point it's specified onward. by default files get processed in the current code page. the compiler will also automatically detect Unicode/UTF8 files that have an embedded byte mark at the beginning. so it's got range. 🌈
  • Other popular encodings are 28591 (Latin1), 1252 (iso-8859-1) and 65001 (UTF-8). jot that down. πŸ“
  • -define:SYMLIST, -d:SYMLIST β€” defines the symbol listed by the semi-colon separated list SYMLIST SYMBOL. you can test it in the source code with the pre-processor, or it can be used by methods tagged with the Conditional attribute. ✨
  • -debug:AMOUNT β€” specify the amount of debugging information to emit. possible values for AMOUNT are "full" and "pdbonly". choose wisely πŸ’…
  • -imports:import-list β€” declares global Imports for the listed namespaces.
  • -ignorewarn:XXXX β€” ignores warning number XXXX. not me ignoring my problems... but make it warnings 😌
  • -lib:PATHLIST, -libpath:PATHLIST β€” each path specified in the comma-separated list directs the compiler to look for libraries in that specified path. go get your libraries bestie πŸ”
  • -main:CLASS β€” tells the compiler which CLASS or MODULE contains the entry point. super useful when you're compiling several classes that each have a Main method and you need to pick your main character. 🌟
  • -nologo β€” suppress printing copyright information on startup. minimalism era. ✨
  • -nostdlib, -nostdlib+ β€” use this flag if you want to compile the core library. this makes the compiler load its internal types from the assembly being compiled. hardcore. πŸ’€
  • -noconfig, -noconfig+ β€” disables the default compiler configuration from being loaded. by default the compiler has references to the system assemblies.
  • -nowarn β€” makes the compiler ignore warnings. blissful ignorance, but make it compiler-approved. πŸ™ˆ
  • -optioncompare:binary, -optioncompare:text β€” select between binary and text string comparisons. the default is binary string comparisons. βš–οΈ
  • -optionexplicit[+|-] β€” require explicit declaration of variables.
  • -optionstrict[+|-] β€” enforce strict language semantics. strict queen behavior, respect. πŸ‘‘
  • -out:FNAME, -o FNAME β€” names the output file to be generated.
  • -q -quiet β€” commands the compiler to show only error messages for syntax-related errors and warnings. quiet luxury πŸ’…
  • -resource:RESOURCE[,ID] β€” embeds the given resource file. the optional ID can be used to give a different name to the resource. if not specified, the resource name will be the file name. πŸŽ€
  • -linkresource:RESOURCE[,ID] β€” links to the specified RESOURCE. the optional ID can be used to give a name to the linked resource.
  • -r:ASSEMBLY1[,ASSEMBLY2], -r ASSEMBLY1[,ASSEMBLY2] β€” reference the named assemblies. use this to use classes from the named assembly in your program. the assembly will be loaded from either the system directory where all the assemblies live, or from the path explicitly given with the -L option. πŸ”—
  • You can also use a semicolon to separate the assemblies instead of a comma. two ways to do the same thing, we love options πŸ’–
  • -sdkpath:PATH β€” sets the path to the required framework assemblies (mscorlib.dll and Microsoft.VisualBasic.dll). to compile to a different profile than the default, use this option to point to the path of the mscorlib.dll of the profile you want to compile to.
  • -removeintchecks[+|-] β€” remove integer checks. default off.
  • -rootnamespace:namespace β€” specifies the root namespace for all type declarations.
  • -target:KIND, -t:KIND β€” used to specify the desired target. the possible values are: exe (plain executable), winexe (Windows.Forms executable), library (component libraries) and module (partial library). pick your destiny ✨
  • -utf8output[+|-] β€” emit compiler output in UTF8 character encoding. currently ignored. (it's giving "we'll get to it" 😭)
  • --version β€” shows the compiler version.
  • -warnaserror, -warnaserror+ β€” treat warnings as errors. no warnings allowed, we're perfect here πŸ’…

😭 STABILITY 😭

As of early 2011, the Mono Visual Basic compiler is still considered beta software. The compiler is feature-complete (targeting the Microsoft Visual Basic 8 compiler), however crashes are still occurring, most notably with incorrect code.

fr fr bestie β€” it's feature-complete but it can and will crash on bad code. treat it gently. 🫢

🫢 AUTHORS 🫢

See the ChangeLog for authors.


πŸ“œ LICENSE πŸ“œ

The Mono Visual Basic compiler is released under the terms of the GNU LGPL. Alternative licenses are available from Novell.


πŸ‘€ SEE ALSO πŸ‘€

mcs(1), mono(1), mint(1), sn(1)


πŸ› BUGS πŸ›

To report bugs in the compiler, you can file bug reports in our bug tracking system: http://bugzilla.ximian.com


πŸ’Œ MAILING LIST πŸ’Œ

The Mono Basic Mailing List is available at: mono-vb-list-request@ximian.com


and that's the whole page, bestie πŸ’œ this one's vbnc(1) from the General Commands Manual, dated 21 February 2006 β€” shoutout to whoever wrote it back then, hope they're thriving 🌸 ok bye, go compile something cute βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from