Posted 2/11/2010 12:02:11
|
|
|
|
I have added reference to an external lib, and when try to create an instance of an object in the external lib, I get the following error
Any Secret to using external dlls?
An exception of type System.IO.FileNotFoundException was thrown.
Could not load file or assembly 'TradeLinkAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
at System.Signature._GetSignature(SignatureStruct& signature, Void* pCorSig, Int32 cCorSig, IntPtr fieldHandle, IntPtr methodHandle, IntPtr declaringTypeHandle)
at System.Signature..ctor(RuntimeFieldHandle fieldHandle, RuntimeTypeHandle declaringTypeHandle)
at System.Reflection.RtFieldInfo.get_FieldType()
at RightEdge.Common.IndicatorManager.RegisterMembers(Object obj, Symbol symbol)
at MySystemBase.Startup(SystemData data) in y:\0-TradingSystem\TradingSystems\DipBuyer Fast\BaseClasses.cs:line 24
at RightEdge.Common.Internal.SystemRunner.Startup()
at RightEdge.Shared.SystemWrapper.InitializeModule(SystemData systemData, SystemRunSettings runSettings, ServiceFactory brokerFactory)
at RightEdge.Shared.SystemWrapper.RunSystem(SystemData systemData, SharedSystemRunData runData, ServiceFactory brokerFactory)
at RightEdge.Shared.SystemWrapper.RunSystem(String filename, ServiceFactory brokerFactory, PluginReference dataStore, SystemParameters systemParameterOverrides)
at RightEdge.Shared.SystemWrapper.RunSystem(String filename, ServiceFactory brokerFactory, PluginReference dataStore, SystemParameters systemParameterOverrides)
at RightEdge.Shared.TradingModuleWrapper.Run(String filename, ServiceAppDomainFactory brokerFactoryFactory, PluginReference dataStore, SystemParameters systemParameterOverrides)
at RightEdge.Shared.TradingModuleWrapper.RunSystem(SharedSystemRunData systemRunData, ServiceAppDomainFactory brokerFactoryFactory, Func`2 dataStoreFactory)
at RightEdge.SystemProgress.InitAndRunSystem()
|
|
Posted 2/11/2010 12:04:44
|
|
|
|
The external DLL has to be a .NET assembly is the only rule.
gregoryj (2/11/2010)
I have added reference to an external lib, and when try to create an instance of an object in the external lib, I get the following error
Any Secret to using external dlls?
An exception of type System.IO.FileNotFoundException was thrown.
Could not load file or assembly 'TradeLinkAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
at System.Signature._GetSignature(SignatureStruct& signature, Void* pCorSig, Int32 cCorSig, IntPtr fieldHandle, IntPtr methodHandle, IntPtr declaringTypeHandle)
at System.Signature..ctor(RuntimeFieldHandle fieldHandle, RuntimeTypeHandle declaringTypeHandle)
at System.Reflection.RtFieldInfo.get_FieldType()
at RightEdge.Common.IndicatorManager.RegisterMembers(Object obj, Symbol symbol)
at MySystemBase.Startup(SystemData data) in y:\0-TradingSystem\TradingSystems\DipBuyer Fast\BaseClasses.cs:line 24
at RightEdge.Common.Internal.SystemRunner.Startup()
at RightEdge.Shared.SystemWrapper.InitializeModule(SystemData systemData, SystemRunSettings runSettings, ServiceFactory brokerFactory)
at RightEdge.Shared.SystemWrapper.RunSystem(SystemData systemData, SharedSystemRunData runData, ServiceFactory brokerFactory)
at RightEdge.Shared.SystemWrapper.RunSystem(String filename, ServiceFactory brokerFactory, PluginReference dataStore, SystemParameters systemParameterOverrides)
at RightEdge.Shared.SystemWrapper.RunSystem(String filename, ServiceFactory brokerFactory, PluginReference dataStore, SystemParameters systemParameterOverrides)
at RightEdge.Shared.TradingModuleWrapper.Run(String filename, ServiceAppDomainFactory brokerFactoryFactory, PluginReference dataStore, SystemParameters systemParameterOverrides)
at RightEdge.Shared.TradingModuleWrapper.RunSystem(SharedSystemRunData systemRunData, ServiceAppDomainFactory brokerFactoryFactory, Func`2 dataStoreFactory)
at RightEdge.SystemProgress.InitAndRunSystem()
|
|
Posted 2/11/2010 12:46:10
|
|
|
|
| It is. Does it matter which .Net version it is?
|
|
Posted 2/11/2010 13:15:39
|
|
|
|
| The reason is that you need to copy the dll you are referencing to the folder you are storing your RightEdge Trading System. Visual Studio does that for you, but appears the right edge studio does not. Once I copied the dlls and then re-reference the new ones in the folder, it worked...Now to fix the problem with app.config.
|
|
|
|