Events
Mar 17, 11 PM - Mar 21, 11 PM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Embeds a managed resource in an assembly.
-resource:filename[,identifier[,public|private]]
or
-res:filename[,identifier[,public|private]]
Term | Definition |
---|---|
filename |
Required. The name of the resource file to embed in the output file. By default, filename is public in the assembly. Enclose the file name in quotation marks (" ") if it contains a space. |
identifier |
Optional. The logical name for the resource; the name used to load it. The default is the name of the file. Optionally, you can specify whether the resource is public or private in the assembly manifest, as with the following: -res:filename.res, myname.res, public |
Use -linkresource
to link a resource to an assembly without placing the resource file in the output file.
If filename
is a .NET Framework resource file created, for example, by the Resgen.exe (Resource File Generator) or in the development environment, it can be accessed with members in the System.Resources namespace (see ResourceManager for more information). To access all other resources at run time, use one of the following methods: GetManifestResourceInfo, GetManifestResourceNames, or GetManifestResourceStream.
The short form of -resource
is -res
.
For information about how to set -resource
in the Visual Studio IDE, see Managing Application Resources (.NET).
The following code compiles In.vb
and attaches resource file Rf.resource
.
vbc -res:rf.resource in.vb
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Events
Mar 17, 11 PM - Mar 21, 11 PM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register now