cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
timstspry
Level 7

Managed Code Custom Action

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
Labels (1)
0 Kudos
5 Replies
Matronix
Level 6

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.
0 Kudos
Alpesh
Flexera Alumni

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.
0 Kudos
timstspry
Level 7

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:
0 Kudos
Alpesh
Flexera Alumni

Hi,

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

Thanks!
0 Kudos
nshustov
Level 3

Alpesh wrote:
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?
0 Kudos