Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Compiler Error CS0006

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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!

    #2
    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:


    Also here is a forum post that describes the process and offers ways to resolve the situation:


    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.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Hi,

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

      Comment


        #4
        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.
        JCNinjaTrader Customer Service

        Comment


          #5
          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.

          Comment


            #6
            Hello ki1ian,

            You are quite welcome and as always, let us know if we can be of further assistance.
            JCNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by ScottWalsh, Today, 04:29 PM
            0 responses
            4 views
            0 likes
            Last Post ScottWalsh  
            Started by rtwave, 04-12-2024, 09:30 AM
            2 responses
            21 views
            0 likes
            Last Post rtwave
            by rtwave
             
            Started by tsantospinto, 04-12-2024, 07:04 PM
            5 responses
            69 views
            0 likes
            Last Post tsantospinto  
            Started by cre8able, Today, 03:20 PM
            0 responses
            7 views
            0 likes
            Last Post cre8able  
            Started by Fran888, 02-16-2024, 10:48 AM
            3 responses
            49 views
            0 likes
            Last Post Sam2515
            by Sam2515
             
            Working...
            X