This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- SOLVED: Fails with parameterized constructor
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 10, 2015
08:51 AM
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.
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.
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.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 18, 2015
12:59 PM
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.
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.
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)