• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Visual Studio Project Missing Files

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

    Visual Studio Project Missing Files

    I run into issues from time to time in which the Visual Studio project is missing files that are present in the Ninja Trader folder with the rest of the code. Everything compiles, including the files missing from the project. The files are still present in the NinjaTrader editor. I end up noticing in Visual Studio when it suddenly can't find definitions for things. Is there a way to force it to regenerate the project?

    #2
    Hello ntbone,

    The visual studio project is generated when compiling (F5) from inside the NinjaScript editor and also when creating a new file. Generally after making changes or adding a file when you navigate back to visual studio it will prompt you to reload the solution. This is necessary to "Reload All" or if prompted differently always take the action which reloads the entire solution,

    As a temporary fix while working in visual studio you can click "show all files" in the browser and include the file into the solution. This will hold until the next compile and allow for intellesense etc..

    If you are seeing that files are not added by manually compiling in NinjaTrader you can either create a new file and compile then delete it or try closing visual studio to release all loaded files and then re compile from NinjaTrader. This should allow the project to be reloaded if for some reason it was not.

    Otherwise if you have a specific set of actions lead to the file not being added in the visual studio solution please collect the specific steps you had used so we can test that case. There are certain items which won't get added automatically like xaml files however .cs files should be added.

    I look forward to being of further assistance.

    JesseNinjaTrader Customer Service

    Comment


      #3
      None of this is working. I haven't recently added any of the files. Files that have been in the project for a while suddenly go vanishing. I realize it only when things suddenly have red lines under them and I can no longer go to the definition of them. NinjaTrader still builds fine and includes them in the actual code that is running, otherwise it wouldn't compile. I have tried adding a file and then removing it but that didn't fix the problem. The files that go missing seem to vary and I have no current reproduction steps for this. It just seems to be in some state where it continues to refuse to add all the .cs files to the project and skips some.

      Comment


        #4
        I just noticed it continues to add one of the indicators I am working on to the root folder of the project, instead of the indicators folder like it should.

        Comment


          #5
          Hello ntbone,

          From the extra details noting sticks out as a cause, have you observed any specific steps related to the files not being added? Is it a certain type of file or certain name that is not being added?

          You also mentioned that its adding it to the root instead of the indicators folder, are you using the correct way to add files through the NinjaScript editor? Are you using a custom structure in the file which is different from other NinjaScript files or using custom namespaces?

          Without more specific details about what you are seeing all I could suggest would be to continue troubleshooting to look for a set of steps which reproduce the problem. For the time being I could suggest using visual studio to manually include the file so you have intellesense, this will allow you to use visual studio while you further isolate the issue.



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

          Comment


            #6
            The file is a pretty straight forward indicator. I don't remember how I originally added it. With it removed, the Visual Studio project still thought it was there even though it was completely gone. I edited the project file in a text editor, removed the file from the root folder, then copied the file back into the indicators folder and for now that seems to resolve it. Its still unclear how it ever got into the root folder in the first place.

            I add files either by going through the NinjaTrader editor or simply copy and paste into the folder (Indicators, DrawingTools) and build. I never add files via Visual Studio.

            Comment


              #7
              Hello ntbone,

              IThe file is a pretty straight forward indicator. I don't remember how I originally added it. With it removed, the Visual Studio project still thought it was there even though it was completely gone. I edited the project file in a text editor, removed the file from the root folder, then copied the file back into the indicators folder and for now that seems to resolve it. Its still unclear how it ever got into the root folder in the first place.
              From this detail it sounds like the file was added in an incorrect way or it had a incorrect structure/namespace. The only correct way to add files is to create them using the NinjaScript editor which you noted. There is otherwise no supported way to create a file outside of the platform and move it in, this is very important for indicators that use custom namespaces the editor is absolute needed for that.

              It sounds like the problem is now solved, if you happen track down the specific steps you followed please be sure to reply back with those steps so I can report or document about that.

              Please let me know if i may be of further assistance.


              JesseNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Johnny Santiago, 10-11-2019, 08:21 AM
              6 responses
              99 views
              0 likes
              Last Post 4x777
              by 4x777
               
              Started by pjsmith, Today, 02:42 AM
              2 responses
              16 views
              0 likes
              Last Post pjsmith
              by pjsmith
               
              Started by fimpaljion, Today, 04:37 AM
              0 responses
              2 views
              0 likes
              Last Post fimpaljion  
              Started by moyerchopra, Yesterday, 11:43 PM
              0 responses
              4 views
              0 likes
              Last Post moyerchopra  
              Started by ttodua, Yesterday, 11:40 PM
              0 responses
              6 views
              0 likes
              Last Post ttodua
              by ttodua
               
              Working...
              X