Environment
HomeSeer
OS
Windows
HS Version
v4.2.22.4
Development
PSDK Version
v1.5.0.0
Language
VB
IDE
VS2022 Community Edition
Dev OS
Windows
Plugin
Tesla Vehicles
Problem
Description
I had to reimage my development machine today, and when I tried to load and run this plugin in Debug mode, and my output is flooded with this error:
Exception thrown: 'System.TypeLoadException' in PluginSdk.dll
It's possible this is just from a setting, but based on the volume of these errors, it doesn't feel right to just ignore, but the error is coming from "PluginSdk.dll!HomeSeer.PluginSdk.Events.BaseTypeCollection<HomeSeer.PluginSdk.Events.AbstractActionType>.AssertTypeHasConstructor(System.Type targetType, System.Type[] constructorParams) Line 181"
private static void AssertTypeHasConstructor(Type targetType, Type[] constructorParams)
{
if (targetType.GetConstructor(BindingFlags.Instance | BindingFlags.Public, null, CallingConventions.Standard, constructorParams, null) != null)
{
return;
}
StringBuilder stringBuilder = new StringBuilder("Type does not have a constructor with parameters ");
foreach (Type type in constructorParams)
{
stringBuilder.Append(type.FullName + " ");
}
throw new TypeLoadException(stringBuilder.ToString());
}
With the following CallStack:
PluginSdk.dll!HomeSeer.PluginSdk.Events.BaseTypeCollection<HomeSeer.PluginSdk.Events.AbstractActionType>.AssertTypeHasConstructor(System.Type targetType, System.Type[] constructorParams) Line 181 C#
PluginSdk.dll!HomeSeer.PluginSdk.Events.BaseTypeCollection<HomeSeer.PluginSdk.Events.AbstractActionType>.AssertTypeHasConstructors(System.Type targetType) Line 133 C#
PluginSdk.dll!HomeSeer.PluginSdk.Events.BaseTypeCollection<HomeSeer.PluginSdk.Events.AbstractActionType>.AddItemType(System.Type itemType) Line 31 C#
PluginSdk.dll!HomeSeer.PluginSdk.Events.ActionTypeCollection.AddActionType(System.Type actionType) Line 54 C#
HSPI_SKWARE_TESLA_VEHICLES.exe!HSPI_SKWARE_TESLA_VEHICLES.HSPI.Initialize() Line 155 Basic
PluginSdk.dll!HomeSeer.PluginSdk.AbstractPlugin.InitIO() Line 177 C#
Line 155 in my Initialize function is:
ActionTypes.AddActionType(GetType(NavigateAction))
Expected Behavior
No errors...
Steps to Reproduce
Unknown
Environment
HomeSeer
OS
Windows
HS Version
v4.2.22.4
Development
PSDK Version
v1.5.0.0
Language
VB
IDE
VS2022 Community Edition
Dev OS
Windows
Plugin
Tesla Vehicles
Problem
Description
I had to reimage my development machine today, and when I tried to load and run this plugin in Debug mode, and my output is flooded with this error:
Exception thrown: 'System.TypeLoadException' in PluginSdk.dll
It's possible this is just from a setting, but based on the volume of these errors, it doesn't feel right to just ignore, but the error is coming from "PluginSdk.dll!HomeSeer.PluginSdk.Events.BaseTypeCollection<HomeSeer.PluginSdk.Events.AbstractActionType>.AssertTypeHasConstructor(System.Type targetType, System.Type[] constructorParams) Line 181"
With the following CallStack:
PluginSdk.dll!HomeSeer.PluginSdk.Events.BaseTypeCollection<HomeSeer.PluginSdk.Events.AbstractActionType>.AssertTypeHasConstructor(System.Type targetType, System.Type[] constructorParams) Line 181 C#
PluginSdk.dll!HomeSeer.PluginSdk.Events.BaseTypeCollection<HomeSeer.PluginSdk.Events.AbstractActionType>.AssertTypeHasConstructors(System.Type targetType) Line 133 C#
PluginSdk.dll!HomeSeer.PluginSdk.Events.BaseTypeCollection<HomeSeer.PluginSdk.Events.AbstractActionType>.AddItemType(System.Type itemType) Line 31 C#
PluginSdk.dll!HomeSeer.PluginSdk.Events.ActionTypeCollection.AddActionType(System.Type actionType) Line 54 C#
HSPI_SKWARE_TESLA_VEHICLES.exe!HSPI_SKWARE_TESLA_VEHICLES.HSPI.Initialize() Line 155 Basic
PluginSdk.dll!HomeSeer.PluginSdk.AbstractPlugin.InitIO() Line 177 C#
Line 155 in my Initialize function is:
ActionTypes.AddActionType(GetType(NavigateAction))
Expected Behavior
No errors...
Steps to Reproduce
Unknown