Embedding resources

  • Thread starter Thread starter Havic Ploccin
  • Start date Start date
H

Havic Ploccin

The LocalizedHelloWorld sample in help shows how to embed the default
resource into the main assembly. Is this really required? Can we not d this
and always require satellite assemblies? I tried this, but for some reason,
I could not provide the "correct" name to the resource manager, therefore it
did not know how to pick up the resource from the satellite assembly.

Any help is appreciated.
 
Technically yes, you do not need to place any resources in the main assembly
and always require a satellite assembly. However, in most cases developers
have 'primary' language that they target (here in the US, it tends to be
English). By placing the English resources in my main assembly I can
accomplish 3 goals:
1. Reduce the number of files I send to customers (and also reduce the total
size of my application of component on disk)
2. Increase the robustness of my application or component. If the 'default'
resources are embedded in the main assembly, and my assembly accidentally
gets copied/installed without a proper satellite assembly, it will still
work correctly (except it will output in the wrong language). I believe in
most cases consumers would prefer output in the wrong language rather than
no output.
3. Increase performance for the 'default' case by reduce the memory
requirements (there is overhead in the PE file format), and also decrease
resource loading time (since it will not have to find and load a different
file)

I'm not sure what you mean by the "correct" name. If you provide more info,
maybe I can help.
 
Back
Top