3

I have 2 version of dll (Hello.dll 1.0.0.0 and Hello.dll 2.0.0.0)

At first, the Hello.dll version 1.0.0.0 will be installed into C:\Windows\Assembly folder. Then, when I launch my installer, the Hello.dll version 2.0.0.0 dll will be installed into C:\Windows\Assembly folder also.

So now in assembly there are 2 Hello.dll with different version(1.0.0.0 and 2.0.0.0)

How to remove Hello.dll version 1.0.0.0 from GAC during the installation, then only install Hello.dll version 2.0.0.0, because I just want to keep latest version of Dll in GAC instead of both.

Thanks

user1219310
  • 732
  • 1
  • 9
  • 23

1 Answers1

2

I assume 1.0.0.0 is installed by an earlier wix installer of you. Then it is a matter of letting the new installer remove older installations before installing the new. You can read about upgrades in WiX here and here.

Community
  • 1
  • 1
Lars Truijens
  • 42,837
  • 6
  • 126
  • 143
  • Hi, thanks for your reply. It works when I apply major upgrade(different product Id, version and same upgrade code). Besides, how about if some files I did not want to uninstall ? permanent attribute in component element ? Thanks. – user1219310 Jul 04 '14 at 02:08
  • The GAC is side by side, and that means multiple assembly versions can co-exist. It's not like the "normal" file system. An upgrade is a complete setup consisting of all the files the product needs. It works as a fresh install and an upgrade to an already installed product. I suspect you believe an upgrade is "just the files I want to update" but it is not, so the question about files you don't want to uninstall is not relevant. – PhilDW Jul 05 '14 at 18:12