Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Duplicate 'global::System.Runtime.Versioning.TargetFrameworkAttribute' attribute

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

    Duplicate 'global::System.Runtime.Versioning.TargetFrameworkAttribute' attribute

    Hello all,

    I have received the following error while trying to compile my ninjascript custom indicator:
    Duplicate 'global::System.Runtime.Versioning.TargetFramework Attribute' attribute - CODE: CS0579

    Could someone please help out?

    Thanks,
    Attached Files

    #2
    Hello pbylina,

    Thanks for your post.

    It seems that you posted the question in the NinjaTrader 7 section of the forums but the screenshot you shared looks like NinjaTrader 8.

    Could you confirm if this question is about NinjaTrader 7 or NinjaTrader 8?

    The error looks like you may have an AssemblyAttributes.cs file in the Custom folder which is conflicting with a .NET file. This may occur when building something in Visual Studio

    If this is NinjaTrader 8, open a File Explorer window and check in Documents\ NinjaTrader 8\bin\Custom\obj\Debug for a file named AssemblyAttributes.cs. If you find this file, delete the file and also delete the Documents\NinjaTrader 8\bin\Custom\obj folder as well.

    Doing a build from Visual Studio could cause multiple files to occur. Note that you should never compile from Visual Studio.

    From the Visual Studio Debugging help guide: You can also use Visual Studio as editor for your NinjaScript files - for that open the project as in step 2 above and then use Visual Studio for editing and once done save the file (don't run or build the solution then in Visual Studio), preferably with the NinjaScript editor opened still at the same time, so changes would be auto compiled in then.

    Visual Studio Debugging: https://ninjatrader.com/support/help..._debugging.htm

    Here is a forum thread detailing this compilation error and resolving it: https://forum.ninjatrader.com/forum/...rk#post1127976
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Wow, that worked! Thank you! Yes this is NT 8 but I didn't think I saw a NT8 forum...

      Comment


        #4
        Hello pbylina,

        Thanks for your notes.

        NinjaTrader 8 is known as NinjaTrader Desktop so you could post any NinjaTrader 8 related questions in the NinjaTrader Desktop section of the forums.

        Since this question is for NinjaTrader 8, I have moved your forum thread to the correct section of the forums.
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        587 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        341 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        555 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        552 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X