bchetana
Posts: 95
Joined: Sat Dec 01, 2012 11:36 am

.Net Installer class in custom actions

Hi

I have added a .Net Installer class in my project. I have some code to be executed in OnAfterInstall and UnInstall methods.

I have added this as Dll in files and folders. Then added in custom action as .Net Installer class action. with action data as bellow

/LogFile= /ReqVersion=4.0.30319 /InstallType=notransaction /Action=Install "[#AISetUPClassLibrary.dll]" "[TempFolder]NetInstallerClass_Config.xml"


When i build and run, The installation workes well and OnAfterInstall is executed. But when I uninstall I get following error

FileNotFoundException : System could not load file or assembley ....
ScreenHunter_04 Dec. 10 15.11.gif
ScreenHunter_04 Dec. 10 15.11.gif (6.83 KiB) Viewed 2936 times
Please help ...
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: .Net Installer class in custom actions

Hello,

This may happens if the related uninstall custom action is launched after its resource files are removed from target machine during uninstall. So, the related custom action should be scheduled before "Install Execution Stage -> Remove Resources" action group.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”