Closed loicmorvan closed 7 years ago
InternalsVisibleTo
are 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 InternalsVisibleTo
pointing 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.
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.
For reference, InternalsVisibleTo
attributes 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.
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
InternalsVisibleTo
which then reference unsigned versions of the friend assemblies.This leads to errors at loading.
Can you make the tool manage these cases? Thanks!