/resource

Embeds a managed resource in an assembly.

/resource:filename[,name[,public|private]]
-or-
/res:filename[,name[,public|private]]

Arguments

  • filename
    The resource file you want to embed in the output file.

  • name[,public|private] (optional)
    The logical name for the resource; the name used to load the resource. The default is the name of the file. Optionally, you can specify whether the file is public or private in the assembly manifest. For example, /res:filename.res,myname.res,public. By default, filename is public in the assembly.

Remarks

Use the /resource option to link a resource to an assembly and not place the resource file in the output file.

If filename is a .NET Framework resource file created, for example, by the Resource File Generator (Resgen.exe) or in the development environment, it can be accessed with members in the System.Resources namespace (see System.Resources.ResourceManager for more information). For all other resources, use the GetManifestResource* methods in System.Reflection.Assembly class to access the resource at run time.

/res is the short form of /resource.

Example

Compile in.js and attach resource file rf.resource:

jsc /res:rf.resource in.js

See Also

Other Resources

JScript Compiler Options