• 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

Loading indicator causes ReflectionTypeLoadException

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

    Loading indicator causes ReflectionTypeLoadException

    I tried to program an indicator which is using the NServiceBus open source service bus for net. So basically I added the using NServiceBus statement and the references to NServiceBus.dll, NServiceBus.Core.dll. In the code I'm referencing the IMessage class of NServiceBus. The indicator compiles without an error.
    Now, if I try to add the indicator to a chart an error message with a ReflectionTypeLoadException pops up (see attachment). The thing gets even worse if I close NT and try to restart it - NT is not even able to start.
    Looks like a weird bug in NinjaTrader, while compiling the indicator everything works fine, as soon I try to use the indicator NT is missing the IMessage declaration from the NServiceBus.dll, NServiceBus.Core.dll. I also tried to copy both dll into the NT custom folder without luck.

    Just interesting in a workaround for this NT bug.
    Thanks
    Attached Files

    #2
    Welcome to our forums Frank - were those .NET dlls compiled with a 3.5 target framework selected?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hey Bertrand, danke fuer die schnelle Antwort.
      So basically I got the latest 3.2.6 version of NServiceBus (http://nservicebus.com/Downloads.aspx). I assume that it they were compiled with the 4.0 Framework.
      Do you think that this is the issue? I'm just wondering why the compiler does not complain. But as soon I try to open the dialog to add an indicator to the chart the exception pops up. I'm not even selected this specific indicator. I just opened the dialog. So it looks like that in this case NT is somehow scanning all the indicators again for errors. The same happens if I open NT - the startup breaks and Windows is showing the error message that the program failed to start. If I'm removing my indicator from the Custom/Indicator folder NT is able to start without an issue.

      It seems to me that this is a general issue in NT - the different behavior within the programm, the compiler runs fine, but later everything breaks.
      Does NT always require DLL's compiled with the 4.0 Framework?

      Danke
      Frank

      Comment


        #4
        Hallo Frank - yes very likely that's the issue you run into then - NT7 would require referenced DLl's to be compiled using nothing later then target framework 3.5. We have an update to higher version on our list of feedback in product management and I've just added a vote here on your behalf in as well.

        The references added are global, so I'm not surprised to the issue appearing as you open the dialog for the parameters up.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          I found the 3.5 .NET version of the DLL's and it works. Thanks for explaining.
          But it would be nice to have this verification already at compile time - so basically the compiler should verify the referenced DLL's and should give a clear statement that there is a version conflict. The current behavior - NT does not come up - is frustrating if someone has no clue where it is coming from.

          But don't get me wrong, I still like NT, but also a great product can be improved.

          Comment


            #6
            Thanks for letting me know. I will add your feedback into our lists to make users better aware of this version compatibility.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Bertrand, faced a new problem yesterday.
              Error on calling 'OnStartUp' method for indicator 'tF_SMA': Could not load C:\Program Files (x86)\NinjaTrader 7\bin64\CliSecureRT.dll. Consider using 'Configure.With(AllAssemblies.Except("CliSecureRT. dll"))' to tell NServiceBus not to load this file.

              I'm using the .NET 3.5 version of NServiceBus. The indicator can be loaded, but as soon I'm calling the first NServiceBus method this messages can be seen in the output window.
              I also tried the
              Configure.With(AllAssemblies.Except("CliSecureRT.d ll") call, but then I get a Configure.With(AllAssemblies.Except("CliSecureRT64 .dll") error message.
              Appreciate any help, thanks.

              Comment


                #8
                Hi Frank, would unfortunately not have first hand experience using the NServiceBus with NT and it's not really in our supported scope here - do you get the same issue when working in NT7 32 bit?
                BertrandNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by brian meade, Today, 01:39 PM
                1 response
                4 views
                0 likes
                Last Post NinjaTrader_PaulH  
                Started by Johnny Santiago, Today, 12:20 PM
                1 response
                5 views
                0 likes
                Last Post NinjaTrader_ChrisL  
                Started by NinjaTrader_Brandon, Today, 10:24 AM
                0 responses
                50 views
                0 likes
                Last Post NinjaTrader_Brandon  
                Started by ptertich, Today, 07:56 AM
                2 responses
                15 views
                0 likes
                Last Post Johnny Santiago  
                Started by aslane, Today, 08:24 AM
                1 response
                15 views
                0 likes
                Last Post NinjaTrader_ChrisL  
                Working...
                X