スキップしてメイン コンテンツへ

 none
How do I set the build order of projects in visual studio solution? RRS feed

  • 質問

  • Hi,

    I want to build my solutions projects in a certain order is this possible?

    A dll is locked by a process and I need to build another project first to run the pre-build command that will stop the service.

    Cheers,

    Pete

     

    • 移動 Larcolais Gong 2010年11月24日 3:29 (From:Visual Studio Setup and Installation)
    2010年11月23日 10:08

回答

  • Hi peter,

     

    Visual Studio calculates the build order according to your dependence. If project A depends on project B, Visual Studio will build B priority to A. Change these order make no sense and will cause unexpected build error.

     

    > A dll is locked by a process and I need to build another project first to run the pre-build command that will stop the service.

     

    For this issue, you need to unlock all dlls that will be used in the building process before build the project. That’s why we usually tell people shut most application before running the installation.

     

    Sincerely,

    Kira Qian

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework!
    • 回答としてマーク Kira Qian 2010年12月3日 8:39
    2010年11月24日 9:15

すべての返信

  • Hi peter_quiet,

    Your concern is more like deployment. I will help you moving your thread into appropriate forum.

    Regards,

    Larcolais


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    2010年11月24日 3:29
  • Hi peter,

     

    Visual Studio calculates the build order according to your dependence. If project A depends on project B, Visual Studio will build B priority to A. Change these order make no sense and will cause unexpected build error.

     

    > A dll is locked by a process and I need to build another project first to run the pre-build command that will stop the service.

     

    For this issue, you need to unlock all dlls that will be used in the building process before build the project. That’s why we usually tell people shut most application before running the installation.

     

    Sincerely,

    Kira Qian

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework!
    • 回答としてマーク Kira Qian 2010年12月3日 8:39
    2010年11月24日 9:15
  • Kira,

    I have the same question for a different reason. Even though VS is supposed to calculate this order, it fails at it way too often. Often times i (and everyone else on my team) will build solution, with unexpected errors with common code. Then based on the errors we manually build the projects one at a time until it all builds correctly.

    But i guess by your answer there's no way to manually specify it.

    Chris

    2011年9月9日 12:40
  • Just right click the Solution node and select "Project Build Order".

    - Sudeep Jain

    • 回答の候補に設定 njappboy 2013年12月26日 18:20
    2012年1月11日 9:28
  • Did that, already set up.

    Rebuild still frequently ignores the dependencies.

    2017年11月24日 12:27
  • Just right click the Solution node and select "Project Build Order".

    - Sudeep Jain


    Upvoted this answer because it made me not only check the Project Build Order, but also in the "Dependencies" tab, select the projects that my project depends on. This did the trick for me ;)
    2018年7月20日 9:32