Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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
    Brandon H.NinjaTrader Customer Service

    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.
        Brandon H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,403 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by Shai Samuel, 07-02-2022, 02:46 PM
        4 responses
        94 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by DJ888, Yesterday, 10:57 PM
        0 responses
        6 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by MacDad, 02-25-2024, 11:48 PM
        7 responses
        158 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Yesterday, 09:29 PM
        0 responses
        8 views
        0 likes
        Last Post Belfortbucks  
        Working...
        X