Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Debugging in Visual Studio

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

    Debugging in Visual Studio

    Hello!

    I'm using Visual Studio 2013. When I open it by pressing its icon in NinjaScript Editor, it shows me some warnings (look at the picture). How to get rid of them? I tried to exclude NinjaTrader.Vendor.dll from the project and most warnings disappeared, but after restarting NinjaTrader everything returned back.
    Attached Files

    #2
    Hello,

    Thank you for the question.

    I am unsure specifically on the @Swing warning as I do not see that on my end, but this is still only a warning so there should be no problem with VS, its intellesense or saving. This message is just stating which version of the indicator would be used in VS's internal processes.

    NinjaTrader its self will be doing the compiling, so long as NinjaTrader reports no actual Errors, there should be no problem with the warnings shown.

    I do see the processor mis match warning so that would be expected as well, again these are only warnings though, so as long as NinjaTrader its self is reporting no errors there should be no problem, If you instead see Errors listed, those would need to be addressed.

    Additionally, NinjaTrader re builds or re adds needed files and references to the project when you click the button in the editor, this is why the file had returned and would be expected.

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

    Comment


      #3
      Hello Jesse,

      Your reply is not very good, because instead of resolving the problem you say that it's not so important.

      In fact, these warnings substantially impede developing and debugging in VS. Is it possible to not include NinjaTrader.Vendor.dll to the project references when rebuilding the project in NT8? Can you talk it over with NT8 developers team?

      Comment


        #4
        Originally posted by quicktrick View Post
        Hello Jesse,

        Your reply is not very good, because instead of resolving the problem you say that it's not so important.

        In fact, these warnings substantially impede developing and debugging in VS. Is it possible to not include NinjaTrader.Vendor.dll to the project references when rebuilding the project in NT8? Can you talk it over with NT8 developers team?
        It is not possible to exclude the project reference. Most of the errors are due to the way the code wrappers are generated. If that causes problems for your development, you can ignore those warnings in your local custom visual studio project: https://msdn.microsoft.com/en-us/library/jj715718.aspx
        MatthewNinjaTrader Product Management

        Comment


          #5
          Hello Matthew,

          Unfortunately I can't ignore those warnings because there are no error codes for them.

          Comment


            #6
            Not sure which ones you're saying you can't ignore, or maybe you have your "Code" column turned off, but most of the errors in the project come from CS0436

            There is one error without a code:

            Severity Code Description Project File Line
            Warning There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "PresentationCore", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. NinjaTrader.Custom
            We cannot resolve this since we cannot change the 3rd party library, as the error suggests. But it should not cause any problems for you, it's just a warning... if it's bothering you, there is some advice on stack over flow I can direct you to:

            I'm new to project configuration in Visual Studio 2010, but I've done some research and still can't quite figure this issue out. I have a Visual Studio solution with a C++ DLL referencing the C# DL...
            MatthewNinjaTrader Product Management

            Comment


              #7
              Matthew, I use Visual Studio 2013 and it doesn't have the "Code" column in Error List (see here). I tried to ignore CS0436, but it didn't help.

              And why at all does this problem exist?
              The type 'NinjaTrader.NinjaScript.Indicators.Indicator' in 'C:\Users\...\Documents\NinjaTrader 8\bin\Custom\Indicators\@ADL.cs' conflicts with the imported type 'NinjaTrader.NinjaScript.Indicators.Indicator' in 'C:\Users\...\Documents\NinjaTrader 8\bin\Custom\NinjaTrader.Vendor.dll'. Using the type defined in 'C:\Users\...\Documents\NinjaTrader 8\bin\Custom\Indicators\@ADL.cs'.
              Is there any way to fix it?

              Comment


                #8
                I too am seeing the warnings and it is very frustrating. Currently, I have about 700 instances of this warning! I haven't even converted all my indicators over yet so I can just imagine where it's going to go! Saying to ignore them is NOT an acceptable solution. This would mean if I accidentally introduced a warning such as this, it would be ignored also! Warnings may not stop you from compiling but they show up in the error list for a reason. They are an indication that something is suspicious and your code may not have the intended effect. Having 700 warnings obscure other warnings that I am very interested in. It is bad practice to leave warnings in code, IMHO and is the opinion of many others.

                Comment


                  #9
                  Thanks for your feedback.

                  Just to set expectations, in order to avoid these warnings, we'd have to completely redo the way NinjaScript wrappers are implemented and that could have a magnitude of changes/implications downstream. It's not something we wish to invest effort in at this point.

                  There is a "Show warnings" option in the NT8 NinjaScript editor which will show relevant warnings to your code which can help mitigate some of your understandable frustration.

                  It is a complete pick your poison scenario and we really have no choice but to live with these warnings. I hope you can understand our position.
                  MatthewNinjaTrader Product Management

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by DJ888, 04-16-2024, 06:09 PM
                  6 responses
                  18 views
                  0 likes
                  Last Post DJ888
                  by DJ888
                   
                  Started by Jon17, Today, 04:33 PM
                  0 responses
                  1 view
                  0 likes
                  Last Post Jon17
                  by Jon17
                   
                  Started by Javierw.ok, Today, 04:12 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post Javierw.ok  
                  Started by timmbbo, Today, 08:59 AM
                  2 responses
                  10 views
                  0 likes
                  Last Post bltdavid  
                  Started by alifarahani, Today, 09:40 AM
                  6 responses
                  41 views
                  0 likes
                  Last Post alifarahani  
                  Working...
                  X