强名称问题 [英] Strong Name Problems

查看:95
本文介绍了强名称问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究以前一直在运行的VB 2005 DLL。我
会创建DLL(reporting.dll),安装它,运行''gacutil''和''regasm''

我的Access 2000 DB可以看到它我最近添加了一些新的功能,其中包括将一些类拆分成另一个DLL(sharedfunctions.dll),由

原始DLL。现在,如果我从VB测试应用程序运行它,它工作正常。

然而,''gacutil''现在无法声称''reporting.dll''需要强大的

name。


我试过通过''我的项目'为''reporting.dll'创建一个* .snk文件,但是我

得到另一个错误然后在VB中说''错误1无法发出汇编:

引用汇编''SharedFunctions''没有强名称''。我再次为这个DLL创建了一个* .snk文件,但是这个错误似乎传播了

,直到引用了Microsoft dll'。

我很难过。请给我任何想法。


Chubbly

I have been working on a VB 2005 DLL which has previously been working. I
would create the DLL (reporting.dll), install it, run ''gacutil'' and ''regasm''
and my Access 2000 DB could see it and use it.

I have recently added some new functionality, which included splitting out
some classes into another DLL (sharedfunctions.dll), referenced by the
original DLL. Now if I run this from a VB test app, it works fine.
However, the ''gacutil'' now fails claiming ''reporting.dll'' needs a strong
name.

I''ve tried created an *.snk file via ''my project'' for ''reporting.dll'', but I
get another error then within VB saying ''Error 1 Unable to emit assembly:
Referenced assembly ''SharedFunctions'' does not have a strong name''. Again I
created an *.snk file for this DLL but the error just seems to propagate
down to refernced Microsoft dll''s.

I''m stumped. Any ideas please.

Chubbly

推荐答案

你需要编写代码来指向那个snk文件在AssemblyInfo文件中的dll:


< Assembly:AssemblyVersion(" 1.0.0.0")>

< Assembly:AssemblyFileVersion(" 1.0.0.0")>

< Assembly:AssemblyKeyFile(" C:\somedirectory\somefile.snk")>


[] s

Cesar

" Chubbly Geezer" < CH ************ @ newsgroup.nospam>在消息新闻中写道:ur ************** @ TK2MSFTNGP03.phx.gbl ...
You need to write code to point that snk file with the dll, in the AssemblyInfo file:

<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>
<Assembly: AssemblyKeyFile("C:\somedirectory\somefile.snk")>

[]s
Cesar
"Chubbly Geezer" <ch************@newsgroup.nospam> wrote in message news:ur**************@TK2MSFTNGP03.phx.gbl...
我一直在研究以前曾经使用的VB 2005 DLL工作。我将创建DLL(reporting.dll),安装它,运行''gacutil''和''regasm''
我的Access 2000 DB可以看到并使用它。

我最近添加了一些新功能,其中包括将某些类拆分为另一个DLL(sharedfunctions.dll),由原始DLL引用。现在,如果我从VB测试应用程序运行它,它工作正常。
然而,''gacutil''现在无法声称''reporting.dll''需要一个强大的名称。

我试过创建了一个* .snk文件通过''我的项目''''reporting.dll'',但我在VB中得到另一个错误,说''错误1无法发出汇编:
引用程序集''SharedFunctions''没有一个强大的名字''。我再次为这个DLL创建了一个* .snk文件,但错误似乎只是传播到了引用微软的dll。

我很难过。请问任何想法。

Chubbly
I have been working on a VB 2005 DLL which has previously been working. I
would create the DLL (reporting.dll), install it, run ''gacutil'' and ''regasm''
and my Access 2000 DB could see it and use it.

I have recently added some new functionality, which included splitting out
some classes into another DLL (sharedfunctions.dll), referenced by the
original DLL. Now if I run this from a VB test app, it works fine.
However, the ''gacutil'' now fails claiming ''reporting.dll'' needs a strong
name.

I''ve tried created an *.snk file via ''my project'' for ''reporting.dll'', but I
get another error then within VB saying ''Error 1 Unable to emit assembly:
Referenced assembly ''SharedFunctions'' does not have a strong name''. Again I
created an *.snk file for this DLL but the error just seems to propagate
down to refernced Microsoft dll''s.

I''m stumped. Any ideas please.

Chubbly



但是2005没有汇编文件。它似乎是我的项目的一部分。

" ronchese" <信息的(a)carsoftnet.com.br>在消息新闻中写道:O1 ************** @ TK2MSFTNGP03.phx.gbl ...

您需要编写代码来指向带有dll的snk文件,在AssemblyInfo文件中:


< Assembly:AssemblyVersion(" 1.0.0.0")>

< Assembly:AssemblyFileVersion(" 1.0.0.0")>

< Assembly:AssemblyKeyFile(" C:\somedirectory\somefile.snk")>


[] s

Cesar

" Chubbly Geezer" < CH ************ @ newsgroup.nospam>在消息新闻中写道:ur ************** @ TK2MSFTNGP03.phx.gbl ...
But 2005 has no assembly file. It appears to be part of ''My Project''.
"ronchese" <info(a)carsoftnet.com.br> wrote in message news:O1**************@TK2MSFTNGP03.phx.gbl...
You need to write code to point that snk file with the dll, in the AssemblyInfo file:

<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>
<Assembly: AssemblyKeyFile("C:\somedirectory\somefile.snk")>

[]s
Cesar
"Chubbly Geezer" <ch************@newsgroup.nospam> wrote in message news:ur**************@TK2MSFTNGP03.phx.gbl...
我一直在研究以前曾经使用的VB 2005 DLL工作。我将创建DLL(reporting.dll),安装它,运行''gacutil''和''regasm''
我的Access 2000 DB可以看到并使用它。

我最近添加了一些新功能,其中包括将某些类拆分为另一个DLL(sharedfunctions.dll),由原始DLL引用。现在,如果我从VB测试应用程序运行它,它工作正常。
然而,''gacutil''现在无法声称''reporting.dll''需要一个强大的名称。

我试过创建了一个* .snk文件通过''我的项目''''reporting.dll'',但我在VB中得到另一个错误,说''错误1无法发出汇编:
引用程序集''SharedFunctions''没有一个强大的名字''。我再次为这个DLL创建了一个* .snk文件,但错误似乎只是传播到了引用微软的dll。

