• 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

Import failed.The NinjaScript Archive file may contain duplicate method names that al

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

    Import failed.The NinjaScript Archive file may contain duplicate method names that al

    Hi,

    Get this error while compiling an indicator

    "Import failed.The NinjaScript Archive file may contain duplicate method names that already exist on your PC or there is a required file missing on either your PC or in the import archive"

    had this before and was able to solve by compiling a random indi and removing the fault listed indicator.
    in this case however i can compile an indicator and dont get any warning ( also dont get any succes message or whatever)

    any ideas?

    #2
    Hello,

    Thank you for the question.

    This message generally means there would be a conflict between something you have installed currently and what you are importing.

    You could manually install the item to test what the error is, if you are able to open the import screen and try to import the file, likely you don't have any compile errors so this would likely be a conflict.

    Could you tell me, if you either double click on the .zip file to open it and see its contents or extract the .zip, what files are listed? Are they .dll files or .cs files?

    With more information on the files in the zip I can provide specific instructions on how to test the file.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      hi it's a .cs file

      Comment


        #4
        Hello,

        Thank you for confirming that.

        For just a single .cs file, this would relate to what type of item this is. For example if this in an indicator it would get copied into: Documents\NinjaTrader 7\bin\Custom\Indicator

        For a strategy: Documents\NinjaTrader 7\bin\Custom\Strategy

        After copying the file into the correct folder, complete a compile as you did previously to check for errors. A new error should appear, please expand the Error column so I could read the details and provide a screenshot of the error. This should narrow down what is happening.

        After doing this, you can remove the file you copied and complete a compile to return to the compiled or working state you were in previously.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          hi

          see screenshot : http://screencast.com/t/bohettSm
          deleted the file and added another
          see screenshot:
          http://screencast.com/t/jlOrBuBJxOh

          Comment


            #6
            Hello,

            In the first image regarding the DrawText error, this is because the script is using an old usage of DrawText. Likely the script is currently out of date. The solution is to either manually import the item and then manually modify the code where needed to make the already existing calls to DrawText correct, or to see if there is a more updated version of that script available to download.

            In the second image, this is a reference error. If the zip file did not contain a file named "AdditionalRefereces.txt", the zip would not be able to be imported if the reference to System.Design.dll is not yet added.

            You may need to check if this item requires any other zips to be imported before hand also.

            Otherwise the second error could be corrected by adding a reference to the file: C:\Windows\Microsoft.NET\Framework\v2.0.50727\Syst em.Design.dll

            Click Tools -> Edit NinjaScript -> ADL and open it. Right click in the script, select References. Click Add and locate the above file and add it. Finally when added, click OK to close the menu and Right click and click Compile.

            This would correct the reference error specifically but if both files are in the same zip, they would still not be able to be imported ever based on the first set of errors related to DrawText. That would need to be corrected and re exported as the solution if both files are in the same zip. You can manually import the second item after adding the reference in this case though.

            Please let me know if I may be of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Hi Jesse

              I have this exact error message on import. I have no compilation errors prior.
              Double clicking on zip in my case i get 1 .cs file and 2 .dll files a x64 and x86

              Can you help?

              Thanks

              Comment


                #8
                Hello,

                Thank you for the question,

                For a zip that contains only a .cs and two dll files, this likely could be manually referenced to check for errors but if the zip is not importing likely you would need to contact the vendor or party that exported the file to have it corrected.

                If you would like to email our platform support @ ninjatrader.com we could try testing the zip file to see what error is generated upon import to get more details.

                I look forward to being of further assistance.
                JesseNinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_Jesse View Post
                  Hello,

                  Thank you for the question,

                  For a zip that contains only a .cs and two dll files, this likely could be manually referenced to check for errors but if the zip is not importing likely you would need to contact the vendor or party that exported the file to have it corrected.

                  If you would like to email our platform support @ ninjatrader.com we could try testing the zip file to see what error is generated upon import to get more details.

                  I look forward to being of further assistance.
                  ok i have sent to support, vendor says hundreds using with no problems, just me...we will see thanks

                  Comment


                    #10
                    Hi, did this get resolved eventually? Is there any update that can be posted here to help others?

                    Comment


                      #11
                      Hello,

                      Thank you for the post.

                      Unfortunately the user did not report back here if this did get resolved, in the case the user had emailed in, our support would have resolved the issue or located the reason.

                      Most often import errors are caused by conflicts between items installed. This thread specifically is starting to become a collection of unrelated posts, to further address this thread going forward, anyone that is having a import problem should first review the following page to ensure the platform is compiled: http://ninjatrader.com/support/forum...ead.php?t=4678

                      If it is and you need further assistance I would suggest to email our platform support [@] ninjatrader dot com.

                      If you attach the item in your email, we can test in a completely clean install to see if this is a problem with a conflict or if there is a problem with the file being imported.


                      I look forward to being of further assistance.
                      JesseNinjaTrader Customer Service

                      Comment


                        #12
                        Is there a checklist on reasons why this error occurs? Or a checklist of debugging steps to look for?

                        As a vendor, this is definitely one of the most annoying and time consuming problems to deal with when troubleshooting customer problems.

                        The error message just implies "there is a conflict" or "duplicate methods". As you can imagine, that doesn't help much.

                        If I export a compiled assembly of AddOns (while checking "protect compiled assembly"), then go through the import process on the user's end for the first time, how are there "duplicate method names"? Often a user will have this error on one machine but not another.

                        Is there anything I can do, as a vendor, to prevent this from happening in the first place, on my end? Is there a checklist on reasons why this error occurs? Or a checklist of debugging steps to look for when trying to help a user?
                        Last edited by neoikon; 01-27-2017, 08:46 AM.

                        Comment


                          #13
                          Hi my friends,


                          Bump in this error as well. I am exporting strategies to other station using compiled assembly option. Since 2 different strategies are using the same indicator, one blocks the other importation.

                          I tried to export the indicator alone but it seems all indicators are embedded in the dll file.



                          Do I have to rename the indicator for each strategy? Lot of work and hard to control...
                          Please advise


                          Thanks!

                          Comment


                            #14
                            Hello mcosta72,

                            You would likely need to export the indicator separately in that situation. From the development PC, when you are ready to export each strategy you would need to first export the indicator as a compiled assembly by its self and then Delete the indicator source code and re-import the compiled assembly indicator.

                            Once this is done, each strategy should be able to be exported noting that a reference to the indicator DLL would be needed. You would then need to add that DLL to the zip file per the instructions here:
                            https://ninjatrader.com/support/help..._procedure.htm

                            Alternatively, you would need to make 2 indicators with unique names and include one with each strategy export.

                            A third alternative would be if these are not visual indicators and are only being used for signals, implement the indicator logic inside of the strategy instead of using an indicator.

                            For further assistance on exporting, please contact our platform support @ ninjatrader.com.



                            I look forward to being of further assistance.
                            JesseNinjaTrader Customer Service

                            Comment


                              #15
                              Jesse,


                              Thank you very much for your replay.
                              I was wondering if I could save my indicator as a "native" or "locked" indicator, the same ones we got from NT. Is it possible?

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by dariuszszyc, Today, 09:08 AM
                              1 response
                              6 views
                              0 likes
                              Last Post NinjaTrader_JoshG  
                              Started by Sadat, Today, 09:09 AM
                              1 response
                              6 views
                              0 likes
                              Last Post NinjaTrader_JoshG  
                              Started by login_dejavu, Today, 07:57 AM
                              4 responses
                              17 views
                              0 likes
                              Last Post login_dejavu  
                              Started by Lender, Yesterday, 05:15 PM
                              1 response
                              13 views
                              0 likes
                              Last Post NinjaTrader_Jim  
                              Started by rcmcd, Today, 07:52 AM
                              1 response
                              7 views
                              0 likes
                              Last Post NinjaTrader_PatrickG  
                              Working...
                              X