Why can't strongly named assemblies use assemblies that aren't signed?

后端 未结 3 1469
春和景丽
春和景丽 2021-01-19 02:04

To sign an assembly A you have to make sure all assemblies B, C, D that are used by A are signed, and then all assemblies that are used by B, C, D, and so on. I don\'t under

3条回答
  •  孤街浪徒
    2021-01-19 02:59

    Another reason for strong naming is versioning. If you reference a strong named assembly, you get that specific version - and it will load its dependencies at the specific versions it relies upon.

    EDIT

    Example scenario: If you put an assembly in the GAC, it has to be strong named to allow side-by-side versioning. You couldn't put it in the GAC, though, unless its dependencies were also there (otherwise, they'd fail to load at run time). In order for those assemblies to be loaded reliably, they need to be strong named too, and in the GAC.

提交回复
热议问题