Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NTB6 - Issue of building project in VS

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

    #16
    Hello,

    I was able to confirm that closing vs and compiling the script does not always re-add the file to the project.

    Right now our development is trying to find absolute steps to reproduce this behavior every time so that we can lock this one down.

    If anyone can list steps that can cause this behavior for sure, this would be most helpful.
    Last edited by NinjaTrader_ChelseaB; 11-05-2015, 12:48 PM.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #17
      Chelsea,

      1. Keep NS Editor open.
      2. Open the project in VS.
      3. Make some changes in VS which cause errors on compilation and save the file.
      4. Compile in NT and your file is excluded from the project.
      5. Then the process is cycled. Adding the file to VS project manually and saving the project leads to immediate reloading the project without your file in it. Fixing errors in NS Editor doesn't lead to eliminating them because of cache or whatever in "NinjaScript generated code", so you have to remove "NinjaScript generated code" to get rid of the errors. Removing "NinjaScript generated code" in NS Editor leads to immediate re-generating it with the same errors. So you need to close NT, remove "NinjaScript generated code" in any external editor then start NT again and compile the file. Then it returns to the project, though "NinjaScript generated code" is not necessarily generated again.

      The problem is that step 4 is not always necessary. NS Editor often (but not always) recompiles your file automatically when you save it in VS, so the errors appear independently from your desire to compile or not to compile the file.

      The other problem is to make NT generate "NinjaScript generated code" removed previously to make it possible to debug the code in VS. I haven't found any reliable way to do it for sure, because NT generates "NinjaScript generated code" by chance.

      One more problem is when you have your indicator or strategy code located in several files. NT often excludes only one file from the project and you have even more errors because the compiler doesn't find some parts of your code at all. Besides, in that case NT places its "NinjaScript generated code" in any of your code files by chance, or even in several files. In that case you not only need to remove "NinjaScript generated code" in an external editor, you also need to re-create NT project from scratch, so you need to remove NT project (NinjaTrader.Custom.csproj) then launch the NT installer and repair the installation. And only after that you can start NT and recompile the project without errors.
      Last edited by quicktrick; 11-06-2015, 12:59 AM.

      Comment


        #18
        Hello,

        Thank you for the steps to reproduce the behavior.

        This item where NinjaScript files are being excluded from the project is being tracked with ID # NTEIGHT-9057.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by LawrenHom, Today, 10:45 PM
        0 responses
        3 views
        0 likes
        Last Post LawrenHom  
        Started by love2code2trade, Yesterday, 01:45 PM
        4 responses
        28 views
        0 likes
        Last Post love2code2trade  
        Started by funk10101, Today, 09:43 PM
        0 responses
        7 views
        0 likes
        Last Post funk10101  
        Started by pkefal, 04-11-2024, 07:39 AM
        11 responses
        37 views
        0 likes
        Last Post jeronymite  
        Started by bill2023, Yesterday, 08:51 AM
        8 responses
        44 views
        0 likes
        Last Post bill2023  
        Working...
        X