cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
DLee65
Level 13

SUITE: Cannot run managed CA

I have a new .dll C# custom action that fails to run in the suite project. Below is the error that is shown.
12-10-2015[08:32:04 AM]: Running event 'ValidateCipher'
12-10-2015[08:32:04 AM]: Engine: request for proxy handler, 0, 0
12-10-2015[08:32:04 AM]: (CLR Action): Attempting to load through CLR 4 APIs...
12-10-2015[08:32:04 AM]: (CLR Action): Getting meta host...
12-10-2015[08:32:04 AM]: (CLR Action): Enumerating available runtimes...
12-10-2015[08:32:04 AM]: (CLR Action): Highest available runtime: v4.0.30319
12-10-2015[08:32:04 AM]: (CLR Action): Trying to use highest runtime...
12-10-2015[08:32:04 AM]: (CLR Action): Using highest version runtime...
12-10-2015[08:32:04 AM]: (CLR Action): Could not create instance of KeyGenerator.DecryptKey
12-10-2015[08:32:04 AM]: Action returned value 0x00000643
12-10-2015[08:32:04 AM]: Action 'ValidateCipher' returned status 0x80070643


My C# code has the following
[CODE]
namespace KeyGenerator
{
[Guid("BAFAEAED-08C6-4679-B94E-487A4D89DE63")]
[TypeLibType(4288)]
public interface ISuiteExtension
{
//Suite info here
}

public class DecryptKey
{
....
public UInt32 DecryptKeyMethod(object pDispatch)
{
try
{
//create suite instance ...
//Do work here ...
}
catch (Exception e)
{
iLog.WriteToLog("ERROR: DecryptKeyMethod Failed. " + e.Message);
iLog.WriteToLog("ERROR: Source: " + e.Source);
iLog.WriteToLog("ERROR: InnerException: " + e.InnerException);
iLog.WriteToLog("ERROR: Stack Trace: " + e.StackTrace);
return SuiteExtensions.ERROR_INSTALL_FAILURE;
}
}//end of class ...
... //More work here ...
}//End of namespace ...
[/CODE]

The thing that is frustrating about this is that I have other C# code that works. I have gone over code to see if I missed anything and I am coming up empty and not sure what to check next.
Can anyone see anything obvious from the code segment provided?

Thanks.
Labels (1)
0 Kudos
(1) Reply
DLee65
Level 13

I found the problem with my code. The issue was that the class I was creating is shared with a desktop application to create license keys.
In my class I created a parameterized constructor but did not have a default constructor. This was causing problems for InstallShield trying to instantiate the default constructor.

Once I add a default empty constructor then all is good.

Hopefully this keeps someone else from days of frustration.

NOTE: If the class does not have any constructors, then the code works. That is why with a basic test code I am able to get this to work. Once I added one parameterized constructor to use with the UI, then this fails.
0 Kudos