System.InvalidOperationException: An error occurred creating the form. See Exception.InnerException for details. The error is: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Found wrong library versions for the currently executing platform. Copy the correct files form 'ThermoCS/32-bit' or 'ThermoCS/64-bit' back to 'ThermoCS/' folder and try again.
at DWSIM.Thermodynamics.ThermoC.ThermoCPropertyPackage..ctor() in C:\Users\Daniel\Source\Repos\DanWBR\ThermoCS\DWSIM.Thermodynamics.ThermoC\ThermoCPropertyPackage.cs:line 107
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at DWSIM.SharedClasses.Utility._Closure$._Lambda$__11-1(Type t) in C:\Users\Daniel\source\repos\DanWBR\dwsim6\DWSIM.SharedClasses\Misc\Utilities.vb:line 583
at System.Collections.Generic.List1.ConvertAll[TOutput](Converter2 converter)
at DWSIM.SharedClasses.Utility.GetPropertyPackages(Assembly assmbly) in C:\Users\Daniel\source\repos\DanWBR\dwsim6\DWSIM.SharedClasses\Misc\Utilities.vb:line 583
at DWSIM.SharedClasses.Utility.LoadAdditionalPropertyPackages() in C:\Users\Daniel\source\repos\DanWBR\dwsim6\DWSIM.SharedClasses\Misc\Utilities.vb:line 546
at DWSIM.FormMain.AddPropPacks() in C:\Users\Daniel\source\repos\DanWBR\dwsim6\DWSIM\Forms\Main Window\FormMain.vb:line 657
at DWSIM.FormMain..ctor() in C:\Users\Daniel\source\repos\DanWBR\dwsim6\DWSIM\Forms\Main Window\FormMain.Designer.vb:line 812
--- End of inner exception stack trace ---
at DWSIM.My.MyProject.MyForms.Create__InstanceT in :line 190
at DWSIM.My.MyApplication.OnCreateMainForm() in C:\Users\Daniel\source\repos\DanWBR\dwsim6\DWSIM\My Project\Application.Designer.vb:line 35
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
pay attention to this part of the error message: Found wrong library versions for the currently executing platform. Copy the correct files from 'ThermoCS/32-bit' or 'ThermoCS/64-bit' back to 'ThermoCS/' folder and try again.
Last edit: Daniel Medeiros 2021-05-20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi i tried to use thermoC 1.4 on dwsim6.3u4, an unhandled error raised. both are new download
here is the details
System.InvalidOperationException: An error occurred creating the form. See Exception.InnerException for details. The error is: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Found wrong library versions for the currently executing platform. Copy the correct files form 'ThermoCS/32-bit' or 'ThermoCS/64-bit' back to 'ThermoCS/' folder and try again.
at DWSIM.Thermodynamics.ThermoC.ThermoCPropertyPackage..ctor() in C:\Users\Daniel\Source\Repos\DanWBR\ThermoCS\DWSIM.Thermodynamics.ThermoC\ThermoCPropertyPackage.cs:line 107
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at DWSIM.SharedClasses.Utility._Closure$._Lambda$__11-1(Type t) in C:\Users\Daniel\source\repos\DanWBR\dwsim6\DWSIM.SharedClasses\Misc\Utilities.vb:line 583
at System.Collections.Generic.List
1.ConvertAll[TOutput](Converter2 converter)at DWSIM.SharedClasses.Utility.GetPropertyPackages(Assembly assmbly) in C:\Users\Daniel\source\repos\DanWBR\dwsim6\DWSIM.SharedClasses\Misc\Utilities.vb:line 583
at DWSIM.SharedClasses.Utility.LoadAdditionalPropertyPackages() in C:\Users\Daniel\source\repos\DanWBR\dwsim6\DWSIM.SharedClasses\Misc\Utilities.vb:line 546
at DWSIM.FormMain.AddPropPacks() in C:\Users\Daniel\source\repos\DanWBR\dwsim6\DWSIM\Forms\Main Window\FormMain.vb:line 657
at DWSIM.FormMain..ctor() in C:\Users\Daniel\source\repos\DanWBR\dwsim6\DWSIM\Forms\Main Window\FormMain.Designer.vb:line 812
--- End of inner exception stack trace ---
at DWSIM.My.MyProject.MyForms.Create__InstanceT in :line 190
at DWSIM.My.MyApplication.OnCreateMainForm() in C:\Users\Daniel\source\repos\DanWBR\dwsim6\DWSIM\My Project\Application.Designer.vb:line 35
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
I am facing the same error till date. Whenever I am copying ThermoC package files to DWsim folder, the same error is displayed when starting dwsim
pay attention to this part of the error message: Found wrong library versions for the currently executing platform. Copy the correct files from 'ThermoCS/32-bit' or 'ThermoCS/64-bit' back to 'ThermoCS/' folder and try again.
Last edit: Daniel Medeiros 2021-05-20
I have just followed the steps shared in the following page and dowloaded
https://dwsim.inforside.com.br/wiki/index.php?title=ThermoC_Bridge_Library#Download
but still the same error is coming
Dear Daniel,
ThermoC Zip file for v 1.4 is working only with 32-bit Dwsim not with 64-bit. When I changed from 64 to 32 bit the error is no more coming