Announcement

Collapse
No announcement yet.

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.

    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.

        Comment


          #5
          Thanks a lot, this worked!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          56 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          132 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          73 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          45 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          49 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X