System.TypeLoadException: Could not load type 'VillageBoroughTitle' from assembly

Discussions related to custom development with Select.
Post Reply
timothymeyer16
Posts: 37
Joined: Mon Jun 14, 2021 9:47 am

System.TypeLoadException: Could not load type 'VillageBoroughTitle' from assembly

Post by timothymeyer16 »

Good afternoon,

Inurgent question here.

I seem to have trouble generating a new "VillageBoroughTitle" IOrderItem.

The below code works well in other instances, such as contacts, properties, addresses, and more.

Any Insight is apprecaited.

Code: Select all

 // New VillageBorough
 IOrderItem villageBorough = order.CreateNew("VillageBoroughTitle"); // Error Here
 villageBorough.SetProperty("Description", township); 
 newProperty.SetProperty("VillageBoroughTitle", villageBorough);
The Error:

Code: Select all

[11:56 | Entry:] Error Setting Values: System.TypeLoadException: Could not load type 'VillageBoroughTitle' from assembly 'SoftPro.OrderTracking.Order_a73250e5f8aab62407a299bd00691d3c, Version=4.3.60210.67, Culture=neutral, PublicKeyToken=8ae96314b6bae08d'.
   at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type)
   at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
   at System.Reflection.Assembly.GetType(String name, Boolean throwOnError)
   at SoftPro.EntityModel.RootEntity`1.SoftPro.EntityModel.IRootEntity.GetType(String entityName)
   at SoftPro.EntityModel.RootEntity`1.<CreateNewEntity>b__55_0(String name)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at SoftPro.EntityModel.RootEntity`1.CreateNewEntity(String entityName, Nullable`1 guid)
   at SoftPro.EntityModel.RootEntity`1.SoftPro.EntityModel.IRootEntity.CreateNew(String entityName)
   at SoftPro.OrderTracking.Client.Orders.OrderBase`1.SoftPro.OrderTracking.Client.Orders.IOrder.CreateNew(String itemName)
   at BulkAddOrderContacts.Form1.ImportTable(DataTable dt) in C:\_Master_\C#Applications\Form\BulkAddProperties(Derrived)\BulkAddOrderContacts\ImportProperties.cs:line 134
   
   
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: System.TypeLoadException: Could not load type 'VillageBoroughTitle' from assembly

Post by BobRichards »

If you look at the type with the Field Code Browser, you will see the type is actually: IVillageBoroughTitle

Code: Select all

// New VillageBorough
IOrderItem villageBorough = order.CreateNew("IVillageBoroughTitle");
...
Bob Richards, Senior Software Developer, SoftPro
Post Reply