Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 167437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:16:30+00:00 2026-05-11T12:16:30+00:00

I have three Visual Studio solutions. The first is configured to build as Release

  • 0

I have three Visual Studio solutions. The first is configured to build as Release, and the other two are set to build as Debug.

When running a simple MSBuild script explicitly stating the configuration to build (Debug), the first project is still built as Release.

Sample script:

<Target Name='Build'>     <ItemGroup>         <ProjectToBuild Include='$(SolutionsPath)\Solution1.sln'/>         <ProjectToBuild Include='$(SolutionsPath)\Core\Solution2.sln'/>         <ProjectToBuild Include='$(SolutionsPath)\UI\Solution3.sln'/>     </ItemGroup>     <MSBuild Projects='@(ProjectToBuild)'              Targets='Rebuild'              Properties='Configuration=Debug;Platform=Any CPU'/> </Target> 

I have tried variations of the above such as the following, but I always end up with the same result.

<Target Name='Build'>     <ItemGroup>         <ProjectToBuild Include='$(SolutionsPath)\Solution1.sln'>             <Properties>Configuration=Debug</Properties>         </ProjectToBuild>          <ProjectToBuild Include='$(SolutionsPath)\Core\Solution2.sln'>             <Properties>Configuration=Debug</Properties>         </ProjectToBuild>          <ProjectToBuild Include='$(SolutionsPath)\UI\Solution3.sln'>             <Properties>Configuration=Debug</Properties>         </ProjectToBuild>     </ItemGroup>     <MSBuild Projects='@(ProjectToBuild)'              Targets='Rebuild'              Properties='Platform=Any CPU'/> </Target> 

I note there is a similar question, MSBuild task – Build fails because one solution being built in release instead of debug, but that is specific to TFS and Teambuild. I am talking pure MSBuild with a simple project file created from scratch.

How can I fix this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T12:16:30+00:00Added an answer on May 11, 2026 at 12:16 pm

    OK I have found the issue. Nothing related to MSBuild, but instead the solution being built. Posting to save someone else the heartache.

    For whatever reason the Debug configuration was configured within the solution like so:

    alt text http://www.freeimagehosting.net/uploads/cad0bdf1c0.jpg

    So MSBuild was only doing what it was told too…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So in visual studio i have my solution with two projects, first one is
In a visual studio project I have three layers, Data Layer, Business Layer and
I have a solution in Visual Studio 2008 professional. There are three projects, a
I have Visual Studio 2008 SP1, two C++/CLI projects, lets say proj1 and proj2.
I am trying to set up my Visual Studio projects. I have a generic
Is there a way to have Visual Studio 2008 automatically add heading information to
We are using Visual Studio 2010, but this was first conceived with VS2003. I
Every time you start Visual Studio, the first time you click Add Reference to
In our team we have a database project in visual Studio 2008 which is
This one may be a bit strange. I have a solution in Visual Studio

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.