Can we copy a COM dll to GAC Folder?

 Posted by Ddd on 2/10/2011 | Category: Others Interview questions | Views: 4775 | Points: 40

For a dll to be copied in GAC Folder,
1)It must be a .NET dll.
2)It must be strong named. Strong Naming is done by attaching a key pair file wih the .dll

This generates the key pair file.
example: sn -k abc.snk

sn : strong naming

k: generate key pair file

abc.snk: name of the key pair file.

to attach the key pair with the .NET dll, either use command line or

Visual sTUDIO Option

For the Visual Studio Option, open the class library project.It contains the .NET dll

View->Solution Explorer->Properties->click Signing tab->enter the path of key pair

file->save and build.

To install the signed .dll in GAC

use this command

gacutil /i <path of the signed .dll>

the COM dll has to be attached/converted to a .NET dll before we can think of putting it in GAC.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response