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.

    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.

        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 sjsj2732, 03-23-2026, 04:31 AM
          0 responses
          148 views
          0 likes
          Last Post sjsj2732  
          Started by NullPointStrategies, 03-13-2026, 05:17 AM
          0 responses
          352 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          390 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          182 views
          1 like
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          137 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Working...
          X