Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Working with Visual Studio

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

    Working with Visual Studio

    Hi,

    I am trying to understand how NT8 manages the Visual Studio project / solution that is opened through the NT8 Editor. In VS (version 2017) I am constantly getting errors about inability to resolve references due to ambiguity (Error code CS0229) between two versions of the same file. In VS, my custom indicators and strategies appear twice. One of the files has a double @@ prepended to the file name. The other one does not. I also see some files with only a single @ prepended but they all look like NT8 samples.

    I am reluctant to attempt to fix this by deleting one of the files in VS, since it seems NT8 is managing this. Can you please explain what is going on and how I can resolve the ambiguities?

    Also, do you discourage compiling directly in VS, or should all compilation be performed in the editor?

    Thanks,


    #2
    Hello ChazJ,

    In Visual Studio are you seeing warnings instead of errors? If so, you can just turn the warnings off to avoid those type of messages. In the error window you can click the yellow exclaimation point next to warnings and they will be hidden. You can see some of the same warnings in the NinjaScript editor when right click -> Show warnings is turned on. This is normal and can be ignored.

    The @@ files should be excluded from compilation but still visible in the solution, if you used the NinjaScript editor to exclude files it will add two @ symbols to the name and won't include in compiles.
    A single @ is a system indicator or file, this makes it so that the NinjaScript editor locks the file so it cannot be edited.

    I wouldn't suggest using visual studio to delete anything because it does not do the compiling and cannot tell you if that will be successful. In nearly all cases you should manage the files from the NinjaScript editor. While the platform can pick up manual changes it is not recommended if you can just use the editor directly, this is because the platform checks if the script has dependencies where visual studio does not.

    Also, do you discourage compiling directly in VS, or should all compilation be performed in the editor?
    Correct, you can consider VS just a text editor in contrast to NinjaTrader. It simply observes the solution which NinjaTrader generates and uses for compiling. You can also use the debugging features of visual studio but it will not be used for any type of solution management or compiling.



    I look forward to being of further assistance.

    Comment


      #3
      Jesse,

      Thanks for the clarification.

      The CS0229's are actually errors. But NT8 has no trouble compiling. In fact they tend to disappear after a compilation.


      Thanks,

      Comment


        #4
        Hi ChazJ,

        If you still have issues with this, let me know and I will post how to get rid of all NT warnings.

        Wil

        Comment


          #5
          Hi Wil,

          No, but possibly some related issues that I just posted into the forum.

          Thanks,

          Chaz

          Comment


            #6
            Hi ChazJ,

            That's great news!

            There were some other posts that referenced this issue so I posted my solution at Pro Tip: Get rid of VS Warnings! if you are interested.

            Wil

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Yesterday, 05:17 AM
            0 responses
            55 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            132 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            73 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            45 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            49 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X