Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Issue Exporting AddOn as Assembly DLL

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

    Issue Exporting AddOn as Assembly DLL

    Hi there,

    I have created an AddOn, and I am testing the export process. I have added the source files to the project in the following structure:

    NinjaTrader.Custom
    - MyCompany
    - MyClass (in MyCompany namespace)
    - AddOns
    - MyAddOn (uses MyCompany namespace and MyClass class)

    When I go to export, I can only select the MyAddOn, not the MyClass class.

    When I press the export button I get the error:
    Error compiling export assembly. Please check your logs.

    When I look in the logs it says:
    The type or namespace name 'MyCompany' could not be found (are you missing a using directive or an assembly reference?)

    What am I doing wrong here?

    I have had a look at the following pages:




    But they don't cover my scenario.

    Also while trying to get this to work I did one attempt where I pressed the Add button on the NinjaScript Export window, and selected References from the Type menu in the Select dialogue, and ticked the PresentationFramework. When I tried to export with that selected I get the error:
    Time Category Message
    17/01/2016 9:57:37 PM Default Error compiling export assembly: error CS0006: Metadata file 'C:\Users\MyAccount\Documents\NinjaTrader 8\bin\Custom\PresentationFramework.dll' could not be found

    That seems a bit strange. It happens when I select any reference.

    Is this a bug, or I am doing something wrong. Again it is not covered in the above doco.

    Thanks for your time.

    Regards,

    Scott
    Last edited by codeowl; 01-17-2016, 05:05 AM.

    #2
    Ok after much trial and error I have now solved this.

    I worked out that you can add dll references via the NinjaScript Editor. I had only been adding via VS to the NT8 project. I had originally created all my code in a Class Library project. So I went back to this approach and added a build event for it to copy the dll file to the following folder:
    C:\Users\MyAccount\Documents\NinjaTrader 8\bin\Custom\

    It took a fair bit of trial and error to work out that is where the dll needed to go. Would be great if that was documented somewhere.

    I am now able to export the AddOn.

    Anyway hopefully this helps someone else save some time ;-)

    Regards,

    Scott

    Comment


      #3
      Hello codeowl,

      Thanks for posting the issue and solution you found.
      I will update our development group to this to see if there is anything they can add to the documentation that would be helpful going forward.
      Paul H.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by hazylizard, Today, 08:38 AM
      2 responses
      8 views
      0 likes
      Last Post hazylizard  
      Started by geddyisodin, Today, 05:20 AM
      2 responses
      18 views
      0 likes
      Last Post geddyisodin  
      Started by Max238, Today, 01:28 AM
      5 responses
      47 views
      0 likes
      Last Post Max238
      by Max238
       
      Started by giulyko00, Yesterday, 12:03 PM
      3 responses
      13 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by habeebft, Today, 07:27 AM
      1 response
      16 views
      0 likes
      Last Post NinjaTrader_ChristopherS  
      Working...
      X