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 Option Whisperer, Today, 09:05 AM
          0 responses
          1 view
          0 likes
          Last Post Option Whisperer  
          Started by cre8able, Yesterday, 01:16 PM
          3 responses
          11 views
          0 likes
          Last Post cre8able  
          Started by Harry, 05-02-2018, 01:54 PM
          10 responses
          3,203 views
          0 likes
          Last Post tharton3  
          Started by ChartTourist, Today, 08:22 AM
          0 responses
          6 views
          0 likes
          Last Post ChartTourist  
          Started by LiamTwine, Today, 08:10 AM
          0 responses
          2 views
          0 likes
          Last Post LiamTwine  
          Working...
          X