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

Trying to add Nuget Package for JSON.net,

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

    Trying to add Nuget Package for JSON.net,

    Can anyone help me with this?

    I read some prior posts about this which pointed to NinjaTrader 7 methodology and that did not work for me.

    So far I installed Nuget package
    Rebuild Solution
    Found DLL in Bin
    Moved it to Custom/Bin
    Still not working

    Tried to import it as add on, not in right format
    Compressed it to Zip File
    Tried importing again and said invalid

    Everything works fine in Visual Studio, I can add references and work with code, however will not comply and giving me could not find missing directive or assmembly reference in NS Editor.

    Any help would be greatly appreciated

    #2
    I got this working.

    For anyone who comes upon this thread, the missing part was going into NinjaScript Editor and on the left drop down under the too menu, right click and select Reference. I had to add the DLL from the Custom/Bin and then it compiled fine

    Comment


      #3
      Hello ErikY,

      Thanks for your post.

      Third-party DLLs would need to be compatible with .NET 4.8, added to the Documents/NinjaTrader 8/bin/Custom folder along with any dependencies (other needed DLLs) included, and the references would need to be added.

      Most frequently it is easiest to make a new Visual Studio project outside of NinjaTrader, add your NuGet reference, and build the project. Next, go look in the output folder and copy all the DLLs that are required for the NuGet reference to the Documents/NinjaTrader 8/bin/Custom folder. Finally, use the NinjaScript Editor Right-Click -> References menu to reference the DLLs. Now when you compile, the Visual Studio project will be updated to include the reference so it matches NinjaTrader.

      If you do this in an external project, make sure you select the right .NET version. This is important so that NuGet restores the correct DLLs that NinjaTrader will end up using.

      Nuget relies on the Visual Studio project to restore the DLLs which is not going to work the same way that NInjaScript works. In this case, because the project is always being regenerated by NinjaTrader you would need to use the physical reference in NinjaTrader so that Visual Studio reflects what the platform actually has referenced.

      More information may be found in this forum post: https://ninjatrader.com/support/foru...script-project

      Let us know if we may assist further.
      Brandon H.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Halmix, Today, 07:12 AM
      0 responses
      9 views
      0 likes
      Last Post Halmix
      by Halmix
       
      Started by Bobin, Today, 06:39 AM
      0 responses
      13 views
      0 likes
      Last Post Bobin
      by Bobin
       
      Started by KirkHammett, Today, 03:23 AM
      0 responses
      6 views
      0 likes
      Last Post KirkHammett  
      Started by eleven, Yesterday, 10:06 PM
      0 responses
      40 views
      0 likes
      Last Post eleven
      by eleven
       
      Started by ezrollin, Yesterday, 08:12 PM
      7 responses
      75 views
      0 likes
      Last Post bltdavid  
      Working...
      X