Strong Name Problems


C

Chubbly Geezer

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
 
Ad

Advertisements

R

ronchese

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
 
C

Chubbly Geezer

But 2005 has no assembly file. It appears to be part of 'My Project'.
"ronchese" <info(a)carsoftnet.com.br> wrote in message 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
 
C

Chubbly Geezer

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\WARCSubscriptionsLetterGenerator\Warc_Subs_Reporting.snk")>

<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.





But 2005 has no assembly file. It appears to be part of 'My Project'.
"ronchese" <info(a)carsoftnet.com.br> wrote in message 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
 
L

Luke Zhang [MSFT]

Hello,

We may try a simple test to isolate the problem, if we create a very simple
ASP.NET application on the server and display some Date and currency value,
will they in correct format?

Luke Zhang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
L

Luke Zhang [MSFT]

Please ignore the previous message.

Regarding the issue, what did you mean "propagates down to the referenced
Microsoft dll's". Can you tell what are the "Microsoft dlls" here? Are they
also not trong named?

Regards,


Luke Zhang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Ad

Advertisements

C

Chubbly Geezer

I am working with 2 dll's.

WARC_Subs_Reporting.dll
which contains all reporting functionality and also references

WARC_Standard_Functions.dll
which as the name suggests contain standard functionality. This references

Microsoft.Practices.EnterpriseLibrary.Data.dll
which is part of the 2006 Data Application Blocks from MS.


If I assign a strong name to WARC_Subs_Reporting.dll I get the massage
"Error 8 Unable to emit assembly: Referenced assembly
'WARC_Standard_Functions' does not have a strong name"

so I then assign a strong name to WARC_Standard_Functions.dll and get the
massage
"Error 8 Unable to emit assembly: Referenced assembly
'Microsoft.Practices.EnterpriseLibrary.Data' does not have a strong name"

Chubbly
 
C

Chubbly Geezer

Still looking for a solution I'm thinking that the problem is as simple as
the fact 'Microsoft.Practices.EnterpriseLibrary.Data' does not have a strong
name.
Seems rather obvious really considering it was distributed with all source
code.
I am now trying to assign a strong name but there seem to be a few issues
here also.

Chubbly
 
L

Luke Zhang [MSFT]

Hello Chubbly,

The Enterprise Library is not strong named by default, if you need to use
it in a strong named assembly, you need to add a key to the project and
recompile it. Here are some comments on this issue:

http://timstall.dotnetdevelopersjournal.com/enterprise_library_tips_for_stro
ng_names_and_versions.htm

Hope this help,

Luke Zhang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Ad

Advertisements

L

Luke Zhang [MSFT]

Thank you for the sharing. If you have any further questions, please feel
free to post in the community.

Regards

Luke Zhang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top