Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to import Newtonsoft.Json.Dll

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

    How to import Newtonsoft.Json.Dll

    Hello

    I am trying to use Newtonsoft.Json.Dll but I have errors when trying to compile, such as

    Code:
    "Le type 'System.Object' est défini dans un assembly qui n’est pas référencé. Vous devez ajouter une référence à l’assembly ' System.Runtime, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a'."
    Do you think I can use Newtonsoft Dll in a NT8 project ?

    Thanks

    #2
    I have resolved my issue.

    I had imported the DLL from a Visual Studio 2017 Project => That seems to have been the cause of the issue.

    I downloaded the zipped binary from Newtonsoft and imported the dll from the uncompressed zip file downloaded and everything seems ok now

    Comment


      #3
      Well... Another problem now

      Everything compiles fine but when attaching the strategy to an instrument I have the following message :

      Strategy 'xxxStrategy': Error on calling 'OnStateChange' method: Impossible de charger le fichier ou l'assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' ou une de ses dépendances. Le fichier spécifié est introuvable.

      Comment


        #4
        Hello,

        Thank you for the post.

        You are able to use outside references with the platform, but you would also need to ensure that it is installed properly and is the correct version for the platform. Using third-party references is generally outside of the scope in which we can provide support for but I can provide the following items which may help you in loading the file successfully.

        The dll needs to be placed in the folder: Documents\NinjaTrader 8\bin\Custom

        Any other files that come with the dll, such as other dlls would also need to be placed in the folder with the dll.

        The version of the dll would need to be .net 4.5 or less and would need to be either AnyCPU or for the version you are using I.E. X64bit.

        if it was somewhere else you may also need to restart the platform after adding the dll to the bin/custom folder to ensure it is reloaded.

        Could you check these items and see if any of these relate to the error?

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

        Comment


          #5
          Thank you for your reply.

          I'll make other tests and will let you know if I still have errors.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by sentient254, Yesterday, 04:44 PM
          1 response
          13 views
          0 likes
          Last Post NinjaTrader_PaulH  
          Started by muratb35, Today, 03:36 AM
          0 responses
          5 views
          0 likes
          Last Post muratb35  
          Started by fernlicht, Today, 02:16 AM
          2 responses
          15 views
          0 likes
          Last Post fernlicht  
          Started by fernlicht, 04-12-2021, 06:01 PM
          1 response
          31 views
          0 likes
          Last Post NinjaTrader_PaulH  
          Started by memonolog, Today, 02:10 AM
          3 responses
          12 views
          0 likes
          Last Post memonolog  
          Working...
          X