Object Must Implement IConvertible

Posts   
 
    
Kodiak
User
Posts: 92
Joined: 13-Apr-2009
# Posted on: 25-Apr-2009 09:32:32   

Hi,

Just wondering if anyone else gets the following error when working with Entity Classes used in custom controls?

Error   2   TargetInvocationException: Type  in the data at line 365, position 5, cannot be loaded because it threw the following exception during construction: Object must implement IConvertible.
   at System.Resources.ResXResourceReader.ParseXml(XmlTextReader reader)
   at System.Resources.ResXResourceReader.EnsureResData()
   at System.Resources.ResXResourceReader.GetEnumerator()
   at Microsoft.Build.Tasks.ProcessResourceFiles.ReadResources(IResourceReader reader, String fileName)
   at Microsoft.Build.Tasks.ProcessResourceFiles.ReadResources(String filename, Boolean shouldUseSourcePath)
   at Microsoft.Build.Tasks.ProcessResourceFiles.ProcessFile(String inFile, String outFile)
XmlException: Type  in the data at line 365, position 5, cannot be loaded because it threw the following exception during construction: Object must implement IConvertible. Line 365, position 5.

InvalidCastException: Object must implement IConvertible.
   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   at System.Runtime.Serialization.FormatterConverter.Convert(Object value, Type type)
   at System.Runtime.Serialization.SerializationInfo.GetValue(String name, Type type)
   at SD.LLBLGen.Pro.ORMSupportClasses.EntityBase..ctor(SerializationInfo info, StreamingContext context)
   at PMS.DAL.EntityClasses.CommonEntityBase..ctor(SerializationInfo info, StreamingContext context) in PMS.DAL\EntityClasses\CommonEntityBase.vb:line 48
   at PMS.DAL.EntityClasses.AddressEntityBase..ctor(SerializationInfo info, StreamingContext context) in PMS.DAL\EntityBaseClasses\AddressEntityBase.vb:line 334
   at PMS.DAL.EntityClasses.AddressEntity..ctor(SerializationInfo info, StreamingContext context) in PMS.DAL\EntityClasses\AddressEntity.vb:line 87
daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 25-Apr-2009 21:56:21   

Please see these threads: http://llblgen.com/tinyforum/Messages.aspx?ThreadID=14727 http://llblgen.com/tinyforum/Messages.aspx?ThreadID=2926

Also, please provide the LLBLGen version and Runtime library version (http://llblgen.com/tinyforum/Messages.aspx?ThreadID=7722) and more info (DDL of the problematic table, code snippet that triggers the exception).

David Elizondo | LLBLGen Support Team