Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to temporarily disable build events in Visual Studio?

Is there a way to temporarily disable pre and post build events?

i.e. build without build events (which are taking a bit of time but arent always crucial to run)

At the moment, I have minification and a couple of other things going on and I don't always need that.

like image 973
raklos Avatar asked Feb 06 '12 16:02

raklos


1 Answers

Stuff like minimization only matters for the Release build. So you could skip it like this:

if "$(ConfigurationName)" == "Debug" goto skip
; stuff here...
:skip

There are some other macros you can use, click the Edit button and the Macro>> button to see them. Environment variables can be tested as well, use %varname%. But are much harder to set.

like image 140
Hans Passant Avatar answered Sep 21 '22 19:09

Hans Passant