주 콘텐츠로 건너뛰기

 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일 목요일 오후 6: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