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 8140401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:09:12+00:00 2026-06-06T12:09:12+00:00

i have some visual studio projects which depend on other projects, which have different

  • 0

i have some visual studio projects which depend on other projects, which have different configurations.

example:
Project MyProject (Configuration: Release)
  References:
    Project LibA (Configuration: Release_DontLink)
    Project LibB (Configuration: Release

Building using Visual Studio works correctly as the Configurations to be used for the different projects are stored inside the solution file.

But when i use msbuild to build MyProject, it builds the Release configuration of LibA, which is incorrect. Since both LibA and LibB are used by numerous other Projects, i cant change those configurations, i only have control over MyProject.

Is there any way to build MyProject using MsBuild without changing the LibA and LibB projects?

Possibly related question: Configuration for ProjectReference in MSBuild, however i did not fully understand the answer, and i think it would require me to change LibA/LibB

  • 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. Editorial Team
    Editorial Team
    2026-06-06T12:09:14+00:00Added an answer on June 6, 2026 at 12:09 pm

    On the solution level (i.e: MyProject.sln), open the property pages and set the Release configuration to build Release_DontLink configuration for project LibA. If you don’t have control over the sln file, you should be able to create a copy of it (i.e: MyProject.Release.sln).

    sln properties

    Then build the solution with:

    msbuild MyProject.sln /p:Configuration=Release
    

    Alternatively (not even remotely a best practice), after building MyProject build LibA while overriding its OutDir property:

    msbuild LibA.csproj /p:Configuration=Release_DontLink;OutDir=..LibA\Release
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a couple of different solutions, in which some projects may depend on
I have some projects which I wrote in C++ and compile with Visual Studio
I have some strange linking problem in my Visual Studio 2005 C++ project. As
I have a WPF VB.NET project in Visual Studio 2008. For some reason, Visual
I have some Visual Studio Macros created in visual studio which run from the
We have several Visual Studio projects, and we would like to: enable/disable some defines
In my 'project/repo' I have two MS Visual Studio projects, one for the main
Right now I have some libraries that link easily to Visual Studio projects but
I have a Visual Studio 2010 C++ project which was copied from another visual
I'm new to project configuration in Visual Studio 2010, but I've done some research

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.