Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

VS 2019 Build hangs

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

    VS 2019 Build hangs

    I've been building in Visual Studio 2019 for a long time. Today my builds started hanging. I click build and it shows this in the output window:

    Build started...
    1>------ Build started: Project: NinjaTrader.Custom, Configuration: Debug Any CPU ------
    1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microso ft.Common.CurrentVersion.targets(2203,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "PresentationCore", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.


    It just hangs here and never builds anything. Is there a cache I can clear out or anything? Or maybe somehow create a new project so I can start using it again?

    I even tried exiting Ninja and leaving Visual Studio up to build. But it still doesn't build.
    Last edited by dmisselhorn; 11-11-2022, 10:35 AM.

    #2
    Hello dmisselhorn,

    Thank you for your note.

    When using Visual Studio with NinjaTrader, it should only ever be used as a text editor. You should not run or build the solution inside Visual Studio, as this could likely result in errors. Instead, you may Save (Ctrl + S), and as noted in the help guide, preferably have the NinjaScript Editor opened at the same time as saving in VS as this will compile the NinjaScript Editor automatically. Here is the note from the help guide:
    You can also use Visual Studio as editor for your NinjaScript files - for that open the project as in step 2 above and then use Visual Studio for editing and once done save the file (don't run or build the solution then in Visual Studio), preferably with the NinjaScript editor opened still at the same time, so changes would be auto compiled in then.


    Please let us know if we may be of further assistance.

    Comment


      #3
      I've been using it as a debugger for ages, to do that you need to compile. Your response is inconsistent with guidance I've gotten over the years relating to Ninja and using the visual studio debugger with Ninja. Also they way I've been using it. I've compiled 1000s of times over last 6 months. I can go over to Ninja/Compile and than attach from VS. But that's not what I've normally done.
      Last edited by dmisselhorn; 11-11-2022, 01:53 PM.

      Comment


        #4
        Hello dmisselhorn,

        Thank you for your reply.

        Although you may have been successfully compiling inside of Visual Studio, that is not the supported and documented way to use the Visual Studio debugger for NinjaScript items. The only time you would typically need to compile within Visual Studio is if you are compiling a DLL for a NinjaScript AddOn. For that reason, results may vary and we are not able to provide support on errors produced within Visual Studio as a result of following unsupported steps. The help guide link I previously shared explains how to use the debugger within Visual Studio:


        This topic is also discussed in other threads, such as the following:
        I want to use the Visual Studio debugger for strategy development. Any assistance, videos documentation, examples would be appreciated if available? I saw one short document on compiling with debug, starting the debugger, attaching to the ninjatrader.exe etc. Is there anymore documentation on using Visual Studio on Ninja


        Please let us know if we may be of further assistance.

        Comment


          #5
          Is there any documentation discussing what compiler options to setup if I decide to place some of my code into a dll of my own?

          Comment


            #6
            Hello dmisselhorn,

            Thank you for your reply.

            If you would like to use a DLL of your own, please be sure to save it to the following directory:
            • Documents\NinjaTrader 8\bin\Custom
            Next, you will need to go to the NinjaScript Editor and follow these steps:
            • Right-click and select References
            • Select Add, then locate the DLL file you would like to use
            • Click Open to add the file, then OK to save the changes
            • Press F5 to compile the editor
            Even when using a DLL file of your own, once the reference has been added you should continue to use the NinjaScript Editor to compile your NinjaScript items. When using a DLL file of your own, it may be created in Visual Studio or a comparable IDE. For more information on how to accomplish this with Visual Studio, see the "AddOn Development Environment" section of the page linked below. Although the page focuses on AddOn development, the sample project it provides can be used to develop other NinjaScript types, as well:



            We have listed out some considerations for compiled assemblies in the help guide section here:


            Please let us know if we may be of further assistance.

            Comment

            Latest Posts

            Collapse

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