Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Distributed Applications / October 2007

Tip: Looking for answers? Try searching our database.

Registering The Assembly In the GAC Programmatically

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wayne Berry - 04 Oct 2007 05:49 GMT
Excuse me if this is not the right newgroup for this, questions.  If it isn't
tell me the right group and I will repost.

I would like to register my assembly in the GAC without calling gacutil.exe,
gacutil.exe requires that it be run from the command line, which means that
when I want to register an assembly from my Windows application (WinForms In
C#) I have to spin up a process to execute the console application
(gacutil.exe) from the command line, leaving an annoying flash of the command
box.

What I would like it to be able to register the assembly via an API call,
instead of a console application.  How can I do this?

I have already used reflector on regasm.exe and regsvcs.exe and coverted
that code to a Class Library that I can call from my windows application,
just need to figure out have to convert gacutil.exe, since it is not Managed
code I can't use reflector on it.

Kind Regards,
Wayne Berry
Steven Cheng[MSFT] - 04 Oct 2007 07:35 GMT
Hi Wayne,

For installing Assembly into GAC without GACUtil(in code), you may consider
using the Fusion API(unmanaged via COM). Here is a tech article introducing
this:

#Using the .NET Fusion API to Manipulate the GAC
http://www.codeguru.com/columns/kate/article.php/c12793/

In addition, if you're building a setup program, it is recommended you use
the windows installer sdk or VS setup project's built-in feature instead of
manually  write the code to do so. Here is another blog article mentioned
this:

#Why to not use gacutil.exe in an application setup
http://blogs.msdn.com/astebner/archive/2006/11/04/why-to-not-use-gacutil-exe
-in-an-application-setup.aspx

BTW, if you meet any .net specific questions and not sure which subarea to
fit, you can feel free to post in the following general groups:

microsoft.public.dotnet.general
microsoft.public.dotnet.framework

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

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

--------------------
>From: =?Utf-8?B?V2F5bmUgQmVycnk=?= <waynebe@nospam.nospam>
>Subject: Registering The Assembly In the GAC Programmatically
>Date: Wed, 3 Oct 2007 21:49:01 -0700

>Excuse me if this is not the right newgroup for this, questions.  If it isn't
>tell me the right group and I will repost.
[quoted text clipped - 16 lines]
>Kind Regards,
>Wayne Berry

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.