• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unable to retrieve type info for NinjaTrader.NinjaScript.AddOnBase from Assembly

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

    Unable to retrieve type info for NinjaTrader.NinjaScript.AddOnBase from Assembly

    Prior to version 17 I never received this message, but now when I use Twilio.dll I get the following error: Unable to retrieve type info for NinjaTrader.NinjaScript.AddOnBase from Assembly Twilio.dll

    I have placed Twilio.dll and Twilio.xml in Documents\NinjaTrader 8\bin\Custom
    I have also added Twilio.dll as a reference in the NinjaScript Editor

    I never received an error when I was on a version prior to 17. I have tested versions 3.5 and 4.5.1 and still receive the same error: https://www.nuget.org/packages/Twilio/5.26.0

    #2
    Hello Jack22,

    While using 3rd party assembly libraries is fine for you to choose to do, please keep in mind that this is outside of what is supported by NinjaTrader Support.

    Are you able to use this in a new environment folder?

    To create a clean temporary NinjaTrader folder:
    1. Shutdown NinjaTrader
    2. Rename (My) Documents\NinjaTrader 8\ to (My) Documents\NinjaTrader 8.original\
    3. Download the NinjaTrader installation package from the link below
      http://ninjatrader.com/GetStarted
    4. Run the repair from this (if the repair is unsuccessful, uninstall and then re-install NinjaTrader)
    This will recreate the NinjaTrader 8 folder in (My) Documents.

    Try testing for the behavior in a new environment.


    To switch back to your original environment:
    1. Shutdown NinjaTrader
    2. Rename (My) Documents\NinjaTrader 8 to (My) Documents\NinjaTrader 8.secondary\
    3. Rename (My) Documents\NinjaTrader 8.original to (My) Documents\NinjaTrader 8\
    4. Start NinjaTrader

    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I have the same issue using the clean environment. Why is NinjaTrader looking for NinjaTrader.NinjaScript.AddOnBase in a custom dll--this seems like a design error, especially if there were no conflicts prior to v17.

      Comment


        #4
        Hello Jack22,

        The AddonBase is part of the NinjaTrader core code which is all protected assemblies. We would not be able to make this namespace open source.

        Changes to the internal workings of NinjaTrader is always subject to change.


        To confirm, if you re-install 8.0.16.3 with a clean environment folder there are no errors?

        May I have the dll file you are attempting to use to confirm this?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          I wasn't suggesting to make it open (realize you all can't do that), but that NT should not be looking for AddOnBase in a custom assembly (or if not found, know it shouldn't be there / ignore).

          When I was on the latest version of 16 (I guess it was 16.3) all worked perfectly. When I upgraded to v17, I started to get the error. I did the clean environment that you suggested in v17 and still had the error.

          The files are kind of big, so I uploaded them at the following link--I included both versions (3.5 and 4.5.1): https://drive.google.com/file/d/1n0V...ew?usp=sharing

          Thanks

          Comment


            #6
            Hello Jack22,

            This how NinjaTrader works and is able to import new scripts and compile these. All scripts get compiled and are referenced in the NinjaTrader.Custom.dll that is created. It would not be possible to change the inner workings of NinjaTrader.

            The error you are getting is actually telling you that an assembly reference is not resolving. Behind the scenes in the AddonBase NinjaTrader is calling GetTypes() to get all of the scripts in NinjaTrader. The error is occurring when this list is created because a referenced script cannot be loaded.

            When you have mentioned:
            Originally posted by Jack22 View Post
            I have the same issue using the clean environment. Why is NinjaTrader looking for NinjaTrader.NinjaScript.AddOnBase in a custom dll--this seems like a design error, especially if there were no conflicts prior to v17.
            This is incorrect. NinjaTrader is not looking for NinjaTrader.NinjaScript.AddOnBase in a custom dll.


            We were able to determine that the files you are attempting to use reference the Newtonsoft.Json as detailed in the Dependencies of the NuGet page you have linked. Newtonsoft.Json was updated to a new version for release 17.
            As a heads up, using Newtonsoft.Json is not officially supported by NinjaTrader Support.

            The exact version of Newtonsoft.Json that must be referenced is 11.0.2.21924 or the script will error when the constructor builds.

            Alternatively, you can try and place the version of Newtonsoft.Json that is needed by this 3rd party in the Documents\NinjaTrader 8\bin\Custom folder, add a reference to the file in the NinjaScript Editor > References window, and restart NinjaTrader and NinjaTrader may be able to correctly reference that version when adding the 3rd party script.
            Last edited by NinjaTrader_ChelseaB; 02-05-2019, 04:31 PM.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              For anyone else having this / similar issue, I used this to resolve: https://ninjatrader.com/support/foru...ewtonsoft-json

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by yeshujbp, 07-21-2019, 02:40 PM
              2 responses
              32 views
              0 likes
              Last Post omololu
              by omololu
               
              Started by seagraph, Yesterday, 03:27 PM
              1 response
              24 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by NinjaCustomer, Today, 09:37 AM
              1 response
              8 views
              0 likes
              Last Post NinjaTrader_DrewO  
              Started by stalt, Today, 07:52 AM
              5 responses
              16 views
              0 likes
              Last Post NinjaTrader_PatrickG  
              Started by im197, 07-30-2019, 12:29 PM
              2 responses
              10 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Working...
              X