C#,COM & Strong name file

G

Guest

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
 
N

Nicholas Paldino [.NET/C# MVP]

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

clu

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
 

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