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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:05:28+00:00 2026-05-26T20:05:28+00:00

I finally realized why my BeforeBuild Target is no longer executing as expected —

  • 0

I finally realized why my BeforeBuild Target is no longer executing as expected — it’s so silly, it’s because the project’s configuration names had changed. But what I really want to do is test for the solution’s configuration name, not the project’s.

I know that the project’s configuration name is stored in $(Configuration). Is there one for the solution’s configuration name? Or is this simply not possible because (presumably) the solution names are only known to the configuration manager? If so, can anyone recommend a good method for managing configurations? I’d hate to have to add duplicate project configuration names everywhere…

UPDATE: after searching and reading some docs, I haven’t been able to find any proof that MSBuild is aware of the solution’s configuration name when its individual project files are compiled. I went ahead and build the solution from the command line, passing /v:diag, and dumped the output to a file. I searched through the file to find any signs of it knowing that the solution’s configuration name is “Deployment”, but the only occurences of that string appear when the BeforeBuild condition is checked.

  • 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-05-26T20:05:29+00:00Added an answer on May 26, 2026 at 8:05 pm

    The only solution I’ve come up with so far is to create my own environment variable on the TeamCity server, and have MSBuild check for its presence in the BeforeBuild target.

    EDIT: I couldn’t use my own environment variable because it wasn’t getting passed to the build runner for some reason. But when I used /v:n in the TeamCity MSBuild settings, I noticed that there is $(COMPUTERNAME), which is exactly what I wanted anyway. I ended up trying this and it totally did the trick.

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

Sidebar

Related Questions

I had a problem recently with a php project that I finally realised was
I've asked this in a different post but finally realized what it is I'm
So I was doing some development and changed the key names (android:key) of some
Update Over a year later, and I finally realized the cause of this behavior.
I finally upgraded to Delphi XE. The second time when I compile a project
I finally got my group to switch from SourceSafe to Subversion. Unfortunately, my manager
I finally have a hardware guy that is insterested in controlling the firmware. This
I finally found out the difference between UTC and GMT by making the effort
I finally let windows nag me into upgrading from IE6 to 8. Now in
I finally have my C++ Builder 2010 installation the way I want it, with

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.