Importing a .vdproj produces invalid .NET custom actions - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

dschuessler
Posts: 1
Joined: Thu Oct 11, 2012 11:44 pm

Importing a .vdproj produces invalid .NET custom actions

Hello,

I'm trying to migrate a vdproj (Visual Studio Setup Project) to AI 9.6. I think this may be a bug:

How to reproduce:
* Create a new C# class library solution in VS 2010
* Add an Installer class (System.Configuration.Install.Installer) to the project (say, one that displays a message box on Install/Commit/Rollback/Uninstall)
* Add a setup project
* Add the class library project's output to the setup
* Add a custom action to the setup
* Create a new AI project based on this (New -> Import -> Visual Studio Setup Project)
* The imported custom actions in AI are broken: "Function" is set to "Your Function", and "Action Data" is empty and doesn't offer the wizard which is usually there for .NET Installer class custom actions. Of course, trying to run the installer produces an error (see attachments).

So it seems I'll have to add the custom actions myself in AI (Add Custom Action -> .NET Installer class action). I have some questions about this:

* Only the Install and Uninstall methods are overridden in my actual Installer class; should I still add actions for Commit and Rollback to make sure the base implementation of these methods is called?
* AI automatically adds a 32-bit and a 64-bit custom action for each click on the Add button; can I safely delete one of them (and remove the VersionNT64 condition in the other one) if I don't care whether my Installer class dll is run in a 32-bit or 64-bit CLR?
Attachments
error.png
error.png (184.94 KiB) Viewed 2267 times
ImportedCustomAction.aip
(12.35 KiB) Downloaded 269 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Importing a .vdproj produces invalid .NET custom actions

Hello,

Please keep in mind that the import features in Advanced Installer (the Repackager, the Import MSI feature etc.) are intended to be used to get a starting point for your installation package, not to completely reproduce other installation packages. The Repackager tool captures only the effects of the installation (the changes made on the system). If the original installation package executes custom code (programs, scripts etc.) then only the effect will be captured (registry entries, files and folders etc.). Also, after repackaging an installation some adjustments may be necessary in order to obtain a working installation package.
* Only the Install and Uninstall methods are overridden in my actual Installer class; should I still add actions for Commit and Rollback to make sure the base implementation of these methods is called?
Yes, you should add custom actions for Commit and Rollback if you want the corresponding methods to be called.
* AI automatically adds a 32-bit and a 64-bit custom action for each click on the Add button; can I safely delete one of them (and remove the VersionNT64 condition in the other one) if I don't care whether my Installer class dll is run in a 32-bit or 64-bit CLR?
Yes, you can do that.

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

Return to “Common Problems”