Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to get rid of this warning?

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

  • ETFVoyageur
    replied
    As Koganam suggested, I can have VS suppress certain warning numbers. I am reluctant to do so, though, in case the same problem comes up in any of my code. For example the following could well occur in my own code and I would not want it hidden. NT has 4 of these and I'd rather see NT just fix their code.

    Warning CS0618 390 'FormattedText.FormattedText(string, CultureInfo, FlowDirection, Typeface, double, Brush)' is obsolete: 'Use the PixelsPerDip override'
    There is a small number of warnings to fix, admittedly several occurrences of each:
    • 2002 -- 3 occurrences
    • 0618 -- 4 occurrences
    • 0436 -- 385 occurrences -- but I expect a central solution takes care of most/all of them

    Also one with no warning number:
    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

    Leave a comment:


  • NinjaTrader_JessicaP
    replied
    Thank you for checking this log. This almost certainly means that this message is being suppressed by the NinjaTrader compiler, because it is known to be harmless. I am providing publicly available documentation on suppressing compiler warning messages distributed by MSDN so that you can configure Visual Studio to match the NinjaTrader compiler's configuration.

    Leave a comment:


  • ETFVoyageur
    replied
    There is a trace file with the appropriate time stamp, but nothing relevant o this topic is in there.

    Leave a comment:


  • NinjaTrader_JessicaP
    replied
    In addition to those two places, your (My) Documents\NinjaTrader 8\traces folder is the only other place an unsuppressed warning message would show up.

    Leave a comment:


  • ETFVoyageur
    replied
    No message shows up on the log tab, and nothing is written under Documents/NinjaTrader 8/log. Is there somewhere else I should be looking?

    Leave a comment:


  • NinjaTrader_JessicaP
    replied
    Thank you koganam.

    I will let our development staff know that this message only shows up when compiling in Visual Studio. It is likely in this case that our compiler intentionally filters out this warning message. Should this not be the case, I will follow up here with more information.

    Thank you ETFVoyageur for bringing this to our attention, and thank you both for all your help improving NinjaTrader 8.

    Leave a comment:


  • koganam
    replied
    Originally posted by NinjaTrader_JessicaP View Post
    Hello ETFVoyageur,

    koganam is correct in that the message is harmless and can be safely suppressed.

    I would be happy to pass this on to our development team. If you can provide a little more information, so that we will be able to reproduce this on our end, that would help us greatly.

    • Please attempt to use NinjaScript's compiler, rather than the Visual Studio compiler, if you are not doing so already. If you are using Ninja's compiler, this message will be sent to Ninja's log or trace files if the developers were not previously aware of this message.
    • If you are then able to send this message to Ninja's log and trace files, please send us a stripped down copy of your strategy which still causes this message, along with your log and trace files containing this message, to platformsupport[at]ninjatrader[dot]com , with attn:NinjaTrader_JessicaP and the unique ID 1554536 in the subject

    I have discussed this with several of our staff already, and they have assured me that once they have this information they will have everything they need to proceed further.


    Thank you for helping make NinjaTrader 8 the best product it can be.
    As far as I can recollect, that message only shows up in VS itself.

    Leave a comment:


  • NinjaTrader_JessicaP
    replied
    Hello ETFVoyageur,

    koganam is correct in that the message is harmless and can be safely suppressed.

    I would be happy to pass this on to our development team. If you can provide a little more information, so that we will be able to reproduce this on our end, that would help us greatly.

    • Please attempt to use NinjaScript's compiler, rather than the Visual Studio compiler, if you are not doing so already. If you are using Ninja's compiler, this message will be sent to Ninja's log or trace files if the developers were not previously aware of this message.
    • If you are then able to send this message to Ninja's log and trace files, please send us a stripped down copy of your strategy which still causes this message, along with your log and trace files containing this message, to platformsupport[at]ninjatrader[dot]com , with attn:NinjaTrader_JessicaP and the unique ID 1554536 in the subject

    I have discussed this with several of our staff already, and they have assured me that once they have this information they will have everything they need to proceed further.


    Thank you for helping make NinjaTrader 8 the best product it can be.

    Leave a comment:


  • koganam
    replied
    Originally posted by ETFVoyageur View Post
    The following line of code
    Code:
    Text myText = Draw.Text(...)
    Draws the Visual Studio warning (I have cut some extraneous parts)
    That sounds to me as if there is an inherent issue with the way the NT solution is set up. How can I get rid of this warning? Is that something I can do, or is that something that needs to be fixed by NT?
    If you do not want to see warnings in VS, suppress them in VS. That warning is unavoidable: the gumball dll is in the same space as the sources.

    Leave a comment:


  • ETFVoyageur
    started a topic How to get rid of this warning?

    How to get rid of this warning?

    The following line of code
    Code:
    Text myText = Draw.Text(...)
    Draws the Visual Studio warning (I have cut some extraneous parts)
    Warning CS0436 The type 'Text' in '...\Documents\NinjaTrader 8\bin\Custom\DrawingTools\@Text.cs' conflicts with the imported type 'Text' in 'NinjaTrader.Vendor, Version=8.0.0.12, Culture=neutral, PublicKeyToken=null'. Using the type defined in '...\Documents\NinjaTrader 8\bin\Custom\DrawingTools\@Text.cs'.
    That sounds to me as if there is an inherent issue with the way the NT solution is set up. How can I get rid of this warning? Is that something I can do, or is that something that needs to be fixed by NT?

Latest Posts

Collapse

Topics Statistics Last Post
Started by kinfxhk, 07-13-2026, 10:18 AM
0 responses
26 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Started by kinfxhk, 07-13-2026, 09:50 AM
0 responses
16 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Started by kinfxhk, 07-13-2026, 07:21 AM
0 responses
22 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Started by kinfxhk, 07-11-2026, 02:11 AM
0 responses
21 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Started by SalmaTrader, 07-07-2026, 10:26 PM
0 responses
136 views
0 likes
Last Post SalmaTrader  
Working...
X