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

Can't add a reference that has been removed

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

    Can't add a reference that has been removed

    Hi, I was experimenting with C# and got in out of my depth. I was trying to find a way to connect to Oracle, and ran into problems with the DLLs. I have been copying DLLs into the NT bin directory (c:\Program Files(x86)\NinjaTrader 7\bin), and then adding corresponding references to those DLLs by right-clicking in the strategy editor and selecting "References". So far, so good: I was able to add DLLs and references to them.

    Then I had some compile errors that appeared to be problems with the System.dll. I downloaded a new System.dll from Microsoft, copied it to the NT directory, and then added a reference to it. That didn't work, so I removed the reference to "System.dll" so the new reference would take precedence. Now my programs won't compile and I can't back out the change since I can't add a reference to just "System.DLL" - the References screen forces me to put in a file path. I would assume the reference list is somewhere - can I just edit it to add the "System.dll" reference?

    #2
    Hello egan857,
    Thanks for your post and I am happy to assist you.

    The System.dll file resides in the .Net Framwok folder and you have to give reference to it. Typically you can locate in the following path. C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Sy stem.dll depending whether you are running a 32 bit or 64 bit OS and what version you are using.

    Please add a reference to it and let me know if everything is working fine or not.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Hi Joydeep,

      Thanks! Actually, I found a similar error by upshon and his solution was to edit config.xml to restore the entry to system.dll. But, your reference to the Microsoft.Net Framework directory solved the problem that caused me to get into this mess in the first place. When I added the Oracle.DataAccess.Client dll and the commands to connect to Oracle, I got a compile error about missing commands from System.Data. I misunderstood that and replaced the System.dll reference to a new version of System.dll. Now I have removed that System.dll and added just "System.dll" to the reference list so it uses the Microsoft.Net Framework version. I also copied System.Data.dll from the Framework directory to the NinjaTrader directory, added a reference to it, and now my Oracle connection compiles, too. I don't know if I can connect to Oracle, but it looks promising. Thank you, thank you, thank you!

      Comment


        #4
        Hello egan857,
        Glad to know everything works fine.

        NinjaScript is all C#. If the Oracle connection works in Visual Studio then it should work in NinjaScript too.

        Please let me know if I can assist you any further.
        JoydeepNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by love2code2trade, Yesterday, 01:45 PM
        4 responses
        28 views
        0 likes
        Last Post love2code2trade  
        Started by funk10101, Today, 09:43 PM
        0 responses
        7 views
        0 likes
        Last Post funk10101  
        Started by pkefal, 04-11-2024, 07:39 AM
        11 responses
        37 views
        0 likes
        Last Post jeronymite  
        Started by bill2023, Yesterday, 08:51 AM
        8 responses
        44 views
        0 likes
        Last Post bill2023  
        Started by yertle, Today, 08:38 AM
        6 responses
        26 views
        0 likes
        Last Post ryjoga
        by ryjoga
         
        Working...
        X