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

How to Add Reference to System.Data

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

    How to Add Reference to System.Data

    Hi

    How do you add a reference to a System namespaces?

    I need to access to objects in System.Data.dll

    As System.Data is in the GAC I dont want to reference the dll file directly, C:\Windows\Microsoft.NET\assembly\GAC_32\System.Da ta\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll but rather use the instance in the GAC.

    The Add references dialog box does not give me an option to to access the GAC, I have tried browsing to C:\Windows\assembly where you can see contents of GAC but dialog does not allow me to add.

    Is there a file that I need to edit manually, as I see in the reference dialog there are 5 System Assemblies referenced.

    Thanks

    Mike

    #2
    Hello,

    This file path will always need to be added manually there is no way to hard code it like the System.dll is added. You must add the full file path with the references window.

    Let me know if I can be of further assistance.

    Comment


      #3
      I have figured it out.

      I have edited the Config.xml file in My Documents\NinjaTrader 7

      Add an element to the <References> tag as below.

      <References>
      <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <string>System.dll</string>
      <string>System.Core.dll</string>
      <string>System.Data.dll</string>
      <string>System.Drawing.dll</string>
      <string>System.Windows.Forms.dll</string>
      <string>System.XML.dll</string>
      <string>C:\Program Files (x86)\NinjaTrader 7\bin\NinjaTrader.Core.dll</string>
      <string>C:\Program Files (x86)\NinjaTrader 7\bin\WilsonORMapper.dll</string>
      <string>D:\\My Documents\NinjaTrader 7\bin\Custom\NinjaTrader.Vendor.dll</string>
      </ArrayOfString>
      </References>

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Barry Milan, Yesterday, 10:35 PM
      3 responses
      10 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by WeyldFalcon, 12-10-2020, 06:48 PM
      14 responses
      1,428 views
      0 likes
      Last Post Handclap0241  
      Started by DJ888, 04-16-2024, 06:09 PM
      2 responses
      9 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by jeronymite, 04-12-2024, 04:26 PM
      3 responses
      41 views
      0 likes
      Last Post jeronymite  
      Started by bill2023, Yesterday, 08:51 AM
      2 responses
      16 views
      0 likes
      Last Post bill2023  
      Working...
      X