How to programmly stop a build?

We are integration our MSBuild-based project into VS2005. One problem we met is that we can't find a way to stop the build programmly in the MSBuild object model. Can some body shed some light on this

Thanks.


Answer this question

How to programmly stop a build?

  • anish77

    Thanks. I will try.

  • Kabouter

    A solution that would not be ideal is to use a custom logger that you can notify to stop the build. Once it recieves the notification it can set a flag to stop the build. When a build event occurs, it can first check this flag and then throw an exception to stop the build.

    Sayed Ibrahim Hashimi
    www.sedodream.com

  • Helen Cool Granny

    Sorry, there's no way to do that in the current version of MSBuild. If your task is executing inside the build process you can return false from ITask.Execute stopping the build, but you can't do that using the object model. It's definitely something we will have to think about for the next releases.

    thanks,

    Lukasz



  • How to programmly stop a build?