System.Reflection.Emit.AssemblyBuilder.AddResourceFile Method

Adds an existing resource file to this assembly.

Syntax

public void AddResourceFile (string name, string fileName)

Parameters

name
The logical name of the resource.
fileName
The physical file name (.resources file) to which the logical name is mapped. This should not include a path; the file must be in the same directory as the assembly to which it is added.

Remarks

fileName should not be the same as that of any other persistable module, standalone managed resource, or the standalone manifest file.

The managed resources in the file are assumed to be public.

The specified resource file must be in the directory where the assembly will be saved.

Note:

Starting with the net_v20sp1_long, this member no longer requires System.Security.Permissions.ReflectionPermission with the System.Security.Permissions.ReflectionPermissionFlag.ReflectionEmit flag. (See Security Issues in Reflection Emit.) To use this functionality, your application should target the net_v35_long or later.

Requirements

Namespace: System.Reflection.Emit
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0