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 DJ888, 04-16-2024, 06:09 PM
      6 responses
      18 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by Jon17, Today, 04:33 PM
      0 responses
      1 view
      0 likes
      Last Post Jon17
      by Jon17
       
      Started by Javierw.ok, Today, 04:12 PM
      0 responses
      6 views
      0 likes
      Last Post Javierw.ok  
      Started by timmbbo, Today, 08:59 AM
      2 responses
      10 views
      0 likes
      Last Post bltdavid  
      Started by alifarahani, Today, 09:40 AM
      6 responses
      41 views
      0 likes
      Last Post alifarahani  
      Working...
      X