DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Tue, 7 Aug 2007 12:24:02 -0700,    posted on: microsoft.public.dotnet.framework.sdk        back       

Thread Index
  1    Matt am
          2    Phil Wilson
                 3    Matt am
                 4    Phil Wilson
                 5    (Walter Wang [MSFT])


Uninstalling from Global assembly cache   
I am trying to install and uninstall assemblies from GAC.
I created a batch file which has following command in it:
   gacutil.exe /if MyCommonAssembly.dll
Above command successfully installs MyCommonAssembly in GAC.
But when I create a another Batch file which contains:
 gacutil.exe /u MyCommonAssembly
and I run the batch file, the command is executed but the assembly is 
appears in GAC and Windows --> Assembly folder.

if I  execute this command on cmd prompt then it is uninstalled from the 
Assembly folder and also from the GAC.
Any suugestions?
Date:Tue, 7 Aug 2007 12:24:02 -0700   Author:  

Re: Uninstalling from Global assembly cache   
You're using /if to force replacement - does that mean there is already an 
assembly of that name in the GAC?  Is that the only option in your command 
(you didn't do /r?).

Does /uf make any difference? How about if you specify more of the assembly 
name (for example adding version)?
-- 
Phil Wilson
[MVP Windows Installer]

"Matt" <inventorydynamics@nospam.nospam> wrote in message 
news:30F7EEFF-54F2-4888-97BC-EEAF77159423@microsoft.com...

>I am trying to install and uninstall assemblies from GAC.
> I created a batch file which has following command in it:
>   gacutil.exe /if MyCommonAssembly.dll
> Above command successfully installs MyCommonAssembly in GAC.
> But when I create a another Batch file which contains:
> gacutil.exe /u MyCommonAssembly
> and I run the batch file, the command is executed but the assembly is
> appears in GAC and Windows --> Assembly folder.
>
> if I  execute this command on cmd prompt then it is uninstalled from the
> Assembly folder and also from the GAC.
> Any suugestions?
>
>
>
> 
Date:Tue, 7 Aug 2007 13:04:09 -0700   Author:  

Re: Uninstalling from Global assembly cache   
does that mean there is already an assembly of that name in the GAC?
Yes, GAC has an assembly with same name. But I run Uninstall batch file 
before Install Batch file.

Is that the only option in your command?
Yes, that is only option I have specified in my command.

Does /uf make any difference?
No, using /uf didnt make any difference.

How about if you specify more of the assembly name?
Well, I didnt try this option but for my purpose I am creating an installer 
which in Pre install event uninstalls all the assemblies from the GAC and in 
POSTInstall event installs new assemblies in GAC.
Please let me know if you require more information.

"Phil Wilson" wrote:


> You're using /if to force replacement - does that mean there is already an 
> assembly of that name in the GAC?  Is that the only option in your command 
> (you didn't do /r?).
> 
> Does /uf make any difference? How about if you specify more of the assembly 
> name (for example adding version)?
> -- 
> Phil Wilson
> [MVP Windows Installer]
> 
> "Matt" <inventorydynamics@nospam.nospam> wrote in message 
> news:30F7EEFF-54F2-4888-97BC-EEAF77159423@microsoft.com...
> >I am trying to install and uninstall assemblies from GAC.
> > I created a batch file which has following command in it:
> >   gacutil.exe /if MyCommonAssembly.dll
> > Above command successfully installs MyCommonAssembly in GAC.
> > But when I create a another Batch file which contains:
> > gacutil.exe /u MyCommonAssembly
> > and I run the batch file, the command is executed but the assembly is
> > appears in GAC and Windows --> Assembly folder.
> >
> > if I  execute this command on cmd prompt then it is uninstalled from the
> > Assembly folder and also from the GAC.
> > Any suugestions?
> >
> >
> >
> > 
> 
> 
> 
Date:Tue, 7 Aug 2007 13:20:00 -0700   Author:  

Re: Uninstalling from Global assembly cache   
You mean a setup&deployment project? That "pre-install" event sounds like 
you're running this code in a setup project, which might mean you're running 
custom actions in the context of Windows Installer, and that might be 
affecting things because in an Installer class you're running impersonated 
on an msiexec.exe process.

If you are actually using a setup&deployment project, you should know that 
you can get the setup project to install/uninstall assemblies in the GAC 
without running any code at all.

I'd also point out that gacutil is not redistributable and is not in most 
..NET FW redists, so it won't exist on client systems.

-- 
Phil Wilson
[MVP Windows Installer]


"Matt" <inventorydynamics@nospam.nospam> wrote in message 
news:D66C1D41-CD8B-4C76-B594-2F91D6ECDC9A@microsoft.com...

> does that mean there is already an assembly of that name in the GAC?
> Yes, GAC has an assembly with same name. But I run Uninstall batch file
> before Install Batch file.
>
> Is that the only option in your command?
> Yes, that is only option I have specified in my command.
>
> Does /uf make any difference?
> No, using /uf didnt make any difference.
>
> How about if you specify more of the assembly name?
> Well, I didnt try this option but for my purpose I am creating an 
> installer
> which in Pre install event uninstalls all the assemblies from the GAC and 
> in
> POSTInstall event installs new assemblies in GAC.
> Please let me know if you require more information.
>
> "Phil Wilson" wrote:
>
>> You're using /if to force replacement - does that mean there is already 
>> an
>> assembly of that name in the GAC?  Is that the only option in your 
>> command
>> (you didn't do /r?).
>>
>> Does /uf make any difference? How about if you specify more of the 
>> assembly
>> name (for example adding version)?
>> -- 
>> Phil Wilson
>> [MVP Windows Installer]
>>
>> "Matt" <inventorydynamics@nospam.nospam> wrote in message
>> news:30F7EEFF-54F2-4888-97BC-EEAF77159423@microsoft.com...
>> >I am trying to install and uninstall assemblies from GAC.
>> > I created a batch file which has following command in it:
>> >   gacutil.exe /if MyCommonAssembly.dll
>> > Above command successfully installs MyCommonAssembly in GAC.
>> > But when I create a another Batch file which contains:
>> > gacutil.exe /u MyCommonAssembly
>> > and I run the batch file, the command is executed but the assembly is
>> > appears in GAC and Windows --> Assembly folder.
>> >
>> > if I  execute this command on cmd prompt then it is uninstalled from 
>> > the
>> > Assembly folder and also from the GAC.
>> > Any suugestions?
>> >
>> >
>> >
>> >
>>
>>
>> 
Date:Tue, 7 Aug 2007 14:48:13 -0700   Author:  

Re: Uninstalling from Global assembly cache   
Hi Matt,

I agree with Phil, if you're calling GacUtil from an installer, you first 
need to be aware that GacUtil isn't redistributed with .NET Framework 
Runtime; it's in the .NET Framework SDK.

Normally the setup tool may already have builtin support for installing and 
uninstall assembly to/from GAC.

My wild guess is that gacuti.exe isn't found at all by the batch file, the 
error is missed since you cannot see the output if it's executed silently. 

Also, if you do need to call Gacutil.exe from your installer, you should 
also be use the "-ir" or "-ur" switch since it can correctly 
install/uninstall using reference counts. This will make sure other 
programs that are using the shared assembly will not break when one program 
is uninstalled.

#Global Assembly Cache Tool (Gacutil.exe)
http://msdn2.microsoft.com/en-us/library/ex0ss12c(vs.80,d=printer).aspx
<quote>
Be aware that using the /i and /u options alone does not support reference 
counting. These options are appropriate for use during product development 
but not for actual product installations.
</quote>


Regards,
Walter Wang (wawang@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Date:Wed, 08 Aug 2007 03:37:39 GMT   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us