程序集生成失败 - 引用程序集没有强名称 [英] Assembly generation failed -- Referenced assembly does not have a strong name

查看:557
本文介绍了程序集生成失败 - 引用程序集没有强名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的程序是一个解决方案的C#项目之一,它的程序集位于相同的名称空间中。

My program is one of the C# project of a Solution of which assemblies are in the same name space.

我的程序引用了一个同名的DLL空间。

And my program references a DLL which is within the same name space.

我正在使我的项目可以从其他非托管程序(如C ++或VB6)调用。

I'm making my project to be callable from other unmanaged program like C++ or VB6.

我使用"&b"创建了强密钥文件。 sn -k TestKeyPair.snk"。

I created strong key file using "sn -k TestKeyPair.snk".

我添加了如下组件。

[assembly:AssemblyKeyFile((@" .. \ Deployment\Release\TestKeyPair.snk")]

[assembly: AssemblyKeyFile((@"..\Deployment\Release\TestKeyPair.snk")]

如果我重建,则会发生以下错误。

If I rebuild, following error occur.

Error	76	Assembly generation failed -- Referenced assembly 'MyRefDll' does not have a strong name


 

""MyRefDLL"是我的程序引用的dll。

 

"MyRefDLL" is the dll my program is referencing.

为什么会出现这种错误?

Why this error occur?

有人可以给我一些建议吗?

Can anybody give me some advice?

推荐答案

您好Jeff0803,

Hi Jeff0803,

感谢您发布此处。

如有问题,请参阅以下链接。

For your question, please refer to the links below.

https://stackoverflow.com/questions/331520/how-to-fix-referenced-assembly-does-not-have-a-strong-name -error

https://stackoverflow.com/questions/9391452/assembly-generation-failed-referenced-assembly-does-not-have-a-strong-name-wh

最好的问候,

Wendy


这篇关于程序集生成失败 - 引用程序集没有强名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