Saturday, December 03, 2005
« Spanish News | Main | The zap.co.il Review Police »

Ever wanted to manually control what build-events run when you build in Visual Studio?

For example, if you want to register the output in GAC or something, but not always, only when you choose to do so.

At first I was thinking about flipping some boolean environment variable and then testing it in the build event code. But later I decided it's better to define a new build configuration and test for it. To test for the build config - use the ConfigurationName macro, like this:

if $(ConfigurationName) ==DoStuffConfig echo doing stuff

if not $(ConfigurationName) ==DoStuffConfig echo not doing stuff

Now, if you want the special code to run, switch the configuration to "DoStuffConfig" (you have to create it first, of course).If you don't want it to run, switch to some other config.

Only problem is, switching the configuration takes a while on a big solution (30 seconds or so). Is there a better way?

Want to join me as partner in a cool new startup?
Get in touch: pasha at cohai dot co

Bookmark and Share Saturday, December 03, 2005 10:37:24 PM (Jerusalem Standard Time, UTC+02:00)  #    Comments [1]   Tracked by:
"casino game" (casino game) [Trackback]
"commercial insurance" (commercial insurance) [Trackback]
"auto insurance houston" (auto insurance houston) [Trackback]
"phentermine" (phentermine) [Trackback]
"online phentermine" (online phentermine) [Trackback]
"2006 wsop" (2006 wsop) [Trackback]
"american family insurance" (american family insurance) [Trackback]
"mortgage rate" (mortgage rate) [Trackback]
"credit card deals" (credit card deals) [Trackback]
"phentermine cod" (phentermine cod) [Trackback]
"buy cialis" (buy cialis) [Trackback]
"freecreditreport" (freecreditreport) [Trackback]
"poker gambling" (poker gambling) [Trackback]
"casino bonus" (casino bonus) [Trackback]
"online casinos" (online casinos) [Trackback]
"carnival casino" (carnival casino) [Trackback]
"online roulette" (online roulette) [Trackback]
"online slots" (online slots) [Trackback]
"noble poker" (noble poker) [Trackback]
"online craps" (online craps) [Trackback]
"best casino" (best casino) [Trackback]
"celebrity poker" (celebrity poker) [Trackback]
"titan poker" (titan poker) [Trackback]
"online blackjack" (online blackjack) [Trackback]
"best online casinos" (best online casinos) [Trackback]
"pokerroom" (pokerroom) [Trackback]
"full tilt poker" (full tilt poker) [Trackback]
"titan poker" (titan poker) [Trackback]
"online poker" (online poker) [Trackback]
"neteller online casinos" (neteller online casinos) [Trackback]
"doyles room" (doyles room) [Trackback]
"ultimate bet" (ultimate bet) [Trackback]
"free online casinos" (free online casinos) [Trackback]
"nedcobx" (nedcobx) [Trackback]
"gmnvxxn" (gmnvxxn) [Trackback]