M
Michael B. Trausch
I am hoping that someone will help me to understand why the CLR
provides support for embedding arbitrary resources into executable
files. Most of the time that I find that I need to bundle data with an
application for deployment, I find that the data that should be
bundled also sometimes needs to be easily replaced in-between
application deployments.
Using a .dll assembly to bundle data is certainly possible since it'd
be replaceable---as long as it's not strongly named, as I understand
it. Also, as I understand it, you cannot update the resources (since
this would also defeat the purpose of strong named assemblies) and that
means that using small embedded databases which are flat files and
embedded in assemblies is probably not a very good idea.
What I typically do is for collections of small, static files which may
need to be updated is just bundle them in a tar archive which has an
associated digital signature which is generated with some form of
OpenPGP (usually GnuPG). This way, the signature is easily verified
against the file and when the file is updated, so is the signature
(which is of course contained in a separate file). If the signature
doesn't match the file, then I know that the file has been altered,
and can throw an error.
For resources like xBase database files or SQLite databases, I rely
upon trusting the user to not modify these files unless they know
pretty well what they're doing (and of course, if they modify them and
something breaks, that's their doing not mine).
In any case, I am just wondering what the typical use case for
embedding resources into assemblies is, and why.
--- Mike
provides support for embedding arbitrary resources into executable
files. Most of the time that I find that I need to bundle data with an
application for deployment, I find that the data that should be
bundled also sometimes needs to be easily replaced in-between
application deployments.
Using a .dll assembly to bundle data is certainly possible since it'd
be replaceable---as long as it's not strongly named, as I understand
it. Also, as I understand it, you cannot update the resources (since
this would also defeat the purpose of strong named assemblies) and that
means that using small embedded databases which are flat files and
embedded in assemblies is probably not a very good idea.
What I typically do is for collections of small, static files which may
need to be updated is just bundle them in a tar archive which has an
associated digital signature which is generated with some form of
OpenPGP (usually GnuPG). This way, the signature is easily verified
against the file and when the file is updated, so is the signature
(which is of course contained in a separate file). If the signature
doesn't match the file, then I know that the file has been altered,
and can throw an error.
For resources like xBase database files or SQLite databases, I rely
upon trusting the user to not modify these files unless they know
pretty well what they're doing (and of course, if they modify them and
something breaks, that's their doing not mine).
In any case, I am just wondering what the typical use case for
embedding resources into assemblies is, and why.
--- Mike