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 / Windows Forms / WinForm General / January 2005

Tip: Looking for answers? Try searching our database.

Adding/Updating assemblies in GAC during runtime and not during Se

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
michael - 03 Jan 2005 16:07 GMT
Is there an API or suggested technique by which I can add/update assemblies
to the GAC during the runtime of my application instead of exclusively during
the Setup of the application. I would like to be able to update some
libraries without having to completely reinstall the application.

Signature

Michael Hockstein

Carlos J. Quintero [.NET MVP] - 03 Jan 2005 16:20 GMT
The API for the GAC is named "Fusion" and initially was not documented. Now
you can see:

DOC: Global Assembly Cache (GAC) APIs Are Not Documented in the .NET
Framework Software Development Kit (SDK) Documentation
http://support.microsoft.com/default.aspx?scid=kb;en-us;317540

Maybe an easier way is to use gacutil.exe -i <myassembly> from code.

Signature

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com

> Is there an API or suggested technique by which I can add/update
> assemblies
> to the GAC during the runtime of my application instead of exclusively
> during
> the Setup of the application. I would like to be able to update some
> libraries without having to completely reinstall the application.
WhiskyRomeo - 03 Jan 2005 16:42 GMT
I hate it when that happens!  I guess, I need to continue to look at the
problem.
wr

> The API for the GAC is named "Fusion" and initially was not documented. Now
> you can see:
[quoted text clipped - 11 lines]
> > the Setup of the application. I would like to be able to update some
> > libraries without having to completely reinstall the application.
michael - 03 Jan 2005 17:45 GMT
I'd be willing to try to run gacutil.exe from code. I assume that this will
only work if the assemblies are not currently being used/loaded.

In VB, how does one start an .exe from code(including use of command line
switches), assuming the .exe is in the application folder?

Michael

> The API for the GAC is named "Fusion" and initially was not documented. Now
> you can see:
[quoted text clipped - 11 lines]
> > the Setup of the application. I would like to be able to update some
> > libraries without having to completely reinstall the application.
"Jeffrey Tan[MSFT]" - 04 Jan 2005 02:36 GMT
Hi Michael,

Based on my understanding, you want to know how to use the Gacutil.exe to
install an assembly into the GAC through code.

Does your "VB" mean VB.net?
In .Net, we may use System.Diagnostics.Process.Start method to run
Gacutil.exe and install an assembly into the GAC.

For more information about the usage of Gacutil.exe, please refer to:
"Global Assembly Cache Tool (Gacutil.exe)"
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/htm
l/cpgrfglobalassemblycacheutilitygacutilexe.asp

If I misunderstand you, please feel free to tell me, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Signature

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

michael - 04 Jan 2005 15:47 GMT
Yes, I'm in .NET. I will look at System.Diagnostics.Process.Start to run
gacutil.exe from within my code. Thanks.

I assume that 2 assemblies can have the same exact name and differ only by
version number. I'll have to be careful with the gacutil and use fully
qualified names when making changes to the GAC.

Michael

> Hi Michael,
>
[quoted text clipped - 17 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
"Jeffrey Tan[MSFT]" - 05 Jan 2005 06:59 GMT
Hi Michael,

Yes, we can only install strong-named assembly into the GAC. Anyway, if you
need any further help, please feel free to tell me, I will help you. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Signature

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


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.