Вопрос

I have an assembly which contatins assemblies (made with ILMerge). I wanted to sign this assembly with AL.exe but it turned up that AL.exe cannot sign assemblies which contains assemblies. How can I sign assembly which contains assemblies?

Это было полезно?

Решение

Here it is.

Under the default settings, the merged assembly is not signed. This can be a problem if the software that uses it requires an assembly with a strong name. Luckily, ILMerge includes an option that permits the merged assembly to be signed using a key file, which will usually have an extension of SNK. Key files can be generated by Visual Studio or the strong name tool (sn.exe) that ships with the .NET Framework. To merge assemblies and sign the result, you should use the /keyfile switch. The switch is followed by a colon (:) and the name of the key file.

Example:

ilmerge /out:Merged.dll /keyfile:key.snk Primary.dll Secondary.dll

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top