Can I control the GAC display name of my assembly?

A

Aaron Stibich

It's looking like the GAC display name is always the name of your dll. Is
there any way to control the display name?

Here's some background, in case you're interested. I am making dialog that
lets you browse the GAC (using fusion.dll), select an assembly and create an
object within the assembly. This is to achieve location transparency for our
servers - similiar to how Ole View worked in the COM days). Trouble is, it's
very hard to see our assemblies in the mass of microsoft and other third
party assemblies. As far as I can tell, there is no information offered by
the GAC API that will allow me to filter out our servers (eg. the company
name attribute). So that's when I thought it would be cool if I could
register our servers with a namespace (eg. MyCompany.MyServer ) that I could
use to filter on, but it appears that the GAC display name has to be the
assembly name. I guess I could name my dll MyCompany.MyServer.dll (Microsoft
does it), but I'd rather not have to rename my dll name every time I want to
change the GAC display name.

Maybe the GAC is not meant to be used as a means to create objects with
location transparency. Please feel free to propose alternative solutions.

Thanks,

Aaron Stibich
 
B

Big Bob

I have been creating a new key per assembly. Is it secure to have one key
for all assemblies?

Aaron
 
Y

Yan-Hong Huang[MSFT]

Hello Bob,

Thanks for posting in the group.

Aaron is right. You could use a single snk file to sign all the strong name
assemblys and then put them in the GAC. Please open windows explorer and
navigate to C:\windows\assembly directory. In the public key token column
of the right pane, you could see that some assemblys are sharing the same
key token.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!From: "Big Bob" <[email protected]>
!Newsgroups: microsoft.public.dotnet.framework
!References: <[email protected]>
<[email protected]>
!Subject: Re: Can I control the GAC display name of my assembly?
!Lines: 54
!X-Priority: 3
!X-MSMail-Priority: Normal
!X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
!Message-ID: <AoV7b.314945$Oz4.106708@rwcrnsc54>
!NNTP-Posting-Host: 12.232.67.107
!X-Complaints-To: (e-mail address removed)
!X-Trace: rwcrnsc54 1063264928 12.232.67.107 (Thu, 11 Sep 2003 07:22:08 GMT)
!NNTP-Posting-Date: Thu, 11 Sep 2003 07:22:08 GMT
!Organization: Comcast Online
!Date: Thu, 11 Sep 2003 07:22:08 GMT
!Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
e.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn14feed!wn13feed!world
net.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!rwcrnsc54.POST
ED!not-for-mail
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework:53445
!X-Tomcat-NG: microsoft.public.dotnet.framework
!
!I have been creating a new key per assembly. Is it secure to have one key
!for all assemblies?
!
!Aaron
!
!"Conrad Zhang" <conrad_zhang AT yahoo DOT com> wrote in message
!!> You can filter the result based on your company's public key token.
!>
!>
!> !> > It's looking like the GAC display name is always the name of your dll.
!Is
!> > there any way to control the display name?
!> >
!> > Here's some background, in case you're interested. I am making dialog
!that
!> > lets you browse the GAC (using fusion.dll), select an assembly and
!create
!> an
!> > object within the assembly. This is to achieve location transparency
for
!> our
!> > servers - similiar to how Ole View worked in the COM days). Trouble is,
!> it's
!> > very hard to see our assemblies in the mass of microsoft and other
third
!> > party assemblies. As far as I can tell, there is no information offered
!by
!> > the GAC API that will allow me to filter out our servers (eg. the
!company
!> > name attribute). So that's when I thought it would be cool if I could
!> > register our servers with a namespace (eg. MyCompany.MyServer ) that I
!> could
!> > use to filter on, but it appears that the GAC display name has to be
the
!> > assembly name. I guess I could name my dll MyCompany.MyServer.dll
!> (Microsoft
!> > does it), but I'd rather not have to rename my dll name every time I
!want
!> to
!> > change the GAC display name.
!> >
!> > Maybe the GAC is not meant to be used as a means to create objects with
!> > location transparency. Please feel free to propose alternative
!solutions.
!> >
!> > Thanks,
!> >
!> > Aaron Stibich
!> >
!> >
!>
!>
!
!
!
 

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