Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.

    JesseNinjaTrader Customer Service

    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 suroot, 04-10-2017, 02:18 AM
            4 responses
            3,020 views
            0 likes
            Last Post truepenny  
            Started by Stanfillirenfro, Today, 07:23 AM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by cmtjoancolmenero, Yesterday, 03:58 PM
            2 responses
            22 views
            0 likes
            Last Post cmtjoancolmenero  
            Started by olisav57, Yesterday, 07:39 PM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by cocoescala, 10-12-2018, 11:02 PM
            7 responses
            944 views
            0 likes
            Last Post Jquiroz1975  
            Working...
            X