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 crashes on Attach to Process in Visual Studio 2022

  • Filter
  • Time
  • Show
Clear All
new posts crashes on Attach to Process in Visual Studio 2022

    NT crashes on Attach to Process in Visual Studio 2022. Reproduced on several PCs

    Hello frslvr,

    Thanks for your post.

    Do you see an error message appear when the behavior occurs?

    What are the exact steps you are using to reproduce the behavior so we may test those steps on our end to try and reproduce the behavior.

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

    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
    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.

    We look forward to assisting further.
    Brandon H.NinjaTrader Customer Service


      Originally posted by frslvr View Post
      NT crashes on Attach to Process in Visual Studio 2022. Reproduced on several PCs
      I reported this issue last month when beta first came out..
      To save everyone some time, I'll just quote from NT's response..

      NT's Response:

      Upon further testing and investigation, it came to my attention that the development team is already aware of this behavior. This is a known limitation for scripts exported with the prior version of Agile and there is no workaround. If you have clients who use your scripts who would also like to use the Visual Studio debugger, they would need a version of your script exported from the newer versions of NinjaTrader and Agile. If you have questions about Agile and licensing for the newer version,, please reach out to SecureTeam. The download links and links to the SecureTeam website may be found on the following page:

      We apologize for any inconvenience. Thank you for your time while I looked into this for you. Please don't hesitate to reach out with any additional items we may assist you with.

      My Follow-up Question:

      Exported protected assembly w/NT 8.1.3 and new agile will not cause same issue w/previous thru 8.1.7???
      Just want to confirm after updating I will not face same crashing issue only now with older versions instead of new?

      NT's Response:

      Yes, this issue is only related to older versions and the implementation of agile-protected scripts which has been modified in the latest update. If you were to update to and agile, exports would potentially be able to import to older versions, and as long as they are imported successfully the user would be able to debug in Visual Studio successfully. I say "potentially" because, depending on a script's logic, it may not always be backwards compatible with previous versions of NinjaTrader. This is noted at the bottom of the following page:

      For example, since version the compiler was updated to Roslyn and NinjaTrader now supports C# features up to version 8.0. Previous versions of NinjaTrader were only current up to C# 5.0 so if you had newer C# features your script may not be able to import to previous versions of NinjaTrader. This is unrelated to the agile protections and Visual Studio debugging, though I wanted to point that out.

      Please Be Safe in this Crazy World!
      Last edited by -=Edge=-; 04-11-2024, 08:14 AM.
      NinjaTrader Ecosystem Vendor - High Tech Trading Analysis


        In order to debug with 8.1.3.x you'll have to not have any protected assemblies installed - or at least not any protected assemblies that were exported from previous Agile.NET versions. If you use source only, you should be able to do it. This is a new limitation as of 8.1.3.x.
        Last edited by QuantKey_Bruce; 04-14-2024, 05:03 AM.
        Bruce DeVault
        QuantKey Trading Vendor Services
        NinjaTrader Ecosystem Vendor - QuantKey


          Thanks for posting. I ran into this recently while testing the latest NT8.1.3.0 and attempting to debug a strategy script. I still had a popular free 3rd-party custom renko bar type assembly installed from a previous development project that would crash the platform when trying to debug on VS 2022. Once I removed assembly, I was able to debug as needed.
          NinjaTrader Ecosystem Vendor - Whitmark Development


            Hi there.

            I too just installed NinjaTrader and experienced the immediate crashing issue when attaching to it via Visual Studio 2022's debugger until I removed all third-party assemblies. I have many third-party assemblies (indicators and strategies) and since I don't know which ones were protected via I simply removed them all. I tried reinstalling several of the third-party indicators one by one, tested many times/ways, and again NT crashed repeatedly, until I had no third-party assemblies installed. Since I use the same NinjaTrader installation for trading and development this new with crashing issue is a complete deal breaker. Looks like I'll need to re-install the previous release even though that version has many crashing issues of its own, but at least I can still use third-party indicators and trade and develop using the same NinjaTrader installation and computer.

            Is NinjaTrader, the company, working on a very high priority fix for this new deal-breaker crashing issue? If not, why, and what is the preferred workaround aside from removing all third-party assemblies? If there now must be two installations of NinjaTrader, one for trading (with third-party assemblies) and one for development (without third-party assemblies), where can I find documentation on how to set such up on a single computer in a way that is supported by NinjaTrader, the company? Thanks for your prompt attention and support.


              Hello caryc123,

              Thanks for your notes.

              This behavior could occur if you are using third-party protected assemblies that were exported with a version of NinjaTrader prior to using Agile

              NinjaTrader updated the compiler to Roslyn for the ability to use C# 8 features.

              This is a limitation and there are no workarounds available. Any scripts exported with Agile prior to NinjaTrader will cause a crash when the Visual Studio debugger is attached.

              To use the Visual Studio debugger, the protected assemblies would need to be exported using NinjaTrader,, or using Agile You could reach out to the third-party developers to ask for an updated copy of the scripts exported using the current NinjaTrader version with Agile to resolve this behavior.

              There are no supported means for installing two separate NinjaTrader platforms on your machine so that one can be used for trading and the other for development.
              Brandon H.NinjaTrader Customer Service


                Thanks for confirming that NinjaTrader (which uses does not support Visual Studio 2022 attached debugging when installed third-party assemblies were compiled/exported using NinjaTrader (which uses Are you sure your company cannot implement a backwards compatibility feature to support assemblies compiled with different versions of Have you reached out to SecureTeam (makers of for support/advice?


                  Hello caryc123,

                  Thanks for your notes.

                  To clarify, NinjaTrader,, and use the Agile version because the compiler was updated to Roslyn in

                  If the third-party assemblies were exported using NinjaTrader or prior using Agile and installed on your platform, the Visual Studio behavior will occur while using when attaching the NinjaTrader process to the Visual Studio debugger.

                  To be able to use the Visual Studio debugger, you would need to get a copy of the third-party assemblies from the vendors exported using the current version of NinjaTrader and Agile

                  The Development team has informed us that this is a limitation of the upgrade to the Roslyn compiler and there are no workarounds that can be implemented.
                  Brandon H.NinjaTrader Customer Service


                    Thanks for your clarifications. I'm hopeful your company has or plans to reach out to all development companies registered/partnered with your company to inform them of the issue and impress upon them the importance of promptly upgrading (re-compiling/exporting) their indicators, strategies, etc. and notifying customers who purchased said products. Thank you.


                    Latest Posts


                    Topics Statistics Last Post
                    Started by ig0iz9xx, Today, 01:42 AM
                    0 responses
                    Last Post ig0iz9xx  
                    Started by zhiga, 01-15-2024, 03:17 AM
                    1 response
                    Last Post Gralasidys  
                    Started by weightlossJavaburn, Today, 01:23 AM
                    0 responses
                    Last Post weightlossJavaburn  
                    Started by Christopher Leggit, Today, 12:04 AM
                    0 responses
                    Last Post Christopher Leggit  
                    Started by Carmelisak, Yesterday, 11:22 PM
                    0 responses
                    Last Post Carmelisak