/win32res (Import a Win32 Resource File) (C# Compiler Options)
The /win32res option inserts a Win32 resource in the output file.
A Win32 resource file can be created with the Resource Compiler. The Resource Compiler is invoked when you compile a Visual C++ program; a .res file is created from the .rc file.
A Win32 resource can contain version or bitmap (icon) information that would help identify your application in the Windows Explorer. If you do not specify /win32res, the compiler will generate version information based on the assembly version.
This compiler option is unavailable in Visual Studio and cannot be changed programmatically.
Compile in.cs and attach a Win32 resource file rf.res to produce in.exe:
csc /win32res:rf.res in.cs