• 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 load custom assembly

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

    Unable to load custom assembly

    I am trying to add to nt8 8.0.12.0 64-bit my own c# 4.5.0 dll compiled as AnyCpu with visual studio 2017 but it fails with messages (see attached image) : "Unable to load custom assembly: The given key was not present in dictionary". Of course then, the dynamic loading failed.

    The way i proceed :
    1. I create a strategy called "Bridge"
    2. I add the 3 references : protobuf3.dll, Grpc.Core.dll and My.dll
    3. I compile => no error but the box shows up


    Nothing in log nor traces.

    If I restart NT8 as it, it cant recover and request to reinstall ninja.

    My dll uses two 3d-party :
    Grpc.Core 1.4.1 : https://www.nuget.org/packages/Grpc.Core/1.4.1
    protobuf3 3.1.0 : https://www.nuget.org/packages/Google.Protobuf/3.1.0

    I am confused because my 2 test projects are working fine ! One of them just mock ninjatrader objects ... One is c# console, the other is a c# gui app, all 4.5.0.

    I can provide you the c# source file of the strategy call these, my dll and the dependencies.

    Thanks for your help
    Attached Files
    Last edited by carmiFR; 05-07-2018, 11:37 AM.

    #2
    Hello carmiFR,
    Thanks for your post.

    It sounds like you are going through the correct process. Is your custom dll located inside your \Documents\NinjaTrader 8\bin\Custom\ folder when you export it?
    I compile => no error but the box shows up
    Just to clarify- do you mean the 'export successful' box? If not, which box do you mean?

    If you can provide me with the resources you mentioned that would also help alot. If you like, you may write into PlatformSupport(at)NinjaTrader(dot)com and reference this forum post. I will be able to take a closer look on my end.
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      I mean it looks like the compilation goes OK but then when NT tries to reload the custom assembly it generates the messagebox like the image attached.

      I send you the material to reproduce.

      Thanks !

      Comment


        #4
        It seems that upgrading to latest version (8.0.13.1) fixed the dynamic load (strange) exception.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Gerik, Yesterday, 11:27 PM
        0 responses
        2 views
        0 likes
        Last Post Gerik
        by Gerik
         
        Started by Bionian, Yesterday, 11:14 PM
        0 responses
        2 views
        0 likes
        Last Post Bionian
        by Bionian
         
        Started by Gerik, Yesterday, 10:58 PM
        0 responses
        1 view
        0 likes
        Last Post Gerik
        by Gerik
         
        Vps by stooby
        Started by stooby, Yesterday, 08:32 PM
        0 responses
        11 views
        0 likes
        Last Post stooby
        by stooby
         
        Started by FaaastEddy, Yesterday, 08:25 PM
        0 responses
        3 views
        0 likes
        Last Post FaaastEddy  
        Working...
        X