Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Build Events not equal condition [duplicate]

Is there a way to have a not equal condition in build events ?

Like this:

if $(ConfigurationName) != Debug xcopy ...

Note that this is build event (batch-like syntax), not MSBuild task (which indeed supports != ).

like image 332
EdRbt Avatar asked Jan 08 '16 17:01

EdRbt


1 Answers

Update:

My bad, I thought it's for MSBuild. But if it's for only Build event than it will work like batch script

if not "$(ConfigurationName)" == "Debug" (
  echo "hello world"
)

For MSBuild

It's like following

Condition="'$(Configuration)'!='DEBUG'"

ex:

<When Condition=" '$(Configuration)'!='DEBUG' ">
....
</When>

See details MSBuild condition

like image 85
Nikson Kanti Paul Avatar answered Oct 10 '22 12:10

Nikson Kanti Paul



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!