G
Guest
I'd like to create a satellite assembly dynamically, embedding rather than
linking resource files. I know I can use the assembly linker (al.exe) to
embed a .resources file, but I'd like to do it programmatically, using
something like the AssemblyBuilder class.
This is the same question that Nick Carter asked before. I've pasted his
post below, it case it clarifies things for anyone.
------ Nick Cases original post -----
al.exe has a /embed switch which allows me to create an assembly and embed a
resource in it. I want to duplicate this behaviour using the AssemblyBuilder
class. AssemblyBuilder has two methods, AddResourceFile and DefineResource,
which allow me to add resources to an assembly but AFAICS the files which
are specified using these methods are simply referenced - they are not
embedded. The resulting assembly still needs the .resource file to be
present at runtime. How can I use AssemblyBuilder to add resources to an
assembly where the resources are embedded (i.e. they have their
ResourceLocation.Embedded and ResourceLocation.ContainedInManifestFile flags
set just like al.exe does when using the /embed switch) ?
linking resource files. I know I can use the assembly linker (al.exe) to
embed a .resources file, but I'd like to do it programmatically, using
something like the AssemblyBuilder class.
This is the same question that Nick Carter asked before. I've pasted his
post below, it case it clarifies things for anyone.
------ Nick Cases original post -----
al.exe has a /embed switch which allows me to create an assembly and embed a
resource in it. I want to duplicate this behaviour using the AssemblyBuilder
class. AssemblyBuilder has two methods, AddResourceFile and DefineResource,
which allow me to add resources to an assembly but AFAICS the files which
are specified using these methods are simply referenced - they are not
embedded. The resulting assembly still needs the .resource file to be
present at runtime. How can I use AssemblyBuilder to add resources to an
assembly where the resources are embedded (i.e. they have their
ResourceLocation.Embedded and ResourceLocation.ContainedInManifestFile flags
set just like al.exe does when using the /embed switch) ?