Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ninjascript file change notification issue

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

    Ninjascript file change notification issue

    There is some weird issue with the file change notifications when creating new indicators from Visual Studio. The file in visual studio is not updated to reflect the NT generated indicator code. If I go to the Ninjascript Editor and open the new indicator, make a change and compile, then it is updated in VS.

    #2
    Hello,

    Just to be certain -- you are creating a new .cs file in VS, then you are presented with a prompt to update your VS project, correct? The NinjaScript generated code is added by the NinjaScript Editor itself, so this would be expected based on the order in which you are doing things, if I'm reading you correctly.

    The recommended workflow is to create your new NinjaScript objects in the NinjaScript Editor, compile, then open your Custom project in VS. If your Custom project was already open, when you switch back to it, you should be prompted to reload the project, after which you should see your new class with the auto-generated code in your project.
    Dave I.NinjaTrader Product Management

    Comment


      #3
      Thanks Dave. I guess I was going rogue and not following recommended practices

      I have VS set to auto reload the file if it is saved and there are external changes. Everything works except for picking up the NT generated code. This seems weird to me as VS should be picking up file changes.

      Do I need to add NinjaScript properties from the NinjaScript editor as well? I just tested and if I add a new property in VS, it does not see the updated generated code. If I go and open the indicator in the NinjaScript editor, I see the generated code was indeed updated. Seems the file is being updated in a way that does not trigger the file change notification in VS.

      Comment


        #4
        There actually was an issue with the Custom project not updating as expected in the current release, and we have applied a fix to that issue which will be included in the next Beta release. It's a good bet that this issue is coming into play in your case.

        No matter what you've added in VS (once the class is already present in the Custom project and has been compiled in the NS Editor), including properties, you should only have to save the project in VS, and the NS Editor should automatically update and compile, at which point VS should prompt you to reload the project with all of the new changes to the auto-generated code, if the auto-generated code has indeed updated.

        Please keep this issue in mind to test in next Beta release, as I expect that you should see expected results at that time, and please let me know if you run into the same issue.
        Dave I.NinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by algospoke, Yesterday, 06:40 PM
        2 responses
        23 views
        0 likes
        Last Post algospoke  
        Started by ghoul, Today, 06:02 PM
        3 responses
        14 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by jeronymite, 04-12-2024, 04:26 PM
        3 responses
        45 views
        0 likes
        Last Post jeronymite  
        Started by Barry Milan, Yesterday, 10:35 PM
        7 responses
        22 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by AttiM, 02-14-2024, 05:20 PM
        10 responses
        181 views
        0 likes
        Last Post jeronymite  
        Working...
        X