Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT Version (8.1.2.0) import error with a protected compiled assembly

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

    #16
    I stumbled upon this same issue using the NT-specific Agile.Net 6.6.0.35 on Friday and notified Scripting Support. I have since rolled back to 8.1.1.7. As Bruce confirms, all protected compiled assemblies produced on 8.1.1.7 still import correctly on 8.1.2.0.
    whitmark
    NinjaTrader Ecosystem Vendor - Whitmark Development

    Comment


      #17
      Hello sidlercom80,

      Thanks for your notes.

      I am not aware of any changes in NinjaTrader 8.1.2.0 in regard to how enums work in NinjaScripts compared to NinjaTrader 8.1.1.7.

      Please confirm the enums are in a custom unique namespace and are outside of the script class.

      From the help guide:
      "Using Custom enum Properties
      When creating custom enum properties, it is advised to create the enum outside of your NinjaScript class, and designating it in its own fully qualified namespace. For an example, please see here. When using the enum in code, please use the fully qualified namespace as opposed to using a using directive to shorthand the expression."

      https://ninjatrader.com/support/help...assemblies.htm

      We demonstrate this in the SampleUniverstalMovingAverage reference sample: https://ninjatrader.com/support/help...ned_parame.htm

      Creating a user-defined parameter type (enum) reference sample - https://ninjatrader.com/support/help...ned_parame.htm

      If there are multiple files accessing the same enum, I also suggest putting the entire namespace for the enums in a separate file (that's exported separately and then referenced).

      To confirm, if you do not select 'Protect compiled assembly' when exporting the script, does the import work as expected?

      I look forward to assisting further.​
      <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

      Comment


        #18
        NinjaTrader_BrandonH Please read all posts carefully before you even reply. There was never any mention of an enum being used.
        sidlercom80
        NinjaTrader Ecosystem Vendor - Sidi Trading

        Comment


          #19
          Hi Brandon,
          .
          I went down the enum rabbit hole with Chelsea B on Friday thinking that might be the issue until I proved the issue remained while testing the SampleUniverstalMovingAverage reference sample. The unprotected assembly exported from 8.1.2.0 imported fine in 8.1.2.0 while the Agile.Net protected assembly did not.
          Last edited by whitmark; 10-30-2023, 03:33 AM.
          whitmark
          NinjaTrader Ecosystem Vendor - Whitmark Development

          Comment


            #20
            Hello sidlercom80,

            Thanks for your notes.

            The behavior has been reported to the Development team and they will be investigating this matter further.

            As soon as I hear back from the Development team on this reported behavior I will update this forum thread with their findings.

            Thanks for your patience.
            <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

            Comment


              #21
              The other thing that I am seeing, and this may be a bit of a different issue, is that sometimes on 8.1.2.0 the compiler is getting "stuck" and just sits there looping forever as if it's still compiling. When this happens, heartbeat pacing violations start stacking up (more than 10 in 150 seconds is the message) and eventually I have to exit NT and restart it. This does not occur on 8.1.1.7 with identical code.

              Edit: To clarify, when I then restart NT it compiles. It just gets stuck sometimes on 8.1.2.0 while on 8.1.1.7 it does not. I think possibly this is happening when the file is changed externally (e.g. Visual Studio saves the changes) while it is compiling. That was not a problem before. It's also possible it would finish eventually and I am giving up too soon, but I am giving it way longer than it required in 8.1.1.7 before I give up.

              Edit 2: P.S. the cursor in Script Editor is invisible in dark mode.

              Edit 3: And while we're on the subject of the editor, it outputs all sorts of junk to the trace now:

              2023-10-30 06:32:35:448 Invalid type for resource key 'NinjaScriptEditorIdentifierForeground' : Expected 'System.Windows.Media.Color'; Found 'System.Windows.Media.SolidColorBrush'
              2023-10-30 06:32:35:448 Required resource key 'brushOrderWorking' is missing.
              2023-10-30 06:32:35:448 Required resource key 'brushOrderAccepted' is missing.
              2023-10-30 06:32:35:448 Invalid type for resource key 'NinjaScriptEditorCompilerErrorForeground' : Expected 'System.Windows.Media.Color'; Found 'System.Windows.Media.SolidColorBrush'
              2023-10-30 06:32:35:448 Invalid type for resource key 'NinjaScriptEditorIndentationLineForeground' : Expected 'System.Windows.Media.Color'; Found 'System.Windows.Media.SolidColorBrush'
              2023-10-30 06:32:35:448 Invalid type for resource key 'NinjaScriptEditorKeywordForeground' : Expected 'System.Windows.Media.Color'; Found 'System.Windows.Media.SolidColorBrush'
              2023-10-30 06:32:35:448 Invalid type for resource key 'NinjaScriptEditorBackground' : Expected 'System.Windows.Media.Color'; Found 'System.Windows.Media.SolidColorBrush'
              2023-10-30 06:32:35:448 Invalid type for resource key 'NinjaScriptEditorStringForeground' : Expected 'System.Windows.Media.Color'; Found 'System.Windows.Media.SolidColorBrush'
              2023-10-30 06:32:35:448 Invalid type for resource key 'NinjaScriptEditorCollapsibleRegionBackground' : Expected 'System.Windows.Media.Color'; Found 'System.Windows.Media.SolidColorBrush'
              2023-10-30 06:32:35:448 Required resource key 'brushOrderPartFilled' is missing.
              2023-10-30 06:32:35:448 Required resource key 'brushOrderInitialized' is missing.
              2023-10-30 06:32:35:448 Invalid type for resource key 'NinjaScriptEditorCommentForeground' : Expected 'System.Windows.Media.Color'; Found 'System.Windows.Media.SolidColorBrush'
              2023-10-30 06:32:35:448 Invalid type for resource key 'NinjaScriptEditorLineNumbersBackground' : Expected 'System.Windows.Media.Color'; Found 'System.Windows.Media.SolidColorBrush'
              2023-10-30 06:32:35:448 Required resource key 'NinjaScriptEditorFontSelectionBrush' is missing.
              2023-10-30 06:32:35:448 Invalid type for resource key 'NinjaScriptEditorLineNumbersForeground' : Expected 'System.Windows.Media.Color'; Found 'System.Windows.Media.SolidColorBrush'
              2023-10-30 06:32:35:448 Invalid type for resource key 'NinjaScriptEditorSyntaxErrorForeground' : Expected 'System.Windows.Media.Color'; Found 'System.Windows.Media.SolidColorBrush'
              2023-10-30 06:32:35:448 Invalid type for resource key 'NinjaScriptEditorNumberForeground' : Expected 'System.Windows.Media.Color'; Found 'System.Windows.Media.SolidColorBrush'
              2023-10-30 06:32:35:448 Invalid type for resource key 'NinjaScriptOutputSearchHighlight' : Expected 'System.Windows.Media.Color'; Found 'System.Windows.Media.SolidColorBrush'
              2023-10-30 06:32:35:448 Invalid type for resource key 'NinjaScriptEditorPlainTextForeground' : Expected 'System.Windows.Media.Color'; Found 'System.Windows.Media.SolidColorBrush'
              2023-10-30 06:32:35:448 Required resource key 'brushBidPriceAlternateForeground' is missing.
              2023-10-30 06:32:35:448 Required resource key 'immutableBrushBidPriceAlternateForeground' is missing.
              2023-10-30 06:32:35:448 Required resource key 'immutableBrushAskPriceAlternateForeground' is missing.
              2023-10-30 06:32:35:448 Required resource key 'brushAskPriceAlternateForeground' is missing.
              Last edited by QuantKey_Bruce; 10-30-2023, 05:27 PM.
              Bruce DeVault
              QuantKey Trading Vendor Services
              NinjaTrader Ecosystem Vendor - QuantKey

              Comment


                #22
                QuantKey_Bruce said:
                Edit 3: And while we're on the subject of the editor, it outputs all sorts of junk to the trace now: ... ...
                I have had similar problems in the past. They were caused by my having created a customised Skin, albeit based on a standard Skin. The reason for the errors was that the new standard Skin had been updated and the new code was aligned with the new Skin, and that meant conflicts if the "old" Skin was loaded. The solution was to take a copy of the new Skin and apply my customisations to it and use that updated Skin going forward.

                I did the same with 8.1.2.0, and I noticed changes in the Blueprint file that look very much like what you're seeing there.

                It would be good if there were a merge procedure that could be applied to updated customised Skins ... but it's not high on my development priority list!

                Hope that helps.

                Thanks.
                Multi-Dimensional Managed Trading
                jeronymite
                NinjaTrader Ecosystem Vendor - Mizpah Software

                Comment


                  #23
                  jeronymite That could well be. Thanks for the feedback on this one. I have since rolled back because of the protected assembly issue on all but one test machine until NT or SecureTeam advises how to proceed on that one. I'll sort this out there.
                  Bruce DeVault
                  QuantKey Trading Vendor Services
                  NinjaTrader Ecosystem Vendor - QuantKey

                  Comment


                    #24
                    NinjaTrader Support, is this being worked on? It's critical that this be resolved in the next build 8.1.2.1 or equivalent, or no commercial development can proceed in 8.1.2.0 and needs to remain on 8.1.1.7 or 8.0.28.0. This one is a show-stopper for any vendor work.
                    Bruce DeVault
                    QuantKey Trading Vendor Services
                    NinjaTrader Ecosystem Vendor - QuantKey

                    Comment


                      #25
                      Hello sidlercom80, ,

                      Thanks for your patience.

                      Our Development team is requesting some more information so that they may investigate this matter further.

                      Do you have custom AddOns imported on your platform?

                      Please create a clean environment by following the steps below and test to see if the behavior persists.

                      Creating a clean environment can be done by following the steps below:
                      1. Close NinjaTrader 8, and rename the "NinjaTrader 8" folder in My Documents to something like: "NinjaTrader 8 OLD"
                      2. Uninstall NinjaTrader from the Windows Control Panel and reinstall using the installer from account.ninjatrader.com
                      3. Add the required indicators and test the template.
                      If you ever need to switch back to your original platform, you may do so by closing NinjaTrader and swapping the platform folder names.

                      For example, Close NinjaTrader and rename the new "NinjaTrader 8" folder to "NinjaTrader 8 NEW" and the "NinjaTrader 8 OLD" folder to "NinjaTrader 8." Then restart the platform. Simply put: NinjaTrader 8 will always load the "NinjaTrader 8" folder in My Documents.​

                      After testing in a clean environment, could you please write in to support[at]ninjatrader[dot]com to send us a copy of your Config.xml file and your Log and Trace files so they may look into this further. In the subject of your email include "Attn: BrandonH" and in the body of your email include a link to this forum thread.

                      Follow the steps below to manually attach your log and trace files to your response so I may investigate this matter further.
                      • Open your NinjaTrader folder under, "Documents" (sometimes called, "My Documents")
                      • Right click on the 'log' and 'trace' folders and select Send To> Compressed (zipped) Folder.
                      • Send the 2 compressed folders as attachments to this email.
                      • Once complete, you can delete these compressed folders.
                      We look forward to assisting further.​
                      <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

                      Comment


                        #26
                        Hello QuantKey_Bruce,

                        Thanks for your notes.

                        Yes, the Development team is currently investigating this reported behavior.

                        Once I hear back from them after they have finished investigating this matter I will update this forum thread with their findings.

                        That said, does this only occur on the first compile after upgrading to 8.1.2.0?

                        Do you have custom AddOns on your platform?

                        Please create a clean environment by following the steps below and test to see if the behavior persists.

                        Creating a clean environment can be done by following the steps below:
                        1. Close NinjaTrader 8, and rename the "NinjaTrader 8" folder in My Documents to something like: "NinjaTrader 8 OLD"
                        2. Uninstall NinjaTrader from the Windows Control Panel and reinstall using the installer from account.ninjatrader.com
                        3. Add the required indicators and test the template.
                        If you ever need to switch back to your original platform, you may do so by closing NinjaTrader and swapping the platform folder names.

                        For example, Close NinjaTrader and rename the new "NinjaTrader 8" folder to "NinjaTrader 8 NEW" and the "NinjaTrader 8 OLD" folder to "NinjaTrader 8." Then restart the platform. Simply put: NinjaTrader 8 will always load the "NinjaTrader 8" folder in My Documents.​

                        After testing in a clean environment, could you please write in to support[at]ninjatrader[dot]com to send us a copy of your Config.xml file and your Log and Trace files so they may look into this further. In the subject of your email include "Attn: BrandonH" and in the body of your email include a link to this forum thread.

                        Follow the steps below to manually attach your log and trace files to your response so I may investigate this matter further.
                        • Open your NinjaTrader folder under, "Documents" (sometimes called, "My Documents")
                        • Right click on the 'log' and 'trace' folders and select Send To> Compressed (zipped) Folder.
                        • Send the 2 compressed folders as attachments to this email.
                        • Once complete, you can delete these compressed folders.
                        ​We look forward to assisting further.
                        Last edited by NinjaTrader_BrandonH; 11-05-2023, 04:45 PM.
                        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

                        Comment


                          #27
                          Originally posted by NinjaTrader_BrandonH View Post
                          Hello sidlercom80, ,

                          Thanks for your patience.

                          Our Development team is requesting some more information so that they may investigate this matter further.

                          Do you have custom AddOns imported on your platform?

                          Please create a clean environment by following the steps below and test to see if the behavior persists.

                          Creating a clean environment can be done by following the steps below:
                          1. Close NinjaTrader 8, and rename the "NinjaTrader 8" folder in My Documents to something like: "NinjaTrader 8 OLD"
                          2. Uninstall NinjaTrader from the Windows Control Panel and reinstall using the installer from account.ninjatrader.com
                          3. Add the required indicators and test the template.
                          If you ever need to switch back to your original platform, you may do so by closing NinjaTrader and swapping the platform folder names.

                          For example, Close NinjaTrader and rename the new "NinjaTrader 8" folder to "NinjaTrader 8 NEW" and the "NinjaTrader 8 OLD" folder to "NinjaTrader 8." Then restart the platform. Simply put: NinjaTrader 8 will always load the "NinjaTrader 8" folder in My Documents.​

                          After testing in a clean environment, could you please write in to support[at]ninjatrader[dot]com to send us a copy of your Config.xml file and your Log and Trace files so they may look into this further. In the subject of your email include "Attn: BrandonH" and in the body of your email include a link to this forum thread.

                          Follow the steps below to manually attach your log and trace files to your response so I may investigate this matter further.
                          • Open your NinjaTrader folder under, "Documents" (sometimes called, "My Documents")
                          • Right click on the 'log' and 'trace' folders and select Send To> Compressed (zipped) Folder.
                          • Send the 2 compressed folders as attachments to this email.
                          • Once complete, you can delete these compressed folders.
                          We look forward to assisting further.​
                          I have neither the time nor the desire to be the tester for you. Test this yourself before releasing such an important update!!! It's unbelievable what NT keeps doing.
                          sidlercom80
                          NinjaTrader Ecosystem Vendor - Sidi Trading

                          Comment


                            #28
                            Hello sidlercom80,

                            Thanks for your notes.

                            Our development has received info from the Agile team that the version necessary to work with the C# roslyn update is 6.9.2.0.

                            Further, once they are done testing and OK it, the Agile team will make it available for users to download at their website​
                            <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

                            Comment


                              #29
                              I have heard from SecureTeam as well and there is definitely a new build required. I'm going to be testing it here as well and can advise after I've put it through its paces. So, everyone is on the same page, I think, that of course, there is an issue here and we don't need to do all that installing and uninstalling etc. because it's clear there is an acknowledged problem and SecureTeam has already prepared a proposed remedy - now it's just a matter of verifying that it does what it is supposed to do then it can be released more broadly.
                              Bruce DeVault
                              QuantKey Trading Vendor Services
                              NinjaTrader Ecosystem Vendor - QuantKey

                              Comment


                                #30
                                Hello QuantKey_Bruce,

                                Thanks for your notes.

                                In regard to "the compiler is getting "stuck" and just sits there looping forever as if it's still compiling" the Development team has requested more information so they may look into this behavior.

                                Do you have multiple NinjaScript Editor windows open when this behavior occurs?

                                Does this behavior only occur on the first compile after upgrading to 8.1.2.0?

                                Could you please send write in to support[at]ninjatrader[dot]com to send us your workspace file so I can share it with the Development team. In the subject of the email include "Attn: BrandonH" and in the body of the email include a link to this forum thread.

                                Workspace files could be found in the Documents\NinjaTrader 8\workspaces folder.
                                <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                637 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                366 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                107 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                569 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                571 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X