Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Import compiled assembly

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

    Import compiled assembly

    Hello,
    I've got a problem when trying to import a compiled assembly on a different computer.
    Everything compiles ok on the computer where I wrote the scripts.

    Attached is the picture of the problem.

    Thanks
    Attached Files

    #2
    Hey ryker,

    This is basically saying that you have defined a method in the compiled assembly that is the same name as a function / method on the computer you're trying to import to.

    I would delete the existing TZ on the computer you're importing to (maybe back it up first), then try to import and see how it works.
    mrlogik
    NinjaTrader Ecosystem Vendor - Purelogik Trading

    Comment


      #3
      Hi mrlogik,
      Thanks for your quick answer.

      The computer where I try to import this assembly has a clean install so there's nothing on it.

      The enum TZ is in a namespace like UserDefinedMethods. When I tried to import it alone it works but when I try to add an indicator in the assembly, it doesn't work anymore and I got this error message. There is no definition of TZ in the indicator.

      So I have no idea why I've got this duplicate message error...

      Comment


        #4
        Wait... Is it in UserDefinedMethods? If it is, I don't believe that function will export.

        If you tried to import it alone, its now already in there, and something when you try to add an indicator is causing the problem; or at least that is how i'm understanding it.

        I would try to remove anything on the "to" computer, put the enum into the indicator itself, export that and see what happens. I know the enum is more of a global thing you want to use, but I would try it this way to understand what is going on....
        mrlogik
        NinjaTrader Ecosystem Vendor - Purelogik Trading

        Comment


          #5
          Ok, it wasn't exactly in UserDefinedMethods but in my own namespace. So I moved it to one of my indicators that uses it and then found out that the property needs the full name to access it. Then moved it back to its old location and amended the property name with the full path to TZ. Tried export and import it and it works!

          Thanks for your suggestions!

          Comment


            #6
            Good job!

            Sometimes the export / import can be a bit tricky
            mrlogik
            NinjaTrader Ecosystem Vendor - Purelogik Trading

            Comment


              #7
              Originally posted by ryker View Post
              Ok, it wasn't exactly in UserDefinedMethods but in my own namespace. So I moved it to one of my indicators that uses it and then found out that the property needs the full name to access it. Then moved it back to its old location and amended the property name with the full path to TZ. Tried export and import it and it works!

              Thanks for your suggestions!
              if you ar using your own namespace and trying to access something from it,it's helpful to include a line in the top:

              using YourNameSpaceName;

              Comment


                #8
                I have that line on top already but still needed to use the full library path somehow...

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by nandhumca, Today, 03:41 PM
                0 responses
                1 view
                0 likes
                Last Post nandhumca  
                Started by The_Sec, Today, 03:37 PM
                0 responses
                3 views
                0 likes
                Last Post The_Sec
                by The_Sec
                 
                Started by GwFutures1988, Today, 02:48 PM
                1 response
                5 views
                0 likes
                Last Post NinjaTrader_Clayton  
                Started by ScottWalsh, 04-16-2024, 04:29 PM
                6 responses
                32 views
                0 likes
                Last Post ScottWalsh  
                Started by frankthearm, Today, 09:08 AM
                10 responses
                36 views
                0 likes
                Last Post frankthearm  
                Working...
                X