Re: Resource Files
From: Richard Grimes [MVP] (read)
Date: 01/01/05
- Next message: Brandon Potter: "Re: For Loop function?"
- Previous message: Richard Grimes [MVP]: "Re: Assembly versioning and product updates"
- Next in thread: Steven Cheng[MSFT]: "Re: Resource Files"
- Reply: Steven Cheng[MSFT]: "Re: Resource Files"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 1 Jan 2005 21:42:37 -0000
Steven Cheng[MSFT] wrote:
> Hi Platinumbay,
>
> Thanks for your posting. As for the embeded resource in a .net
> assembly, they're part of the assembly's binary file so we can't
> manually modify them without recompiling the whole assembly. If there
> is some resources that we need to change frequently, it is recommend
> that we put them in a separate assembly file which only contains
> resources so that we can only recompile that assembly when changing
> some resources in it. Thanks.
In addition, if the assembly that links the resource file is strong named it
means that you cannot change the external resource file. The reason is that
when you link a resource file a hash of the resource file is added to the
assembly's manifest. If the assembly is strong named then a hash is created
of the assembly (including all resources and hashes of external - linked -
resources) and this is signed with the private key. The signed hash and the
public key are stored in the assembly. When the assembly is loaded the
loader creates a hash, then it decrypted the signed hahs with the public key
and compares the two hashes. If the two are not the same then it means that
the assembly has changed and so the assembly is not loaded. Thus if you
change the external resource, it means that its hash is not the same, and so
the hash of the assembly is different. This is by design.
Richard
-- www.richardgrimes.com my email evpuneqt@zicf.bet is encrypted with ROT13 (www.rot13.org)
- Next message: Brandon Potter: "Re: For Loop function?"
- Previous message: Richard Grimes [MVP]: "Re: Assembly versioning and product updates"
- Next in thread: Steven Cheng[MSFT]: "Re: Resource Files"
- Reply: Steven Cheng[MSFT]: "Re: Resource Files"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|