Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Compile error when creating Bar Type

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

    Compile error when creating Bar Type

    I created a new bar type from the wizard and simply gave it a name and new unique number, then saved and tried to compile it. That's it, no params or anything else.
    For some reason I'm getting :"Duplicate 'global::System.Runtime.Versioning.TargetFramework Attribute' attribute". The line that it points to is line 4 which is "using System.ComponentModel"
    I'm not getting this for indicators when I compile them.

    The only other framework I manually added in references (besides other third-party indicators), is "System.Speech" (4.8) to give alerts in indicators (works fine there).
    Any idea what could be causing this?

    #2
    Hello, thanks for writing in.

    Its hard to say what is causing this. I would need to log into your computer through TeamViewer to poke around to try and solve it. Feel free to email "platformsupport at ninjatrader.com" referencing "Attn ChrisL <past forum link here>" in the email and I will connect with you through teamviewer to see what this may be.

    Comment


      #3
      I ended up just clean installing NT8 and when I copied some folders back I got the same error. I suspect the Visual studio folders that is being written in the Documents/Ninjatrader8 folders was the culprit because as soon as I cleaned those out, it compiled again.

      Comment


        #4
        Ok, so I happened to recreate this error. It happens when I open the Custom folder through VS. VS creates a ".vs" folder and additional folders apparently which causes a conflict on the assembly.
        If I erase the files and restart VS, and this time open the indicator folder instead, VS then creates the .vs folder but not as many files. This time compile works. So there is something strange going on with Visual studio when you open through the Custom folder. First time I'm seeing this.

        Comment


          #5
          Hi Borgen, thanks for the follow up. It is recommended to launch the NinjaTrader.Custom.csproj file from within the bin/Custom folder to launch our custom project.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          633 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          364 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          567 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          568 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X