我在Visual Studio 2005项目中添加了一个弱命名的程序集(它是强命名的)。我现在得到的错误:

"引用程序集'xxxxxxxx'没有强名称"

我需要签署这个第三方程序集吗?


当前回答

如果您的程序集也是无符号的,则可以使用无符号程序集。

其他回答

如果您的程序集也是无符号的,则可以使用无符号程序集。

我在使用NuGet安装的ServiceStack DLL文件时遇到了这个问题。原来还有另一组标记为已签名的DLL文件可用。这不是每个人的答案,但您可能只需要检查程序集的现有签名版本。

I had this issue for an app that was strongly named then had to change it in order to reference a non-strongly named assembly, so I unchecked 'Sign the assembly' in the project properties Signing section but it still complained. I figured it had to be an artifact somewhere causing the problem since I did everything else correctly and it was just that. I found and removed the line: [assembly: AssemblyKeyFile("yourkeyfilename.snk")] from its assemblyInfo.cs file. Then no build complaints after that.

我正在寻找解决同样问题的解决方案,取消“签署程序集”选项对我有用:

(正如你可能注意到的,截图来自Visual Studio 2010,但希望它能帮助到一些人。)

对我来说,我的问题是我有两个相同的NuGet包安装了不同的版本。