The Microsoft Code Analysis encourages me to strong name all assemblies. But according to Microsoft I have to manually disable the "Bypass Feature" that they are checked.
So since .NET Framework version 3.5 Service Pack 1 strong names are not validated.
Why should I still sign my assemblies with a strong name?
Thanks! Stefan
What the error means. "Strong Name : Indicates that the reference has been signed with a key pair." If your current project's assembly is signed, then all your reference assemblies must also be signed. Failure to do so will result in this error.
You can turn off strong name validation for an assembly by using the sn.exe utility that ships with the framework. This is helpful if you want to add an assembly to the GAC that is delay signed.
A strong name consists of the assembly's identity, simple text name, version number, and culture information (if provided)—plus a public key and a digital signature. Strong names serve to identify the author of the code.
So since .NET Framework version 3.5 Service Pack 1 strong names are not validated
Well, as a blanket statement that is not actually true. It is partially true, they are no longer validated iff the app runs in Full Trust and the assembly is stored in a trusted location. Local machine or Intranet zone.
At build time you have no reliable idea whatsoever where the assembly is ultimately going to be stored. You might have a deployment plan but plans like this tend to be overruled whenever it is convenient or necessary. This includes the need for a strong name when you need to store the assembly in the GAC. A work-around for a DLL Hell problem perhaps, something that may well need to be done years from now.
Pretty doggone inconvenient that such as solution isn't available because you didn't strong-name the assembly. And almost always too late to do anything about it by then since it requires rebuilding everything. Strong-naming is dead-simple, few good reasons to skip it. Or just suppress the message if you disagree with it, code analysis rules do fit the "have you considered this?" category of warnings. Gentle reminders of obscure details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With