Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

VisualStudio - get rid of compilation errors

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

    VisualStudio - get rid of compilation errors

    When opening NT8 sources in VisualStudio (2013 Update 4),
    then it reports some problems with syntax.
    (Despite that, NT8 compiler compiles all things successfully).

    Has anyone similar problems or any idea how to get rid of them?
    It really look like syntactically valid.

    This happens only with the Name parameter of Display attributes of properties.

    Attached Files

    #2
    Originally posted by misova View Post
    When opening NT8 sources in VisualStudio (2013 Update 4),
    then it reports some problems with syntax.
    (Despite that, NT8 compiler compiles all things successfully).

    Has anyone similar problems or any idea how to get rid of them?
    It really look like syntactically valid.

    This happens only with the Name parameter of Display attributes of properties.

    Because your string is not a Custom.Resource for the project. Either remove the ResourceType qualifier, or state it correctly as a system type.

    Comment


      #3
      Thank you koganam,
      when I removed the custom-resource part - then problem is resolved.
      Great tip from you.

      Remaining problem is, that this is original indicator @CurrentDayOHL - so I am not sure, if I can /should modify official sources. Maybe NT guys should update this.

      Could you (NT guys) fix this please ?
      The problem occurs in 2 places:
      • @CurrentDayOHL indicator (4 occurences of this problem between lines 145 - 157)
      • @SampleCustomPlot.cs (2 occurences between lines 165 and 187)
      Last edited by misova; 10-25-2015, 04:03 PM.

      Comment


        #4
        Hello,

        As koganam alluded to, we are using Custom.Resource for this with our pre-built scripts, which is intended. It should not be possible to edit pre-loaded scripts directly, but you can always make a copy to implement any changes you wish. When you do so, you will need to replace any reference to Custom.Resource with a an appropriate Type (such as String for names).
        Dave I.NinjaTrader Product Management

        Comment


          #5
          Thank you Dave,
          I am now confused a little bit, because I expected you say something like: "Yes, we see, that the referenced Name in Resources is reallly missing, so we fix this in next release."

          So I got somehow lost/confused after your answer...

          To be clear - I am not programming my custom indicator here. It is existing code provided by NT8 = existing indicator.

          I thought, that koganam pointed, that the Name in Resources is missing. And when I checked it - it is really missing. There is no Value for Name "Plot current value" in Resources.

          You can see that in file @CurrentDayOHL line: 145

          There is this line:
          [Display(ResourceType = typeof(Custom.Resource), Name = "Plot current value", GroupName = "NinjaScriptParameters", Order = 0)]

          I can fix this temporarily to get rid of signalling VS2015 this problem - but I would expect it will be fixed in NT8 for the future, otherwise it will come back with each new release of NT8...
          Last edited by misova; 10-26-2015, 04:52 PM.

          Comment


            #6
            Okay thank you for clearing that up, I did misunderstand the conversation. I will come back to this thread in the morning and try to reproduce the issue to submit a bug report.
            Dave I.NinjaTrader Product Management

            Comment


              #7
              Thank you Dave,
              just to point out - there are 6 occurences of this and same problem.
              They are summarized here once more, for quick reference:
              • @CurrentDayOHL indicator (4 occurences of this problem between lines 145 - 157)
              • @SampleCustomPlot.cs (2 occurences between lines 165 and 187)

              Comment


                #8
                Hello misova,

                To confirm, are you using ReSharper with Visual Studio?

                When you temporarily disable ReSharper (keyboard shortcut CTRL + SHIFT + ALT + 8), do these errors no longer occur?
                Zachary G.NinjaTrader Customer Service

                Comment


                  #9
                  Yes, you right - I am using Resharper v9.1.3.

                  When I click Ctrl+****+Alt+8 - reported problems are immediately away.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  666 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  376 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  110 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  575 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  580 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X