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 08-27-2012, 12:08 PM   #1
drfager
Junior Member
 
Join Date: Jan 2009
Posts: 5
Thanks: 0
Thanked 0 times in 0 posts
Default Compiler Error CS0006

Hi,

I tried to import an updated indicator today, but could not do so because NT indicates I have custom programming files on my PC that have programming errors. I can't import any indicators, remove custom assemblies, etc. Basically I can do nothing.

How do I go about fixing this? The error message I'm receiving, which comes up no matter which indicator I bring up and try to compile, is as follows:

Compiler Error CS0006

Visual Studio .NET 2003

Metadata file 'dll_name' could not be found
The program was compiled and explicitly passed the name of a file that contained metadata; however, the .dll was not found.



Thanks for your help!
drfager is offline  
Reply With Quote
Old 08-27-2012, 12:12 PM   #2
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
Default

Hello drfager,

Thank you for writing in.

Please follow the instructions below to see where the errors are coming from after compiling the indicator. This will allow you to debug the indicator/strategy or remove it from your PC. If you are wondering why you receive an error when compiling only one indicator, it is because NinjaTrader compiles all indicators and strategies- not just one.
  • Open NinjaTrader
  • From the Control Center select the Tools menu--> select the Edit NinjaScript menu item--> select Indicator
  • Select an indicator and double click on it.
  • A new window will appear and you will need to right click in the window and select Compile to compile the indicators.
  • At the bottom of the window a new section will appear where you can find the error locations.
  • From there you have the option to remove the indicator or debug it.
Here is a video of this process:
http://screencast.com/t/K3plVBblUy

Also here is a forum post that describes the process and offers ways to resolve the situation:
http://www.ninjatrader.com/support/f...ead.php?t=4678

If you are unsure as to what the error is indicating, please send me a screenshot of the error with the name and description fields clearly readable.
To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CRTL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

Please let me know if I can provide any further assistance.
NinjaTrader_Joydeep is offline  
Reply With Quote
Old 11-08-2012, 09:03 AM   #3
ki1ian
Junior Member
 
Join Date: Nov 2011
Posts: 3
Thanks: 1
Thanked 0 times in 0 posts
Default

Hi,

I've come across the same error - here's the screenshot:

http://puu.sh/1nRiq
ki1ian is offline  
Reply With Quote
Old 11-08-2012, 09:14 AM   #4
NinjaTrader_JC
NinjaTrader Customer Service
 
NinjaTrader_JC's Avatar
 
Join Date: Mar 2012
Location: Denver, CO
Posts: 1,188
Thanks: 134
Thanked 180 times in 179 posts
Default

Hello Ki1ian,

This indicates you miss needed reference DLL’s or have corrupted ones listed - please follow the steps below to rectify the errors.

* In Control Center menu bar go to Tools > Edit NinjaScript > Indicator
* In the indicator dialog select any indicator and click on the ‘Ok’ button.

This will open the NinjaScript editor for you :

* Right click in the code section of the NinjaScript editor.
* In the context menu click on ‘References’
* In the Reference dialog, Click on the ‘Add’ button.
* Select all the missing DLL’s that are listed as the Metadata file in the error window (located in the Documents\NinjaTrader 7\bin\Custom\ folder and in the NinjaTrader installation folder, typically D:\Program Files\NinjaTrader 7\bin) one by one and then click ‘Ok’.
* Compile the indicator now by pressing F5.

The issues should be resolved and your NT should be again in properly compiled state
Please also see the section “How to add a reference” from our help guide
http://www.ninjatrader.com/support/h...indicators.htm

Let us know if the issue persists.
NinjaTrader_JC is offline  
Reply With Quote
The following user says thank you to NinjaTrader_JC for this post:
Old 11-08-2012, 09:54 AM   #5
ki1ian
Junior Member
 
Join Date: Nov 2011
Posts: 3
Thanks: 1
Thanked 0 times in 0 posts
Default

Many thanks JC, that solved it.

I'd copied the NinjaTrader 7 folder in My Documents from another computer where Windows and NT7 was installed on the drive letter D:\ . So as a result, those references were pointing to the wrong location.
ki1ian is offline  
Reply With Quote
Old 11-08-2012, 10:26 AM   #6
NinjaTrader_JC
NinjaTrader Customer Service
 
NinjaTrader_JC's Avatar
 
Join Date: Mar 2012
Location: Denver, CO
Posts: 1,188
Thanks: 134
Thanked 180 times in 179 posts
Default

Hello ki1ian,

You are quite welcome and as always, let us know if we can be of further assistance.
NinjaTrader_JC is offline  
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
Compile Error Code CS0006 Mickslash General Programming 7 01-09-2012 04:19 AM
Compiler Error mccallum28 General Programming 3 12-03-2011 01:41 PM
SuperTrend Compiler Error oldredtop NinjaScript File Sharing Discussion 6 06-29-2011 05:25 PM
Error# CS0006 MoneyChangesEverything Indicator Development 4 03-24-2010 02:43 PM
Compiler error skat100 Automated Trading 5 05-21-2009 02:31 PM


All times are GMT -6. The time now is 01:28 AM.