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

Error on finding the account...

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

    Error on finding the account...

    Hello NT,

    I am compiling a strategy and it gives an error on line 4 which is the list of using declerations.
    At line 4 I have the following code:

    using System.Linq;

    The error says that "Duplicate "global:System.Runtime.Versioning.TargetFrameworkA ttribute" attribute"

    Do you know why this gives an error?

    Thank you
    Last edited by yannistsoupakis; 12-28-2020, 08:28 AM.

    #2
    Hello yannistsoupakis,

    First and FirstOrDefault requires using System.Linq;

    Are you by chance using visual studio with NinjaTrader? Is that an error you see when compiling in the NinjaScript editor?

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

    Comment


      #3
      I use visual studio..

      I didn't have this problem initially, but now I have it. I have no idea why.

      I compiled it now with NinjaTrader and it gives me the same error.

      Thanks

      Comment


        #4
        Hello yannistsoupakis,

        To further clarify how this could have occurred, did you attempt to do a build from visual studio at any point? or make any changes to the visual studio solution? I'm just trying to get a better idea of what may have happened.

        You can try the solution posted in this thread to check if that resolves the error for you: https://ninjatrader.com/support/foru...46#post1101246

        The error suggests there is extra files that should not be present in the bin/Custom folder. That may include additional AssemblyAttributes.cs files. This could also relate to the data in the bin/Custom/obj or bin/Custom/bin folders. It would be difficult to say without exploring the user data folder. The clean user folder test should clear the error by removing that data.

        I look forward to being of further assistance.
        Last edited by NinjaTrader_Jesse; 12-28-2020, 09:10 AM.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Thanks a lot, this worked!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Jltarrau, Today, 05:57 AM
          0 responses
          1 view
          0 likes
          Last Post Jltarrau  
          Started by f.saeidi, Today, 05:56 AM
          1 response
          2 views
          0 likes
          Last Post Jltarrau  
          Started by Stanfillirenfro, Yesterday, 09:19 AM
          7 responses
          51 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by TraderCro, 04-12-2024, 11:36 AM
          4 responses
          70 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Mindset, Yesterday, 02:04 AM
          1 response
          15 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X