none
Visual Studio what to do about generating project files

    Question

  • First, I really wasn't sure how to phrase this question for the title. Basically we are running qmake with QtCreator. We recently moved to an embedded linux platform that kind of requires it. Our windows based development relied on Visual Studio 2013 and we wanted to keep it that way.

    We have a batch script that generates all of the .vcxproj files for use with visual studio. We also have a project that regenerates a specific .vcxproj if the corresponding .pro file changes. It works fine but visual studio really doesn't handle this well. When the project changes if you hit reload, it will fail and never prompt you to reload again. If you don't the build waits for the user input to finish. It also does some things in parrallel so if one of the projects change it could be building that project at the same time.

    I completely understand if this is a "Don't do that" situation. I'm about ready to accept that if a pro file changes, the best thing to do is close and reopen visual studio after the projects are regenerated.  I'm wondering if there are any elegant solutions for it before that though.

    Wednesday, January 06, 2016 9:11 PM

Answers

  • Hi Kevin,

    >>What I'm wondering is if there is a way to force a project/step to build prior to other projects.

    As far as I know, it is hard for us to force stop it during  building time with a plug-in.

    Generally in VS IDE, you could uncheck the option for your specified project in the  Build Configuration Manager.

    Build->Configuration Manager

    It will not build your specified project file when start building.

    But when the project file is in building like your situation, I think the Visual Studio can’t reload the project file at the same time.

    Best Regards.

    Lake Xiao

    Friday, January 08, 2016 7:43 AM
    Moderator

All replies

  • Hi Kevin,

    Thanks for your post.

    It seems that you were using QT project. And the .pro file which is created in QT Creator.

    One issue is that how the .pro file impacts the .xxproj file of VS?

    For example, generally in Visual Studio. if you open one  .vcxproj file in two Visual Studio.

    If you unload the project and modify the .vcxproj file in one of the Visual Studio. You will see the warning message in another Visual Studio like this.

    For your problem . Since VS can’t load the project when you change the .pro file, I suppose the real problem was related to what result the .pro file really impact the .xxproj file.

    May be something in the .vcxproj  file have been changed so that the previous project really couldn’t be reloaded when you modified the .pro file, so we have to re-open the VS IDE.

    Since the  QT Creator is a third party development tool, you know that we also didn’t support it, but like the above reply, if the real issue was related to the .pro file, maybe you would discuss this issue with the third party product.

    Best Regards,

    Lake Xiao

    Thursday, January 07, 2016 8:56 AM
    Moderator
  • One thing I should probably clarify. QtCreator is not being used to generate visual studio project files. We have a project that uses qmake to generate the vcxproj files.

    When our the build start it can kick off our generation project as well as other projects. The prompt to reload will be brought up and the generation project might wait. Since your in the middle of a build, clicking reload will fail since visual studio can't reload the project during the build. From here on out visual studio won't attempt to reload them again if they change.

    What I'm wondering is if there is a way to force a project/step to build prior to other projects, and maybe allow visual studio to auto reload the project after that. Someone mentioned I could probably write a plugin to do this, currently we use the custom build tool on .pro files.

    Thursday, January 07, 2016 1:15 PM
  • Hi Kevin,

    >>What I'm wondering is if there is a way to force a project/step to build prior to other projects.

    As far as I know, it is hard for us to force stop it during  building time with a plug-in.

    Generally in VS IDE, you could uncheck the option for your specified project in the  Build Configuration Manager.

    Build->Configuration Manager

    It will not build your specified project file when start building.

    But when the project file is in building like your situation, I think the Visual Studio can’t reload the project file at the same time.

    Best Regards.

    Lake Xiao

    Friday, January 08, 2016 7:43 AM
    Moderator