NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 07-09-2010, 02:00 AM   #1
zwentz
Member
 
Join Date: Jun 2009
Posts: 84
Thanks: 1
Thanked 0 times in 0 posts
Default Error with external reference

I'm getting the following error in my trace file, and it's causing Ninja to need to shutdown.

Quote:
2010-07-09 02:19:50:682 ERROR: Error on calling 'OnBarUpdate' method for strategy 'FeederProduction2': The type initializer for 'DataTrans.UI' threw an exception.
2010-07-09 02:19:50:697 FeederProduction2 started:FeederProduction2()
2010-07-09 02:19:52:070 in OnUnhandledApplicationException
2010-07-09 02:19:52:117 ********* exception trapped *********
2010-07-09 02:19:52:117 The type initializer for 'DataTrans.UI' threw an exception.
2010-07-09 02:19:52:117 System.TypeInitializationException: The type initializer for 'DataTrans.UI' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
at DataTrans.UI..cctor()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

--- End of inner exception stack trace ---
at DataTrans.UI.Dispose(Boolean disposing)
at System.ComponentModel.Component.Finalize()
I have added a reference to System.Data.dll and it works on one machine but not the other. The System.Data.dll file is located in My Documents/NinjaTrader 6.5/bin/Custom same as on the other machine.

Could it be a .NET version issue? Or am I totally wrong and this is something not to do with the reference.

I realize this probably isn't supported, so I'd really just like to know if I'm on the right track. Am I reading the trace file correctly?

Thanks,
Zach
zwentz is offline  
Reply With Quote
Old 07-09-2010, 03:16 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,017 times in 998 posts
Default

Zach, not sure why you would put this in the custom folder of NT, the regular reference to the .NET location of this DLL should work.

From the error it looks to me like a .NET version issue, since this is 4.0 - would the other PC have the same .NET running or is it perhaps on 3.5 SP1?
NinjaTrader_Bertrand is online now  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DLL Reference error i001962 Indicator Development 6 01-26-2010 02:42 PM
Custom indicators and strategies cannot reference external assemblies ScoobyStoo General Programming 9 01-15-2010 08:47 AM
Error calling 'OnExecution' - object reference not set to an instance of an object kcsystemtrader Strategy Development 9 05-11-2009 03:11 PM
Bars.GetSessionBar Comparison results in Object Reference error bani789 Strategy Development 2 06-12-2008 01:54 PM
Error on calling the 'OnOrderUpdate' method for strategy 'maslope': Object reference scriabinop23 General Programming 4 01-24-2008 02:20 PM


All times are GMT -6. The time now is 11:32 AM.