PDA

View Full Version : Managed Code Custom Action



timstspry
10-23-2010, 11:23 AM
Hello, I am trying to write a managed code custom action on a 64-bit Windows 7 OS. I get an error message "Unable to load one or more of the requested types" when the .dll has been compiled to target the .NET Framework v4.0. However, if I recompile the same .dll to target the .NET Framework v2.0, I do not get the error message and things work normally.

Does anyone know if this is a limitation of IS2011 or if I am doing something wrong? If there is a workaround for this, I would like to know as I really need to target the .NET Framework v4.0.

Thanks!

Tim

Matronix
10-27-2010, 01:38 PM
I am actually having the same exact issue.
I upgraded to 2011 because .NET 4 managed code custom actions weren't working at all. I just ran into this issue trying to set up a new one. All of the old ones are working properly, just having an issue setting up a new one is all.

Alpesh
10-27-2010, 02:43 PM
Hi,

Please refer to this old thread, where Michael Urman had suggested that this could be due to missing dependencies on the machine --> http://community.flexerasoftware.com/showthread.php?t=185639.

timstspry
10-28-2010, 09:49 PM
Actually, I have resolved it by recompiling my assembly to the .NET Framework 3.5. I believe this to be a bug in InstallShield 2011.
:mad:

Alpesh
10-30-2010, 06:55 PM
Hi,

Thanks for the update. We are looking into this issue internally.

Thanks!

nshustov
05-06-2011, 10:13 AM
Hi,

Thanks for the update. We are looking into this issue internally.

Thanks!

From Fusion logs I could get, it seems that for some reason InstallShiled 2011 uses CLR 2.0 assembly loader even if assembly is built for CLR 4.0.
Is there any update on this issue, please?