我很难过。请给我任何想法。

Chubbly
I have been working on a VB 2005 DLL which has previously been working. I
would create the DLL (reporting.dll), install it, run ''gacutil'' and ''regasm''
and my Access 2000 DB could see it and use it.

I have recently added some new functionality, which included splitting out
some classes into another DLL (sharedfunctions.dll), referenced by the
original DLL. Now if I run this from a VB test app, it works fine.
However, the ''gacutil'' now fails claiming ''reporting.dll'' needs a strong
name.

I''ve tried created an *.snk file via ''my project'' for ''reporting.dll'', but I
get another error then within VB saying ''Error 1 Unable to emit assembly:
Referenced assembly ''SharedFunctions'' does not have a strong name''. Again I
created an *.snk file for this DLL but the error just seems to propagate
down to refernced Microsoft dll''s.

I''m stumped. Any ideas please.

Chubbly



好的,所以我找到了AssemblyInfo.vb文件。它现在包含:

< Assembly:AssemblyTitle(" WARC_Subs_Reporting")>


< Assembly:AssemblyDescription(" WARC_Subs_Reporting")>


< Assembly:AssemblyCompany(" WARC")>


< Assembly:AssemblyProduct(" Subscriptions")>


< Assembly:AssemblyCopyright(" Copyright?2006")>


< Assembly:AssemblyTrademark("")>


< Assembly:AssemblyVersion(" 1.0.0.2")>


< Assembly:AssemblyFileVersion(" 1.0.0.2")>


< Assembly:AssemblyKeyFile(" C:\ WARC\VB.Net\Subscriptions\WARC SubscriptionsLetterGenerator\Warc_Subs_Reporting.s nk")>


<汇编:ComVisible(True)>


''如果此项目向COM公开,则以下GUID用于类型库的ID


< Assembly:Guid(" ; c7bcfd3f-c4d4-45eb-9c86-41cba6e65d74")>


但它仍然传播到引用的Microsoft dll'。


" Chubbly Geezer" < CH ************ @ newsgroup.nospam>在消息新闻中写道:你
OK, so I found the AssemblyInfo.vb file. It now contains:
<Assembly: AssemblyTitle("WARC_Subs_Reporting")>

<Assembly: AssemblyDescription("WARC_Subs_Reporting")>

<Assembly: AssemblyCompany("WARC")>

<Assembly: AssemblyProduct("Subscriptions")>

<Assembly: AssemblyCopyright("Copyright ? 2006")>

<Assembly: AssemblyTrademark("")>

<Assembly: AssemblyVersion("1.0.0.2")>

<Assembly: AssemblyFileVersion("1.0.0.2")>

<Assembly: AssemblyKeyFile("C:\WARC\VB.Net\Subscriptions\WARC SubscriptionsLetterGenerator\Warc_Subs_Reporting.s nk")>

<Assembly: ComVisible(True)>

''The following GUID is for the ID of the typelib if this project is exposed to COM

<Assembly: Guid("c7bcfd3f-c4d4-45eb-9c86-41cba6e65d74")>

But it still propagates down to the referenced Microsoft dll''s.

"Chubbly Geezer" <ch************@newsgroup.nospam> wrote in message news:u


这篇关于强名称问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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