简体   繁体   中英

Visual Studio 2017: Cancel build in pre build event

I can't seem to find whether it is possible in Visual Studio to cancel a build by checking something in a pre build event. Is this possible? If so: how?

Thanks in advance!

I can use exit /b 1 . It intentionally causes the pre-build event to fail by setting the %errorlevel% to 1, stopping the build. The error message is not great.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM