CompilerParameters.Win32Resource Property

Definition

Gets or sets the file name of a Win32 resource file to link into the compiled assembly.

C#
public string Win32Resource { get; set; }

Property Value

A Win32 resource file that will be linked into the compiled assembly.

Remarks

Linking files through this property is similar to the /winres and /winresource command-line arguments supported by many of the .NET Framework compilers.

Use Win32Resource to compile a Win32 resource file into the assembly. Use EmbeddedResources or LinkedResources to compile with .NET Framework resource files.

Not all compilers support Win32 resource files, so you should test a code generator for this support before linking a resource file by calling the Supports method with the flag Win32Resources.

Applies to

Produkt Verzie
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also