mirror of
https://github.com/brutaldev/StrongNameSigner.git
synced 2026-04-25 11:26:04 +03:00
[GH-ISSUE #28] Friend assembly references are not updated with new keys. #24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @loicmorvan on GitHub (Jan 6, 2017).
Original GitHub issue: https://github.com/brutaldev/StrongNameSigner/issues/28
As you may know, when declaring a friend assembly with the attribute
InternalsVisibleTo, the public key of the friend assembly must be provided.When signing assemblies with StrongNameSigner, the tool updates references very well, except these
InternalsVisibleTowhich then reference unsigned versions of the friend assemblies.This leads to errors at loading.
Can you make the tool manage these cases?
Thanks!
@brutaldev commented on GitHub (Jan 6, 2017):
InternalsVisibleToare also corrected or removed (since v1.4.4) depending on whether the dependencies can be found. I suspect you are signing separately and not including all the assemblies you want to fix as a group.Make sure you are using the latest version and providing all the assemblies you want to fix at the same time instead of trying to sign each one individually. If assemblies are left with
InternalsVisibleTopointing to assemblies that are not signed you will get loading errors. Refer to Dealing with Dependencies for how to include all the related assemblies in one batch.@loicmorvan commented on GitHub (Jan 6, 2017):
I sign an entire folder with the command line tool and the option '-in'. The version of StrongNameSigner installed is the latest.
I will triple check and try to reproduce what I said in order to give material.
@brutaldev commented on GitHub (Jan 6, 2017):
For reference,
InternalsVisibleToattributes are updated on line 309 of the signing helper.I've just re-enabled the unit tests locally for the fix method to include the public key in the attribute and verified it also works by inspecting with Reflector/ILDasm. The test assemblies have attribute stubs to verify this quite easily already.
If you can produce a sample project where you believe the fixes are not being applied correctly I can help debug it.