Successfully complete an MSBuild task under certain conditions

I am trying to exit the target in a specific state.

I use

Error Code="0" Condition="'$(SOMETHING)' == '1'"/>

this causes my build to fail from TFS.

Is there a way to successfully displace the MSBuild target?

+4
source share
1 answer

If you want to exit target success in a certain state, but with an error

Try the following:

<Error Code="0" Condition="$(SOMETHING) == '1'"/>

If you want to exit MSbuild's target success, which means that without raising the error, please refer to the answer from Julien Hoarau How to stop the execution of MSBuild without raising the error?

+2
source

Source: https://habr.com/ru/post/1615469/


All Articles