PC Review


Reply
Thread Tools Rate Thread

C#,COM & Strong name file

 
 
=?Utf-8?B?bXN1aw==?=
Guest
Posts: n/a
 
      7th Feb 2005
All,

I have a C# COM+ component and have created a strong name file using the
sn.exe.
In my AssembleyInfo.cs I have added the following:

[assembly: AssemblyKeyFile("xxxx.snk")]

My question is when I deploy the COM+ component to the production server do
I need to deploy the strong name file as well? If so where should the strong
name file go same directory as the COM+ component?

Thanks
Msuk

 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      7th Feb 2005
Msuk,

Once you compile the assembly, you do not need to distribute the strong
name file (nor should you!). You just have to deploy the assembly.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"msuk" <(E-Mail Removed)> wrote in message
news:F1FB5EC0-BC55-4D4A-B90F-(E-Mail Removed)...
> All,
>
> I have a C# COM+ component and have created a strong name file using the
> sn.exe.
> In my AssembleyInfo.cs I have added the following:
>
> [assembly: AssemblyKeyFile("xxxx.snk")]
>
> My question is when I deploy the COM+ component to the production server
> do
> I need to deploy the strong name file as well? If so where should the
> strong
> name file go same directory as the COM+ component?
>
> Thanks
> Msuk
>



 
Reply With Quote
 
clu
Guest
Posts: n/a
 
      9th Feb 2005
Yes,

If you look at your assembly's manifest (you can use ildasm.exe to
inspect it) you will notice that the public key for your assembly has
been inserted into the assembly's metadata.

One of the best feature of .NET metadata (compared, for example, to the
COM way of loading / referencing types) is that they are
self-consistent, i.e. all information is embedded into the metadata and
no component is created without its own metadata.

Regards.


Claudio Brotto

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strong Name Key (SNK) File Tackie Microsoft Dot NET 3 26th Oct 2005 11:28 AM
Strong Name Key (SNK) File Tackie Microsoft VB .NET 3 26th Oct 2005 11:28 AM
Re: Strong Naming a Non-Strong Named assembly Joyjit Mukherjee Microsoft Dot NET Framework 0 24th Aug 2004 02:17 PM
strong naming an assembly that has non-strong named references? SStory Microsoft VB .NET 2 10th Jun 2004 06:41 PM
Add strong name to existing dll file alex002 Microsoft Dot NET Framework 0 28th Jul 2003 04:08 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:27 AM.