Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Compile Error

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

    Compile Error

    I'm getting the following error on the Editor, "An assembly with the same identity "System. Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" has already been imported. Try removing one of the duplicate references."

    What is this and how do I fix it?

    #2
    Hello spottysallrite,

    Thank you for your post.

    Could you provide a screenshot of the NinjaScript Editor window showing the full text of the error? You may need to drag the columns so its as visible as possible.

    Thanks in advance; I look forward to assisting you further.

    Comment


      #3
      Ok, for lack of a better idea, I exited the platform, then re-entered. I then grabbed a strategy (no particular one), then compiled it. The error is now different. Screen shot below.

      Click image for larger version

Name:	Compile_Error.PNG
Views:	131
Size:	70.4 KB
ID:	1199829


      Comment


        #4
        Hello spottysallrite,

        Thank you for your reply.


        Thank you for your note.

        The compile error you are seeing in the NinjaScript Editor indicates you are missing references to .DLL files in your installation or the .DLL files do not exist in your installation. Please follow the steps below to rectify the errors.
        1. From the Control Center please select New--> NinjaScript Editor
        2. In the NinjaScript Editor please right click and select References.
        3. In the Reference window look for the .DLL file reference in the compile error by name (in the error the file name has a .cs at the end)
        4. If you see the .DLL file reference please left click on the reference and select Remove
        5. If you removed the reference in the previous step or you do not see the .DLL file reference then please select Add
        6. The Add option will open a File Explorer, from the path that was opened please locate the .DLL file
        7. If you find the .DLL please left click to select it and then select Open--> then select OK in the References window--> then right click in the NinjaScript Editor--> select Compile
        8. If you do not find the .DLL in the File Explorer please close the File Explorer and References windows--> then navigate to Documents\NinjaTrader 8\bin\Custom on your PC--> and delete the .cs file referenced in the compile error--> then right click in the NinjaScript Editor--> Compile
        Please let us know if we may be of further assistance to you.

        Comment


          #5
          Ok, it seems to be working now. I don't know if the above solved the problem because I did several other things as well, such as uninstalling the app. Perhaps of note, tho, is that there were three "System.Data.dll" files there. I deleted two of them, leaving what appears to be the "native" one. Earlier, I added one of those, under the direction of Chelsea. He suggested I add it because I was getting errors that it wasn't there. After I followed his suggestion, it worked. Prior to implementing his suggestion I'm pretty sure there were no such files. Very odd.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          45 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          21 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          31 views
          1 like
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          50 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          42 views
          0 likes
          Last Post CarlTrading  
          Working...
          X