Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

The type or namespace name 'Primitives' does not exist ... 'System.Drawing'

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

    The type or namespace name 'Primitives' does not exist ... 'System.Drawing'

    I've added to references both .dlls

    from

    C:\Windows\Microsoft.NET\Framework\v4.0.30319\Syst em.Drawing.Primitives.dll
    C:\Windows\Microsoft.NET\Framework\v4.0.30319\Syst em.Drawing.dll

    and to the using declaration section of my indicator

    using System.Drawing;
    using System.Drawing.Primitives;

    Following this instruction
    https://ninjatrader.com/support/foru...541#post708541

    But the error
    The type or namespace name 'Primitives' does not exist in the namespace 'System.Drawing' (are you missing an assembly reference?) CS0234 32 22
    Shows up.
    How to fix if? Thank!
    Last edited by PaulMohn; 06-14-2022, 11:44 AM.

    #2
    Hi Paul, thanks for posting. The application does not have access to C:\Windows so you will need to copy/paste the DLL files directly into Documents\NinjaTrader 8\bin\Custom and then add the reference to that location.

    Kind regards,
    -ChrisL

    Comment


      #3
      Originally posted by PaulMohn View Post
      I've added to references both .dlls

      from

      C:\Windows\Microsoft.NET\Framework\v4.0.30319\Syst em.Drawing.Primitives.dll
      C:\Windows\Microsoft.NET\Framework\v4.0.30319\Syst em.Drawing.dll
      Hi Paul,

      Have you tried linking to the 64 versions?

      C:\Windows\Microsoft.NET\Framework64\v4.0.30319

      Hedge

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      81 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      41 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      66 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X