Make LinkedResource actually useful #132

Open
wants to merge 2 commits into
from

3 participants

@poizan42

LinkedResource currently isn't very useful. You cannot set the name in the file table except by specifying the actual path the hash is calculated from.
Unless you change your current working directory to the directory of the assembly, you have to specify the full path to the resource, resulting in that full path being recorded in the assembly - which is definitely never what you want, and breaks terribly if you ever try to deploy such an assembly.
Otherwise if you specify a path that doesn't exists when writing the file you end up with an empty hash. This makes sn.exe (the strong name tool) unable to recalculate the hash as no space is reserved in the assembly.

These changes attempts to fix that by letting the user explicitly specify the name in the file table independently of the file path and the resource name, as well as letting the user specify the hash to be delay calculated (fills in a zero hash) as well as explicitly specifying the hash.

@poizan42

Hey @jbevain could I persuade you into taking a quick look at this? I'm trying to create that piece of "external automation" mentioned in this System.Data.SQLite issue, but I would rather not have to maintain my own fork just for that - and it would probably improve my chances of convincing them to use that for the official builds.

@imuzzolini

I just want to vote for poizan42 proposal. I am having the same problem!

@jbevain
Owner

I'll have a look, thanks for reporting the issue!

@poizan42

Uhm bump? Anything I can do to have this merged?

@poizan42

@jbevain or anyone else with push access?

@poizan42

Bump?

poizan42 added some commits Apr 30, 2013
@poizan42 poizan42 Make LinkedResource actually useful; allow specifying how to calculat…
…e hash, explicitly setting file name of resource in assembly and allow for delay calculated hash using e.g. sn.exe -Ra
aeadaba
@poizan42 poizan42 More LinkedResource improvements:
Invalidate old data when HashSource / File is changed.
Detect delay hashed linked resources when reading assembly.
66a9b4b
@poizan42

Rebased and fixed indentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment