Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Removing files from GAC

4 views
Skip to first unread message

Fyodor Koryazhkin

unread,
Oct 4, 2006, 10:26:25 AM10/4/06
to
Hi,
During creation of a service pack for a major release I faced a problem that
I need to remove some assemblies from the GlobalAssemblyCache that were installed
by a release.
As I know the MSI rules ban the removal of component during patch installation,
however there is a way to bypass this restriction: remove file from the component
and populate the RemoveFile table. Thus the component will remain registered
on the computer but the file will be absent.

The question is: can I use such a way to remove assemblies from a GAC?

Thanks.


Richard [Microsoft Windows Installer MVP]

unread,
Oct 4, 2006, 12:19:08 PM10/4/06
to
[Please do not mail me a copy of your followup]

Fyodor Koryazhkin <fyod...@gmail.com> spake the secret code
<b590e6a4116a78...@news.microsoft.com> thusly:

>The question is: can I use such a way to remove assemblies from a GAC?

I think you might need to do a custom action that removes the file
from the GAC. The standard action that does this is
MsiUnpublishAssemblies action by consulting the MsiAssembly table.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>

Fyodor Koryazhkin

unread,
Oct 5, 2006, 4:14:18 AM10/5/06
to
Hello Richard,

Thank you for a reply but it seems to me I misunderstand something. If I
understand you correct what I need to do is to write custom action that removes
assembly. The only way I can do this is to use gacutil utility. But the assembly
been installed by MSI cannot be removed by other way but only by MSI. I do
not consider the way manually remove the folder containing assembly and other
information together with all registry information written by MSI.(Unless
you suggest to do so)

My problem is that I need to remove an assembly (that is the key file of
a component) during patch. An original assembly was installed by my release
version. So the removing the component from the project is not supported
by MSI by design. The standart action MSiUnpublishAseembly removes assemblies
linked to uninstalled component only (This is my understanding of MSI help).

So it seems to me that I cannot use two ways described above.

Can you please be more specific what workaround I can apply to achieve my
gole if any.

Thank you.


> [Please do not mail me a copy of your followup]
>
>

Richard [Microsoft Windows Installer MVP]

unread,
Oct 6, 2006, 9:07:15 PM10/6/06
to
[Please do not mail me a copy of your followup]

Fyodor Koryazhkin <fyod...@gmail.com> spake the secret code
<b590e6a414f168...@news.microsoft.com> thusly:

>Thank you for a reply but it seems to me I misunderstand something.

It sounds like you understand things correctly. You can write a
custom action to remove a file from the gac with gacutil. I'm not
sure what you mean by this part:

>[...] But the assembly

>been installed by MSI cannot be removed by other way but only by MSI.

Are you saying gacutil fails to remove the assembly from the GAC?

I know that assemblies installed by MSI are recorded by MSI
separately; perhaps that's what you're referring to. In that case,
the only thing I know that removes that association is the
MsiUnpublishAssemblies action.

Is there some harm to leaving this assembly on the machine to later
be removed by Windows Installer when WI removes the application?

0 new messages