C# Custom Actions - Advanced Installer Community
Novak
Posts: 3
Joined: Thu Feb 18, 2016 5:05 pm

C# Custom Actions

I have "C# custom actions" that in works but fails in certain scenarios, I will try to explain.

"C# custom actions" are build using WIX tool kit. Related *.CA.dll. contains multiple functions that I use.

The following problems occurs:
1.When I change (update) implementation of some custom action, rebuild *.CA.dll. Build installer again, but installer somehow is using old the old *.CA.dll (I know this by looking at logs, it is calling old implementation, meaning old DLL)

2.When I change (update) implementation of some custom action and rename that action, rebuild *.CA.dll, than this action is available in AI with new name, I can select it. I build installer again, and when executing installer it fails on that renamed method claiming "there is a problem with ....please contact..."
So This is just rename (one letter added at the end of method), call FAILS.

3. When I take this method and put it in another DLL, it works.

Can you please tell me, what the problem is?

Please note, that I'm deleting AI cache and previous installation before every new build.
But, it seems like there is some caching still happens, I do not know if this is true.

Can you please respond, this is very urgent for us.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: C# Custom Actions

Hi,

I'm not sure why you encounter these problems. Can you send us a sample project and also some test DLL files to support at advancedinstaller dot com along with the steps that we need to follow in order to reproduce and investigate the problems?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Novak
Posts: 3
Joined: Thu Feb 18, 2016 5:05 pm

Re: C# Custom Actions

The problem was because of undeleted files from temporary folder.
So every time I perform new installation, it makes folder duplicates but uses the first one (the old one):
- This is why it uses old custom actions
- This is why it fails when I rename custom action, so when building installer all good because it sees new method, but when I install it used old dll where the method does not exists, so it fails.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: C# Custom Actions

Hi,

I tested the scenario, but I couldn't reproduce it. The temporary folder that contains the DLL file is removed when the installation is finished. Can you please tell me which version of Advanced Installer do you use? Also, a sample project that reproduces the problem would be very useful.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”