how to strongly sign an assembly and then add external resource

W

Wiktor Zychla

I have an assembly produced from *.il code. I sign it with a key file:

ilasm /dll /key=mykey.snk myfile.il

But if I then add an external resource (version info) to the library, the
main module refuses to run with an exception sauing that the strong name of
the module cannot be checked.

my question is: how then should I sign the assembly so I could also add
external resources to it?

Regards, Wiktor
 
M

Mattias Sjögren

Wiktor,
my question is: how then should I sign the assembly so I could also add
external resources to it?

Can't you include the resources at compile time with Ilasm's /resource
option?

If not, you can make a delay signed assembly (see the
AssemblyDelaySignAttribute), and then re-sign your assembly with
Sn.exe -R after you've added the resources.



Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top