/win32resource

Inserts a Win32 resource file in the output file.

Syntax

/win32resource:filename  

Arguments

filename
The name of the resource file to add to your output file. Enclose the file name in quotation marks (" ") if it contains a space.

Remarks

You can create a Win32 resource file with the Microsoft Windows Resource Compiler (RC).

A Win32 resource can contain version or bitmap (icon) information that helps identify your application in File Explorer. If you do not specify /win32resource, the compiler generates version information based on the assembly version. The /win32resource and /win32icon options are mutually exclusive.

See /linkresource (Visual Basic) to reference a .NET Framework resource file, or /resource (Visual Basic) to attach a .NET Framework resource file.

Note

The /win32resource option is not available from within the Visual Studio development environment; it is available only when compiling from the command line.

Example

The following code compiles In.vb and attaches a Win32 resource file, Rf.res:

vbc /win32resource:rf.res in.vb  

See Also

Visual Basic Command-Line Compiler
Sample Compilation Command Lines