• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Does NT7 support debugging in VS 2017?

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

    Does NT7 support debugging in VS 2017?

    Hello,

    I ran into some issues when trying to debug project in VS 2017 after I put too many custom indicators/DLLs.

    I re-installed NT7 from scratch and trying to debug it in VS 2017.

    Can I safely convert project into 2017 format when opening NT7 project with Visual Studio 2017?

    What kind of changes do I need to make when running NT7 X86 vs NT X64 versions (Do I need to reference specific DLLs per version/modify VS project type etc...)?

    I have no issues debugging in NT8, but need to re-learn how to properly do it with NT7 and VS 2017.

    I just tried debugging after opening/converting project in VS 2017, it stopped on breakpoint for the very first time when debugging indicator, but then it stopped working and doesn't stop on breakpoints anymore even after restarting Visual Studio.

    Thanks
    Last edited by music_p13; 02-15-2018, 10:05 AM.

    #2
    Hello,

    Thank you for the post.

    I would not suggest trying to convert the project to 17 format, as this concept was never fully supported/documented in 7 I am unsure of the extent that the custom project is used by NinjaTrader internally. You could test doing the conversion and if it does not work as expected, you could just remove the project and reinstall to correct it. If you have not yet reconfigured the custom project after you reinstalled please see the following video: http://www.screencast.com/t/eH7y5cedlzh

    Are you having difficulty when loading the standard .csproj in 2017 currently? You had noted you had problems after adding too many custom items, was it working prior to doing that?

    Regarding any changes between 32 and 64 bit, you generally don't need to worry about this. The platform compiles the .cs files that are imported for the version being used. Any dlls that were exported for NinjaTrader are also compiled in intelligently.

    In Visual Studio, you don't need to change anything regarding the build settings as you will not be doing any building from Visual Studio. You instead need to use NinjaTrader to complete the compiles and check for errors. The references in visual studio you will need to correct per the video I linked earlier, but the 64/32 bit does not matter in this case as noted visual studio won't be used for building.

    In the platform, the NinjaTrader dlls will automatically be changed based on the version used so really there is not much to have to worry about in this aspect.


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      Hello,

      Thank you for the post.

      I would not suggest trying to convert the project to 17 format, as this concept was never fully supported/documented in 7 I am unsure of the extent that the custom project is used by NinjaTrader internally. You could test doing the conversion and if it does not work as expected, you could just remove the project and reinstall to correct it. If you have not yet reconfigured the custom project after you reinstalled please see the following video: http://www.screencast.com/t/eH7y5cedlzh

      Are you having difficulty when loading the standard .csproj in 2017 currently? You had noted you had problems after adding too many custom items, was it working prior to doing that?

      Regarding any changes between 32 and 64 bit, you generally don't need to worry about this. The platform compiles the .cs files that are imported for the version being used. Any dlls that were exported for NinjaTrader are also compiled in intelligently.

      In Visual Studio, you don't need to change anything regarding the build settings as you will not be doing any building from Visual Studio. You instead need to use NinjaTrader to complete the compiles and check for errors. The references in visual studio you will need to correct per the video I linked earlier, but the 64/32 bit does not matter in this case as noted visual studio won't be used for building.

      In the platform, the NinjaTrader dlls will automatically be changed based on the version used so really there is not much to have to worry about in this aspect.


      I look forward to being of further assistance.
      Hello Jesse,

      I watched the video, however, in that video you were able to open project successfully in VS 2013 without any warning messages.

      I my case, when I try to open same project in VS 2017 - I am getting a message where VS 2017 tries to perform one way upgrade for this project, or it won't open it at all (see screenshot).

      Are there any tricks to prevent VS 2017 to upgrade project but to still open it?

      Thanks
      Attached Files

      Comment


        #4
        Hello,

        Thank you for the reply.

        I wouldn't know of any way around that, the upgrade is a visual studio specific feature. 2017 uses a new project format so you will likely see this message with a majority of projects you open that were created with prior versions of visual studio.

        This message happens for 2015 as well but there were no side effects from that conversion from what I could tell. As noted you can try to convert the project but if it does not work as expected you would need to revert the project. If you cannot open a prior project in 2017 and the conversion does not work, you would likely need to use a prior version of visual studio for 7 such as 2015 or less. If that is the case, you can access prior visual studio downloads from the Microsoft site after registering.

        Please let me know if I may be of additional assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          I have tried following suggestion:
          https://stackoverflow.com/questions/...t-4-to-net-4-5

          didn't work.

          I would really like to avoid uninstalling Visual Studio 2017 before installing 2013 or 2015, but Microsoft doesn't recommend doing so.

          Is there any other way to enable support in Visual Studio 2017?

          Ex - create a different project file for use just with Visual Studio 2017, while using original project file for NinjaTrader compilation (and possible updating that newly created project manually to merge important info from NT 7 compilation)?

          Thanks

          Comment


            #6
            Hello,

            Thank you for the reply.

            I would be unsure of any way around that as VS 2017 was released after NT7 with a different project format than what was used with NT7. Because the visual stuido version being used has newer features it would need to upgrade a project saved from a prior version to be able to use it.

            If the conversion breaks the project there would not be any other steps I could provide to correct the project for specifically 2017. I could only suggest using a version of Visual studio that is known to work with nt7 such as 2012, 2013, 2015. Going forward with nt8, we can put in bug reports if something is not working with the built-in VS support as it is now a part of the platform directly.

            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Jesse View Post
              Hello,

              Thank you for the reply.

              I would be unsure of any way around that as VS 2017 was released after NT7 with a different project format than what was used with NT7. Because the visual stuido version being used has newer features it would need to upgrade a project saved from a prior version to be able to use it.

              If the conversion breaks the project there would not be any other steps I could provide to correct the project for specifically 2017. I could only suggest using a version of Visual studio that is known to work with nt7 such as 2012, 2013, 2015. Going forward with nt8, we can put in bug reports if something is not working with the built-in VS support as it is now a part of the platform directly.

              I look forward to being of further assistance.
              Sorry to drag on the topic... I have VS 2017 installed, and downgrading to VS 2015 is way lots of work because as Microsoft recommends - I would have to uninstall 2017 completely, then install 2015, and then install back 2017 (because it is too risky to install 2015 on top of 2017).

              As a temp workaround at least to use VS features to code/verify syntax (would be nice of course to be able to debug it as well) - what is the easiest way to setup VS 2017 project just for coding, but compiling will be done in NT7 only.

              What I have just done (and it is working) - was to copy current project file (.proj), rename it, and open it with VS 2017 and code there with VS 2017... I assume that during "Conversion" process, VS 2017 only changes the .proj file and nothing else (so it won't break any other things).

              Can you please confirm if it is or is there a better way to continue working with VS 2017?

              Or from your experience how safe is it to install VS 2015 on top of 2017?

              Thanks
              Last edited by music_p13; 02-16-2018, 09:45 AM.

              Comment


                #8
                Hello,

                Thank you for the reply.

                As you will always be compiling in NinjaTrader, no matter the version of VS or NT, there's really no other setup needed. The video I had provided is only to get intellesense working in visual studio for NT7. As it was not directly supported in the platform and there are references missing in the VS project that step is required. You would never actually build from visual studio or compile from there, really the only other item you can from VS is attach the debugger to reach beak points. All compiling and error checking is handled by the platform, so really VS is just a slightly better syntax highlighter in this case. If you have IntelliSense in VS and have corrected the references that is the total setup for nt7.

                I can't really confirm if there are any better ways to work with the project, as noted if the upgrade process fails to produce a project file that works I would suggest using a version that is known to work such as 12, 13, 15. There is really no problem with downgrading to other versions of visual studio, it just may take some time to uninstall/reinstall if you have a slow pc. If Microsoft suggests uninstalling 17 before installing 15, that is likely what I would suggest or to follow what they suggest for their products.

                Please let me know if I may be of additional assistance.
                JesseNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by thgamey, Yesterday, 08:38 PM
                1 response
                10 views
                0 likes
                Last Post NinjaTrader_Marco  
                Started by stredtity, Today, 01:21 AM
                0 responses
                4 views
                0 likes
                Last Post stredtity  
                Started by superg3, Yesterday, 10:12 PM
                0 responses
                8 views
                0 likes
                Last Post superg3
                by superg3
                 
                Started by johnnybegoode, Yesterday, 07:02 PM
                0 responses
                10 views
                0 likes
                Last Post johnnybegoode  
                Started by YevhenShynkarenko, Yesterday, 05:02 PM
                1 response
                17 views
                0 likes
                Last Post YevhenShynkarenko  
                Working...
                X