Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DataSetExtensions

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

    DataSetExtensions

    I'm trying to use DataTable() in my script. This appears to mean putting "using System.Data;" and "using System.Data.DataSetExtensions;" into the code as well as in the "References". Of course, I've done both. However, when I compile I get the following error: "The type or namespace name 'System.Data.DataSetExtensions' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)".

    fwiw, .NET 4.7 is currently installed in my system.

    Any suggestions as to how to fix this?

    #2
    Hello spottysallrite,

    Thank you for the question.

    In references to the .net version, if you are manually referencing any system .net dlls, please ensure to use .net 4.5 for NT8. 4.7 would not be supported currently.

    You may also need to copy the .dll files to the Documents\NinjaTrader 8\bin\Custom folder for them to be correctly compiled, this would also entail you update the reference to point to this folder.

    If you have visual studio installed, a quick way to gather .net dll references would be to create a new empty WPF application project targeting .net 4.5. In the project, you can manage the references as needed and then build the project. This will cause the dlls to be copied to the output folder which you can then copy to the bin/custom folder and reference.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      I'm not following. References already points to System.Data and System.DatSetExtensions. Both are in .NETFramework\v4.5. Are you saying I need to copy those files to bin\Custom as well, and have References point to them there as well ?

      Comment


        #4
        Hello spottysallrite,

        Yes, this is correct, files that are outside of the bin/custom folder may fail to be seen by the compiler correctly when referenced. It is advisable to place all references in the bin/custom folder.

        You would likely need to remove the references you have now, compile and exit, add the files to the custom folder and then restart/reference/compile with them in the custom folder. The existing system dll references are added in a special way in the config file which allows the GAC to provide the correct .dll file. For other files you manually add, generally, these need to be placed in the custom folder.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          FWIW I tried adding System.Data as a reference via NinjaScript Indicator Window | Selected Reference | Selected Add | Navigated to the File. NT8 did not like this when I tried to compile an indicator. Numerous errors with stock NT indicators. Removed the reference and compiled it again. No errors.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by hbkopugwdmkb, Today, 11:10 PM
          0 responses
          1 view
          0 likes
          Last Post hbkopugwdmkb  
          Started by fastnet, Today, 10:58 PM
          0 responses
          3 views
          0 likes
          Last Post fastnet
          by fastnet
           
          Started by tradingbobby, Today, 10:41 PM
          1 response
          6 views
          0 likes
          Last Post s.kinra
          by s.kinra
           
          Started by bfalls, Today, 10:38 PM
          1 response
          7 views
          0 likes
          Last Post s.kinra
          by s.kinra
           
          Started by WHICKED, Today, 09:05 PM
          0 responses
          11 views
          0 likes
          Last Post WHICKED
          by WHICKED
           
          Working...
          X