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

    Question

  • 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

     

    • Moved by Larcolais Gong Wednesday, November 24, 2010 3:29 AM (From:Visual Studio Setup and Installation)
    Tuesday, November 23, 2010 10:08 AM

Answers

  • 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!
    • Marked as answer by Kira Qian Friday, December 03, 2010 8:39 AM
    Wednesday, November 24, 2010 9:15 AM

All replies

  • 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.
    Wednesday, November 24, 2010 3:29 AM
  • 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!
    • Marked as answer by Kira Qian Friday, December 03, 2010 8:39 AM
    Wednesday, November 24, 2010 9:15 AM
  • 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

    Friday, September 09, 2011 12:40 PM
  • Just right click the Solution node and select "Project Build Order".

    - Sudeep Jain

    • Proposed as answer by njappboy Thursday, December 26, 2013 6:20 PM
    Wednesday, January 11, 2012 9:28 AM